- Sat Jun 13, 2015 3:23 am
#20326
gcc allocates stack space to the boot loader, to minimise this i've used a stub function that delegates all the work (that that actually uses stack space) to a second function which is marked noinline. This keeps the amount of stack space reserved to the minimum possible. Same thing happens with the sdk bootloader, but they haven't made the same efforts to keep it to a minimum. I didn't know if this might get reset or anything once the sdk does its initialisation, but if you print out the stack address when you enter user_init, started from both rBoot and sdk bootloader, you should see the difference between them. This could be avoided if the boot loader was coded in assembler, but that would exclude most people from being able to play with it.