What is Nostr?
Andrew Zonenberg /
npub1wpg…f386
2024-07-03 02:16:37

Andrew Zonenberg on Nostr: Well this was fun to root cause. Turns out if you try to shrink the size of your ...

Well this was fun to root cause.

Turns out if you try to shrink the size of your firmware by removing unused library functions with -ffunction-sections and -Wl,--gc-sections, and you also have all of your SFRs in their own sections so the linker script can put them in the right place...

... it's very easy to accidentally GC unused SFRs. And if you don't design your linker script to ensure you still have a 1 kB hole in your address space at that location it will happily just put the next SFR there instead.

This will, predictably, lead to hardware getting extremely confused.
Author Public Key
npub1wpgh8qdt8suzxy8f2luspksj4wpdfw53weq4v8dr7llqp3t72tds3rf386