3 ms·
> (zero the BSS, setup the stack, jump main) Also: run global initializers. Getting kinda fuzzy on the boundaries, but I'd also add in the process to copy th
by brandmeyer 6y ago
> (zero the BSS, setup the stack, jump main)
Also: run global initializers. Getting kinda fuzzy on the boundaries, but I'd also add in the process to copy the initial contents of the .data segment from read-only to read-write storage.
- deleted 6y ago[deleted]
- tomjakubowski 6y agoIn 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.