Skip to content

Update __pre_init docs in cortex-m-rt to suggest use of naked ASM fn #618

Description

@9names

https://docs.rs/cortex-m-rt/0.7.5/cortex_m_rt/#features

A #[pre_init] macro is also provided to run a function before RAM initialisation, but its use is deprecated as it is not defined behaviour to execute Rust code before initialisation. It is still possible to create a custom pre_init function using assembly.

I think it might be better advice to recommend a naked function, now that we have them.
https://blog.rust-lang.org/2025/07/03/stabilizing-naked-functions/

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions