Skip to content

Conversation

@kilograham
Copy link
Contributor

No description provided.

@kilograham kilograham added this to the 2.1.2 milestone May 13, 2025
@kilograham kilograham force-pushed the pico_runtime_skip_init_all branch from 2dc9e37 to eb77caf Compare May 13, 2025 21:35
@kilograham kilograham force-pushed the pico_runtime_skip_init_all branch from eb77caf to 95acddd Compare May 13, 2025 21:36

// ---------------------------------------------------------------------------------------
// 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
Copy link
Contributor

Choose a reason for hiding this comment

The 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" ?

Comment on lines 64 to 65
#endif
#else
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With so many #endifs and #elses all over the place, it's pretty hard to see how things line up. Maybe some judicious

#endif // PICO_RUNTIME_INIT_FUNC

style comments would make this code slightly easier to read?


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
Copy link
Contributor

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 ?

@lurch
Copy link
Contributor

lurch commented May 13, 2025

P.S. I just did a git grep "#define PICO_RUNTIME_INIT_FUNC_HW" and I see that the host and rp2_common versions of the macro have different signaures:

src/host/pico_runtime/include/pico/runtime.h:#define PICO_RUNTIME_INIT_FUNC_HW(func, priority_string1, priority_string2) PICO_RUNTIME_INIT_FUNC_FLAGS(func, PICO_RUNTIME_INIT_TYPE_HW, priority_string1, priority_string2)
src/rp2_common/pico_runtime/include/pico/runtime.h:#define PICO_RUNTIME_INIT_FUNC_HW(func, priority_string) PICO_RUNTIME_INIT_FUNC(func, priority_string)

Is that intentional?

@peterharperuk
Copy link
Contributor

Why is this needed?

@kilograham
Copy link
Contributor Author

Why is this needed?

Good question; it is a bit of a hack, and i was on the fence. you pushed me off - i will remove them by updating the linker script in the encrypted bootloader

@kilograham kilograham closed this May 14, 2025
@kilograham kilograham modified the milestones: 2.1.2, none May 14, 2025
@peterharperuk
Copy link
Contributor

It wasn't a criticism. I was just wondering

@kilograham kilograham deleted the pico_runtime_skip_init_all branch July 20, 2025 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants