File tree Expand file tree Collapse file tree 4 files changed +12
-46
lines changed
Expand file tree Collapse file tree 4 files changed +12
-46
lines changed Original file line number Diff line number Diff line change 11#------------------------------------
2- # Self Update
2+ # Application
33# This file is meant to be include by add_subdirectory() in the root CMakeLists.txt
44#------------------------------------
5+ cmake_minimum_required (VERSION 3.17)
6+
7+ include (${FAMILY_PATH} /app.cmake)
58
69# Generate bootloader_bin.c
710add_custom_command (OUTPUT bootloader_bin.c
8- COMMAND ${Python_EXECUTABLE} ${UF2CONV_PY} --carray -o bootloader_bin.c $<TARGET_FILE_DIR:tinyuf2>/tinyuf2.bin
11+ COMMAND ${Python_EXECUTABLE} ${UF2CONV_PY} --carray -o ${CMAKE_CURRENT_BINARY_DIR} / bootloader_bin.c $<TARGET_FILE_DIR:tinyuf2>/tinyuf2.bin
912 DEPENDS tinyuf2
1013 )
1114
12- # self_update target
1315add_executable (self_update
14- ${TOP} /apps/self_update/ self_update.c
15- ${CMAKE_CURRENT_LIST_DIR} /../.. /boards.c
16- ${CMAKE_CURRENT_LIST_DIR} /../.. /board_flash.c
16+ self_update.c
17+ ${FAMILY_PATH} /boards.c
18+ ${FAMILY_PATH} /board_flash.c
1719 ${CMAKE_CURRENT_BINARY_DIR} /bootloader_bin.c
1820 )
1921
@@ -25,10 +27,7 @@ target_compile_definitions(self_update PUBLIC
2527 BUILD_NO_TINYUSB
2628 BUILD_APPLICATION
2729 )
28- target_link_options (self_update PUBLIC
29- "LINKER:--script=${CMAKE_CURRENT_LIST_DIR} /../../linker/stm32h5_app.ld"
30- )
3130
32- family_configure_common (self_update)
31+ family_configure_app (self_update)
3332family_gen_uf2(self_update ${UF2_FAMILY_ID} )
3433family_flash_uf2(self_update ${UF2_FAMILY_ID} )
Original file line number Diff line number Diff line change @@ -25,6 +25,6 @@ family_flash_stlink(tinyuf2)
2525#------------------------------------
2626# Application
2727#------------------------------------
28- add_subdirectory (${CMAKE_CURRENT_LIST_DIR } /apps/self_update)
28+ add_subdirectory (${TOP} /apps/self_update ${CMAKE_BINARY_DIR } /apps/self_update)
2929add_subdirectory (${TOP} /apps/blinky ${CMAKE_BINARY_DIR} /apps/blinky)
3030add_subdirectory (${TOP} /apps/erase_firmware ${CMAKE_BINARY_DIR} /apps/erase_firmware)
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -22,8 +22,8 @@ family_flash_jlink(tinyuf2)
2222family_flash_stlink(tinyuf2)
2323
2424#------------------------------------
25- # Application (e.g self update)
25+ # Application
2626#------------------------------------
27- add_subdirectory (${CMAKE_CURRENT_LIST_DIR } /apps/self_update)
27+ add_subdirectory (${TOP} /apps/self_update ${CMAKE_BINARY_DIR } /apps/self_update)
2828add_subdirectory (${TOP} /apps/blinky ${CMAKE_BINARY_DIR} /apps/blinky)
2929add_subdirectory (${TOP} /apps/erase_firmware ${CMAKE_BINARY_DIR} /apps/erase_firmware)
You can’t perform that action at this time.
0 commit comments