File tree Expand file tree Collapse file tree 3 files changed +11
-2
lines changed Expand file tree Collapse file tree 3 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -7,14 +7,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
77
88## [ Unreleased]
99
10- ## [ v0.7.3]
11-
1210- Fixed a potential miscompilation caused by the initial stack pointer
1311 not being 8-byte aligned. This issue affected 0.7.1 and 0.7.2; for
1412 more details please see [ the advisory] ([ #467 ] ).
1513- A linker error is generated if the initial stack pointer is not 8-byte aligned ([ #464 ] ).
1614- The initial stack pointer is now forced to be 8-byte aligned in the linker script,
1715 to defend against it being overridden outside of the cortex-m-rt linker script ([ #465 ] ).
16+ - Add ` zero-init-ram ` feature to initialize RAM with zeros on startup. This can be necessary on
17+ safety-critical hardware to properly initialize memory integrity measures.
1818
1919[ the advisory ] : https://github.com/rust-embedded/cortex-m/discussions/469
2020[ #464 ] : https://github.com/rust-embedded/cortex-m/issues/464
Original file line number Diff line number Diff line change @@ -63,6 +63,8 @@ main() {
6363
6464 cargo rustc --target " $TARGET " --example minimal --features " set-sp,${needed_features} " -- $linker
6565 cargo rustc --target " $TARGET " --example minimal --features " set-sp,${needed_features} " --release -- $linker
66+ cargo rustc --target " $TARGET " --example minimal --features " zero-init-ram,${needed_features} " -- $linker
67+ cargo rustc --target " $TARGET " --example minimal --features " zero-init-ram,${needed_features} " --release -- $linker
6668 cargo rustc --target " $TARGET " --example minimal --features " set-vtor,${needed_features} " -- $linker
6769 cargo rustc --target " $TARGET " --example minimal --features " set-vtor,${needed_features} " --release -- $linker
6870 done
Original file line number Diff line number Diff line change 169169//! `_stack_start` value from the linker script. This is not usually required, but some debuggers
170170//! do not initialise SP when performing a soft reset, which can lead to stack corruption.
171171//!
172+ //! ## `zero-init-ram`
173+ //!
174+ //! If this feature is enabled, RAM is initialized with zeros during startup from the `_ram_start`
175+ //! value to the `_ram_end` value from the linker script. This is not usually required, but might be
176+ //! necessary to properly initialize checksum-based memory integrity measures on safety-critical
177+ //! hardware.
178+ //!
172179//! ## `set-vtor`
173180//!
174181//! If this feature is enabled, the vector table offset register (VTOR) is initialised in the reset
You can’t perform that action at this time.
0 commit comments