-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Pico runtime skip init all #2466
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 |
|---|---|---|
|
|
@@ -49,13 +49,26 @@ void runtime_init(void); | |
|
|
||
| void runtime_run_initializers(void); | ||
| void runtime_run_per_core_initializers(void); | ||
| // PICO_CONFIG: PICO_RUNTIME_SKIP_INIT_ALL, Skip calling of `runtime_init_` functions during runtime init, type=bool, default=0, group=pico_runtime_init | ||
| #if !PICO_RUNTIME_SKIP_INIT_ALL | ||
| #define PICO_RUNTIME_SKIP_INIT_ALL 0 | ||
| #endif | ||
|
|
||
| #ifndef PICO_RUNTIME_INIT_FUNC | ||
| #if !PICO_RUNTIME_SKIP_INIT_ALL | ||
| #define PICO_RUNTIME_INIT_FUNC(func, priority_string) uintptr_t __used __attribute__((section(".preinit_array." priority_string))) __pre_init_ ## func = (uintptr_t)(void (*)(void)) (func) | ||
| #else | ||
| // define the variable in case it is referenced, but do not stick it in the preinit_array | ||
| #define PICO_RUNTIME_INIT_FUNC(func, priority_string) uintptr_t __pre_init_ ## func; | ||
| #endif | ||
| #endif | ||
| #else | ||
|
Comment on lines
64
to
65
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. With so many style comments would make this code slightly easier to read? |
||
| #ifndef PICO_RUNTIME_INIT_FUNC | ||
| #if !PICO_RUNTIME_INIT_SKIP_INIT_ALL | ||
| #define PICO_RUNTIME_INIT_FUNC(func, priority_string) __pre_init func, priority_string | ||
| #else | ||
| #define PICO_RUNTIME_INIT_FUNC(func, priority_string) | ||
| #endif | ||
| #endif | ||
| #endif | ||
| #define PICO_RUNTIME_INIT_FUNC_HW(func, priority_string) PICO_RUNTIME_INIT_FUNC(func, priority_string) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -80,7 +80,7 @@ void runtime_init_bootrom_reset(void); | |
| #endif | ||
|
|
||
| // --------------------------------------------------------------------------------------- | ||
| // Non-boot core eset of bootrom state, not needed if only using core 0 not used on RP2040 | ||
| // Non-boot core reset of bootrom state, not needed if only using core 0 not used on RP2040 | ||
|
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. Should there be a comma after "core 0" here, to avoid this being misread as "core 0 not used on RP2040" ? |
||
| // --------------------------------------------------------------------------------------- | ||
| #ifndef PICO_RUNTIME_INIT_PER_CORE_BOOTROM_RESET | ||
| #define PICO_RUNTIME_INIT_PER_CORE_BOOTROM_RESET "00051" | ||
|
|
||
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.
So presumably this "overrides" e.g.
PICO_RUNTIME_SKIP_INIT_POST_CLOCK_RESETS?