cmake: support multiple entries in board.cmake
Currently there is no way to support running a board on multiple emulation platforms nor to choose a desired emulation platform for the simulation to be run on. This commit introduces a new SUPPORTED_EMU_PLATFORMS list, which defines available emulation platforms for a given board. Fixes #12375. Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
This commit is contained in:
parent
6aa783ed6a
commit
94428044e2
32 changed files with 71 additions and 66 deletions
|
@ -1603,8 +1603,17 @@ if(HEX_FILES_TO_MERGE)
|
|||
message(VERBOSE "Merging hex files: ${HEX_FILES_TO_MERGE}")
|
||||
endif()
|
||||
|
||||
if(EMU_PLATFORM)
|
||||
include(${ZEPHYR_BASE}/cmake/emu/${EMU_PLATFORM}.cmake)
|
||||
if(SUPPORTED_EMU_PLATFORMS)
|
||||
list(GET SUPPORTED_EMU_PLATFORMS 0 default_emu)
|
||||
add_custom_target(run DEPENDS run_${default_emu})
|
||||
|
||||
foreach(EMU_PLATFORM ${SUPPORTED_EMU_PLATFORMS})
|
||||
include(${ZEPHYR_BASE}/cmake/emu/${EMU_PLATFORM}.cmake)
|
||||
endforeach()
|
||||
|
||||
if(TARGET debugserver_${default_emu})
|
||||
add_custom_target(debugserver DEPENDS debugserver_${default_emu})
|
||||
endif()
|
||||
else()
|
||||
add_custom_target(run
|
||||
COMMAND
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue