I'm working on a bootloader that uses a hex file and I would like to know, how to start loaded program.
In Keil v. 4.24 startup.s file contained this:
Reset_Handler PROC EXPORT Reset_Handler [WEAK] IMPORT __main LDR R0, =__main BX R0 ENDP
And __main function was an entry point for any program. Keil generated hex-file and __main-function address was here as "Linear start address". All was well.
But Keil's 4.5 (or higher) startup.s containes this:
Reset_Handler PROC EXPORT Reset_Handler [WEAK] IMPORT SystemInit IMPORT __main LDR R0, =SystemInit BLX R0 LDR R0, =__main BX R0 ENDP
So what is an entry point now? And where does "linear start address" point to? Is there some reliable way to start loaded program based on information in the hex file?
Moving SystemInit call from reset handler to the actual main is obvious, but a little bit inconvinient.