
Every embedded engineer eventually inherits a linker script they didn't write.
And nobody wants to touch it.
Magic addresses.
Memory regions that don't quite line up with the datasheet.
Sections sitting in places nobody can explain.
A custom heap somebody added five years ago.
Comments from three engineers ago, all of whom have left the company.
You open the .map file and half the symbols seem to be in places they shouldn't be.
But the board boots.
So everyone leaves it alone.
Until somebody changes something.
New MCU variant.
Different RAM size.
Compiler upgrade.
Bootloader gets bigger.
One section moves.
Suddenly the stack is smashing into something it shouldn't, the system crashes intermittently, and you're staring at hexadecimal addresses at 11pm trying to work out what the original engineer was thinking.
This is one of those parts of embedded engineering that doesn't get talked about enough.
The linker script isn't just build configuration.
It's part of the architecture of the system.
Flash layout.
RAM layout.
Stack.
Heap.
Bootloader.
DMA buffers.
Persistent storage.
Shared memory.
All sitting there in a file that quite often nobody currently on the engineering team properly understands.
The original author has gone.
The documentation is the linker script.
Good luck.
You're not being overly cautious if you don't want to touch it.
But sooner or later somebody has to understand it.
Preferably before the next silicon revision forces you to.
What's the worst linker script or memory map you've inherited?
#EmbeddedSystems #Firmware #EmbeddedEngineering #EmbeddedC #BareMetal #FirmwareDevelopment