Put the steps the start-up code performs in order.
1. Call main 2. Set the stack pointer 3. Clear the .bss region 4. Copy .data from flash to RAM
Answer: A
The stack must exist before any function is entered, then the initialised statics are copied and the zeroed ones cleared, and only when the C environment is complete is main called. Either order of the two memory operations works, but both must precede main.
Please log in or register to report this question.