I am trying to understand that if for STM32F405 MCU a custom bootloader is used on the MCU then each of the two projects for the custom bootloader and the application code will have their own 'startup.s" files.
What I understand is that both of the two binaries, ie the bootloader and the application code, they both reside at different locations in the flash.
Now when the custom bootloader will exit and return the control then the control should pass-on to the startup code of the application code. But I don't know how it actually happens. Does the two binary programs resides at contiguous locations so that after the bootloader finishes the next instruction is that of the startup code?
Or they are at different locations and somehow the start address of startup of application code is saved as jump address at the end of the bootloader binary?
Will it make a difference in the way it is actually implemented if I use Keil or GCC compiler?