Skip to content

Commit 7fc5ccd

Browse files
committed
Copy newly compiled files over when using USE_PRECOMPILED=FALSE
1 parent 7c73792 commit 7fc5ccd

File tree

6 files changed

+10
-4
lines changed

6 files changed

+10
-4
lines changed

CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ ExternalProject_Add(enc_bootloader
7474
"-DUSE_MBEDTLS=0"
7575
"-DPICO_DEBUG_INFO_IN_RELEASE=OFF"
7676
BUILD_ALWAYS 1 # todo remove this
77-
INSTALL_COMMAND ""
7877
)
7978

8079
set(ENC_BOOTLOADER_ELF ${CMAKE_BINARY_DIR}/enc_bootloader/enc_bootloader.elf)
@@ -91,7 +90,6 @@ if (TARGET mbedtls)
9190
"-DUSE_MBEDTLS=1"
9291
"-DPICO_DEBUG_INFO_IN_RELEASE=OFF"
9392
BUILD_ALWAYS 1 # todo remove this
94-
INSTALL_COMMAND ""
9593
)
9694

9795
set(ENC_BOOTLOADER_MBEDTLS_ELF ${CMAKE_BINARY_DIR}/enc_bootloader_mbedtls/enc_bootloader.elf)
@@ -109,7 +107,6 @@ if (NOT PICOTOOL_NO_LIBUSB)
109107
"-DUSE_PRECOMPILED:BOOL=${USE_PRECOMPILED}"
110108
"-DPICO_DEBUG_INFO_IN_RELEASE=OFF"
111109
BUILD_ALWAYS 1 # todo remove this
112-
INSTALL_COMMAND ""
113110
)
114111

115112
set(XIP_RAM_PERMS_ELF ${CMAKE_BINARY_DIR}/xip_ram_perms/xip_ram_perms.elf)
@@ -125,7 +122,6 @@ if (NOT PICOTOOL_NO_LIBUSB)
125122
"-DUSE_PRECOMPILED:BOOL=${USE_PRECOMPILED}"
126123
"-DPICO_DEBUG_INFO_IN_RELEASE=OFF"
127124
BUILD_ALWAYS 1 # todo remove this
128-
INSTALL_COMMAND ""
129125
)
130126

131127
set(FLASH_ID_BIN ${CMAKE_BINARY_DIR}/picoboot_flash_id/flash_id.bin)

enc_bootloader/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,12 @@ if (NOT USE_PRECOMPILED)
8888

8989
pico_set_binary_type(enc_bootloader no_flash)
9090
pico_add_dis_output(enc_bootloader)
91+
92+
if (USE_MBEDTLS)
93+
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/enc_bootloader.elf DESTINATION ${CMAKE_CURRENT_LIST_DIR} RENAME enc_bootloader_mbedtls.elf)
94+
else()
95+
install(TARGETS enc_bootloader DESTINATION ${CMAKE_CURRENT_LIST_DIR})
96+
endif()
9197
else()
9298
project(enc_bootloader C CXX ASM)
9399
message("Using precompiled enc_bootloader.elf")

enc_bootloader/enc_bootloader_mbedtls.elf

100644100755
File mode changed.

picoboot_flash_id/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ if (NOT USE_PRECOMPILED)
2525
target_link_options(flash_id PRIVATE -nostartfiles -nodefaultlibs -Ttext=0)
2626
pico_add_bin_output(flash_id)
2727
pico_add_dis_output(flash_id)
28+
29+
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/flash_id.bin DESTINATION ${CMAKE_CURRENT_LIST_DIR})
2830
else()
2931
project(flash_id C CXX ASM)
3032
message("Using precompiled flash_id.bin")

xip_ram_perms/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ if (NOT USE_PRECOMPILED)
4242
string(REPLACE "RAM(rwx) : ORIGIN = 0x20000000, LENGTH = 512k" "RAM(rwx) : ORIGIN = 0x13ffc000, LENGTH = 16k" LINKER_SCRIPT "${LINKER_SCRIPT}")
4343
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/memmap_xip_ram.ld "${LINKER_SCRIPT}")
4444
pico_set_linker_script(xip_ram_perms ${CMAKE_CURRENT_BINARY_DIR}/memmap_xip_ram.ld)
45+
46+
install(TARGETS xip_ram_perms DESTINATION ${CMAKE_CURRENT_LIST_DIR})
4547
else()
4648
project(xip_ram_perms C CXX ASM)
4749
message("Using precompiled xip_ram_perms.elf")

xip_ram_perms/xip_ram_perms.elf

380 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)