Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
This avoids having to do `#[doc(hidden)] pub mod critical_section` which is a bit strange.
|
|
|
|
Co-Authored-By: Markus Reiter <me@reitermark.us>
|
|
As detailed in rust-embedded/cortex-m#364, niche optimization of the
`Option` used in the `singleton!()` macro can lead to the initial value
of the static to contain non-zero bits. This in turn leads to the whole
static being moved from `.bss` to `.data` which means it eats up flash
space for no reason. Especially if the singleton stores a particularly
large type, this can be quite problematic.
Prevent this by using an explicit boolean flag instead of the `Option`
type. This is not quite as nice but at least there is no chance for the
`singleton!()` to end up in `.data`...
|
|
Right now, the `singleton!()` macro always creates a static named `VAR`.
This is annoying when digging through objdump output or digging into
memory with a debugger because it is hard to see what singleton you're
looking at when they are all called `<...>::{{closure}}::VAR`.
To make it a bit nicer, allow setting the name of the generated static
to some meaningful identifier which can then be cross-referenced in
debugger output, for example with
singleton!(FOO_BUFFER: [u8; 1024] = [0u8; 1024]);
There is no other side-effects to this change - the identifier is never
visible to other code because it is still contained in the closure of
the macro.
|
|
the same note as in https://github.com/rust-embedded/riscv/pull/87
|
|
|
|
|
|
the preferred way to import macros in Rust 2018 is via `use`. If you import
`iprintln` and try to use you'll get an error if the `iprint` macro has not been
imported as well.
This commit makes `iprintln` work w/o having to import `iprint` as well.
|
|
tweak Exception enum to match CMSIS names, document the parts of the API that require opting into
`"inline-asm"`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
the functionality is not fundamental and can be easily added to a program by
directly depending on cortex-m-semihosting
|
|
|
|
|
|
|
|
|