aboutsummaryrefslogtreecommitdiff
path: root/cortex-m-rt/examples/override-exception.rs
diff options
context:
space:
mode:
authorGravatar Rahix <rahix@rahix.de> 2022-01-03 11:32:26 +0100
committerGravatar Rahix <rahix@rahix.de> 2022-01-03 11:39:55 +0100
commit19125ac052fcba1d67de39be3292e34bd6c6d0f4 (patch)
treecc8fc44e3e8ddb6f457d9722a4bdff288aabb35b /cortex-m-rt/examples/override-exception.rs
parent50c7fd34901eb9a2a9aec79c4c5a5574140046ba (diff)
downloadcortex-m-19125ac052fcba1d67de39be3292e34bd6c6d0f4.tar.gz
cortex-m-19125ac052fcba1d67de39be3292e34bd6c6d0f4.tar.zst
cortex-m-19125ac052fcba1d67de39be3292e34bd6c6d0f4.zip
macros: Allow setting a name for singleton!() statics
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.
Diffstat (limited to 'cortex-m-rt/examples/override-exception.rs')
0 files changed, 0 insertions, 0 deletions