Skip to content

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

@9names

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/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions