Skip to content

Conversation

KushalMeghani1644
Copy link

@KushalMeghani1644 KushalMeghani1644 commented Oct 6, 2025

This PR adds an optional feature to skip .data initialization during startup.

Introduces:

  • the skip-data-init feature that disables the .data copy loop in the reset handler, for boot flows that already initialize RAM (e.g. RP2040 boot2 that copies to RAM and unmaps flash).

  • Adds a compile-time guard preventing skip-data-init from being used with zero-init-ram.

  • Includes a minimal example at skip-data-init.rs.

  • Default behavior is unchanged; .data is still copied when the feature is not enabled.

This PR tries to address issue #609

@jonathanpallant
Copy link
Contributor

Stubbing out the copy loop seems fine but what is the purpose of the example? It has no observable output and no mechanism to run it with the kind of bootloader that it must be used with to avoid UB. Was it LLM generated?

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.

2 participants