@@ -105,25 +105,27 @@ endfunction()
105
105
# Usage:
106
106
# ExternalZephyrProject_Add(APPLICATION <name>
107
107
# SOURCE_DIR <dir>
108
- # [BOARD <board>]
108
+ # [BOARD <board> [BOARD_REVISION <revision>] ]
109
109
# [MAIN_APP]
110
110
# )
111
111
#
112
112
# This function includes a Zephyr based build system into the multiimage
113
113
# build system
114
114
#
115
- # APPLICATION: <name>: Name of the application, name will also be used for build
116
- # folder of the application
117
- # SOURCE_DIR <dir>: Source directory of the application
118
- # BOARD <board>: Use <board> for application build instead user defined BOARD.
119
- # MAIN_APP: Flag indicating this application is the main application
120
- # and where user defined settings should be passed on as-is
121
- # except for multi image build flags.
122
- # For example, -DCONF_FILES=<files> will be passed on to the
123
- # MAIN_APP unmodified.
115
+ # APPLICATION: <name>: Name of the application, name will also be used for build
116
+ # folder of the application
117
+ # SOURCE_DIR <dir>: Source directory of the application
118
+ # BOARD <board>: Use <board> for application build instead user defined BOARD.
119
+ # BOARD_REVISION <revision>: Use <revision> of <board> for application (only valid if
120
+ # <board> is also supplied).
121
+ # MAIN_APP: Flag indicating this application is the main application
122
+ # and where user defined settings should be passed on as-is
123
+ # except for multi image build flags.
124
+ # For example, -DCONF_FILES=<files> will be passed on to the
125
+ # MAIN_APP unmodified.
124
126
#
125
127
function (ExternalZephyrProject_Add )
126
- cmake_parse_arguments (ZBUILD "MAIN_APP" "APPLICATION;BOARD;SOURCE_DIR" "" ${ARGN} )
128
+ cmake_parse_arguments (ZBUILD "MAIN_APP" "APPLICATION;BOARD;BOARD_REVISION; SOURCE_DIR" "" ${ARGN} )
127
129
128
130
if (ZBUILD_UNPARSED_ARGUMENTS )
129
131
message (FATAL_ERROR
@@ -198,7 +200,17 @@ function(ExternalZephyrProject_Add)
198
200
# Only set image specific board if provided.
199
201
# The sysbuild BOARD is exported through sysbuild cache, and will be used
200
202
# unless <image>_BOARD is defined.
201
- list (APPEND sysbuild_cache_strings "${ZBUILD_APPLICATION} _BOARD:STRING=${ZBUILD_BOARD} \n " )
203
+ if (DEFINED ZBUILD_BOARD_REVISION )
204
+ # Use provided board revision
205
+ list (APPEND sysbuild_cache_strings "${ZBUILD_APPLICATION} _BOARD:STRING=${ZBUILD_BOARD} @${ZBUILD_BOARD_REVISION} \n " )
206
+ else ()
207
+ list (APPEND sysbuild_cache_strings "${ZBUILD_APPLICATION} _BOARD:STRING=${ZBUILD_BOARD} \n " )
208
+ endif ()
209
+ elseif (DEFINED ZBUILD_BOARD_REVISION )
210
+ message (FATAL_ERROR
211
+ "ExternalZephyrProject_Add(... BOARD_REVISION ${ZBUILD_BOARD_REVISION} )"
212
+ " requires BOARD."
213
+ )
202
214
endif ()
203
215
204
216
file (WRITE ${sysbuild_cache_file} .tmp ${sysbuild_cache_strings} )
0 commit comments