3 ms·
In standard C only constant values can initialize globals, so the value can be baked into the binary.
by tomjakubowski 6y ago
In standard C only constant values can initialize globals, so the value can be baked into the binary.
- brandmeyer 6y ago"baked into the binary" covers a lot of ground. You've got to get the initial contents of .data initialized somehow. In a typical microcontroller that's a copy from flash to ram.
- simias 6y agoThat's true, I forgot about that because the last controller I used had a bootrom that copied the booloader straight to RAM, so .data was already read-write and there was nothing to do.