build: allow board config header to specify bootstage 2 without using custom per board cmake (#293)
* build: allow compile time - and hence via board config header - choice of boot stage2 via a default compile_time_choice.S boot stage 2 which conditionally includes others adafruit_rp2040_feather: fix flash size/clkdiv * fixup GENERIC_03H #define names
This commit is contained in:
@ -14,7 +14,7 @@ if (NOT TARGET pico_standard_link)
|
||||
target_link_options(pico_standard_link INTERFACE "LINKER:-nostdlib")
|
||||
endif ()
|
||||
|
||||
target_link_libraries(pico_standard_link INTERFACE hardware_regs pico_bootrom pico_binary_info pico_cxx_options)
|
||||
target_link_libraries(pico_standard_link INTERFACE hardware_regs boot_stage2_headers pico_bootrom pico_binary_info pico_cxx_options)
|
||||
|
||||
function(pico_add_link_depend TARGET dependency)
|
||||
get_target_property(target_type ${TARGET} TYPE)
|
||||
|
@ -6,6 +6,7 @@
|
||||
|
||||
#if !PICO_NO_BINARY_INFO && !PICO_NO_PROGRAM_INFO
|
||||
#include "pico/binary_info.h"
|
||||
#include "boot_stage2/config.h"
|
||||
|
||||
// Note we put at most 4 pieces of binary info in the reset section because that's how much spare space we had
|
||||
// (picked the most common ones)... if there is a link failure because of .reset section overflow then move
|
||||
@ -66,9 +67,9 @@ bi_decl(bi_program_url(PICO_PROGRAM_URL))
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !PICO_NO_BI_BOOT2_NAME
|
||||
#ifdef PICO_BOOT2_NAME
|
||||
bi_decl(bi_string(BINARY_INFO_TAG_RASPBERRY_PI, BINARY_INFO_ID_RP_BOOT2_NAME, PICO_BOOT2_NAME))
|
||||
#if !PICO_NO_BI_BOOT_STAGE2_NAME
|
||||
#ifdef PICO_BOOT_STAGE2_NAME
|
||||
bi_decl(bi_string(BINARY_INFO_TAG_RASPBERRY_PI, BINARY_INFO_ID_RP_BOOT2_NAME, PICO_BOOT_STAGE2_NAME))
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user