2021-08-17 11:32 PM
Hello,
I am implemented UART bootloader on my windows controlled test bench. All is great and working, but some uncertain exist with jump command.
Its says in app note:
jumps to the memory location programmed in the received ‘address + 4’
(corresponding to the address of the application reset handler).
For example if the received address is 0x0800 0000, the bootloader jumps to the
memory location programmed at address 0x0800 0004.
In general, the host must send the base address where the application to jump to is
programmed.
My understanding is that my program starts at 0x0800 0000. So I should jump to 0x0800000-4 ?
If I do so, I get NACK, and nothing happens. But if I jump to 0x0800000, all it's good. My program seems to be running, but based on application note, it means I am jumping to 0x08000004 address
So what is in that first 4 bytes of data at the start of the flash It says reset handler, so I suppose to jump over this point ? So this is why I am jumping just a bit further into flash, since bootloader already does this for me ?
In app note:
-> initializes the main stack pointer of the user application
Any insight will be welcome !
2021-08-23 04:03 PM
The first thing in your program is the ISR vectors. The first entry is used to store the end of the stack (_estack) which gets loaded into the MSP register. The second entry is the Reset_Handler pointer which is the entry point for your application.
You should be sending 0x08000000 to the GO command.
2021-08-23 06:42 PM
Not actually "jumping" to the address you give it, but SP/PC pair pointing indirectly at other things.
Data is a table, not executable code.