-
Notifications
You must be signed in to change notification settings - Fork 15
pico-sdk: Switch to picolibc #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,15 +43,16 @@ function(pico_define_boot_stage2 NAME SOURCES) | |
if (PICO_C_COMPILER_IS_CLANG) | ||
target_link_options(${NAME} PRIVATE "-nostdlib") | ||
elseif (PICO_C_COMPILER_IS_GNU) | ||
target_link_options(${NAME} PRIVATE "--specs=nosys.specs") | ||
target_compile_options(${NAME} PRIVATE "--specs=picolibc.specs") | ||
target_link_options(${NAME} PRIVATE "--specs=picolibc.specs") | ||
target_link_options(${NAME} PRIVATE "-nostartfiles") | ||
endif () | ||
|
||
# boot2_helpers include dir | ||
target_include_directories(${NAME} PRIVATE ${PICO_BOOT_STAGE2_DIR}/asminclude) | ||
|
||
target_link_libraries(${NAME} hardware_regs boot_stage2_headers) | ||
target_link_options(${NAME} PRIVATE "LINKER:--script=${PICO_BOOT_STAGE2_DIR}/boot_stage2.ld") | ||
target_link_options(${NAME} PRIVATE "-T${PICO_BOOT_STAGE2_DIR}/boot_stage2.ld") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's a minor point, but I think long options are easier to read in scripts. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. picolibc's spec fragments only look for the -T version of this option, so we must use the short variant to prevent addition of the picolibc linker script here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK, I got it. |
||
set_target_properties(${NAME} PROPERTIES LINK_DEPENDS ${PICO_BOOT_STAGE2_DIR}/boot_stage2.ld) | ||
|
||
pico_add_dis_output(${NAME}) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a history about this change to
ChangeLog.zephyr.md
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, done.