@@ -78,6 +78,7 @@ target_sources(platform_s
7878 ${CMAKE_CURRENT_SOURCE_DIR} /stm32l5xx_hal/Src/stm32l5xx_hal_pwr_ex.c
7979 ${CMAKE_CURRENT_SOURCE_DIR} /stm32l5xx_hal/Src/stm32l5xx_hal_gpio.c
8080 ${CMAKE_CURRENT_SOURCE_DIR} /stm32l5xx_hal/Src/stm32l5xx_hal_uart.c
81+ ${CMAKE_CURRENT_SOURCE_DIR} /stm32l5xx_hal/Src/stm32l5xx_hal_uart_ex.c
8182 ${CMAKE_CURRENT_SOURCE_DIR} /stm32l5xx_hal/Src/stm32l5xx_hal_rcc.c
8283 ${CMAKE_CURRENT_SOURCE_DIR} /stm32l5xx_hal/Src/stm32l5xx_hal_gtzc.c
8384 $<$<BOOL :${TFM_PARTITION_PLATFORM} >:${CMAKE_CURRENT_SOURCE_DIR} /secure/tfm_platform_system>
@@ -151,7 +152,6 @@ if(BL2)
151152 ${CMAKE_CURRENT_SOURCE_DIR} /bl2/low_level_device.c
152153 ${CMAKE_CURRENT_SOURCE_DIR} /CMSIS_Driver/low_level_flash.c
153154 ${CMAKE_CURRENT_SOURCE_DIR} /CMSIS_Driver/low_level_com.c
154- ${CMAKE_CURRENT_SOURCE_DIR} /Native_Driver/tick.c
155155 ${CMAKE_CURRENT_SOURCE_DIR} /stm32l5xx_hal/Src/stm32l5xx_hal.c
156156 ${CMAKE_CURRENT_SOURCE_DIR} /stm32l5xx_hal/Src/stm32l5xx_hal_flash.c
157157 ${CMAKE_CURRENT_SOURCE_DIR} /stm32l5xx_hal/Src/stm32l5xx_hal_flash_ex.c
@@ -176,7 +176,7 @@ if(BL2)
176176 # object files. For this reason, the file mailbox_ipc_intr is linked directly to
177177 # the ns binary as an object file. This issue does not affect armclang, but the
178178 # fix is compatible.
179- target_sources (tfm_s
179+ target_sources (bl2
180180 PRIVATE
181181 ${CMAKE_CURRENT_SOURCE_DIR} /Native_Driver/tick.c
182182 )
@@ -185,20 +185,25 @@ endif()
185185install (FILES
186186 ${CMAKE_CURRENT_SOURCE_DIR} /boards/scripts/stm_tool.py
187187 ${CMAKE_CURRENT_SOURCE_DIR} /../../../../../../bl2/ext /mcuboot/scripts/macro_parser.py
188- DESTINATION ./scripts/ )
188+ DESTINATION ${CMAKE_BINARY_DIR} /scripts/ )
189+
190+ if (${CMAKE_C_COMPILER_ID} STREQUAL GNU)
191+ set (PREPROCESSOR_FILE ${CMAKE_CURRENT_SOURCE_DIR} /boards/scripts/gcc/preprocess.sh)
192+ endif ()
189193
190194install (FILES ${CMAKE_CURRENT_SOURCE_DIR} /boards/scripts/regression.sh
195+ ${PREPROCESSOR_FILE}
191196 ${CMAKE_CURRENT_SOURCE_DIR} /boards/scripts/TFM_UPDATE.sh
192197 ${CMAKE_CURRENT_SOURCE_DIR} /boards/scripts/postbuild.sh
193198 PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ
194- DESTINATION . / )
199+ DESTINATION ${CMAKE_BINARY_DIR} / )
195200
196- if (TEST_S)
201+ if (TEST_S OR TEST_NS )
197202 #the define FLASH_LAYOUT_FOR_TEST
198203 #increase SECURE and NON SECURE IMAGE and modify the content of low_level_device.c from BL2 (low_level_flash.c)
199204 set (FLAGS_FOR_BL2_PREPROCESSING
200205 "#define FLASH_LAYOUT_FOR_TEST\n "
201- "#define BL2\n "
206+ "#define BL2\n "
202207 )
203208 add_definitions ("-DFLASH_LAYOUT_FOR_TEST" )
204209else ()
0 commit comments