Closed jamesmunns closed 4 years ago
@korken89 implemented unaligned pointer methods.
@therealprof changed function signature to return a byte slice, added an optional utf8
feature which enables checked utf8 strings. In a totally non-scientific test, this feature seemed to add 1KiB to the code size. At opt-level=3
:
Before (without utf8
):
arm-none-eabi-size target/thumbv7em-none-eabihf/release/timer-uart
text data bss dec hex filename
19714 4136 4 23854 5d2e target/thumbv7em-none-eabihf/release/timer-uart
After (with utf8
):
arm-none-eabi-size target/thumbv7em-none-eabihf/release/timer-uart
text data bss dec hex filename
20714 4136 4 24854 6116 target/thumbv7em-none-eabihf/release/timer-uart
This was also tested on the nrf52832, specifically on this stream: https://youtu.be/KT6VnwuouPY.
This should be ready to merge, or if you don't want it here, I'll fork this and make another crate as-is.
@jamesmunns Considering that this implements a somewhat different idea and is not a drop-in compatible change I think it would make sense to have this in another crate. How about calling this panic-persist
?
Will do!
Implements #1. Not yet tested or really well thought about yet.
example memory.x changes:
BEFORE
AFTER