Hi
I need to setup Keil MDK for a project, where I need: 1) A in-application bootloader. 2) 2 flash sections for non-volatile data 3) The main application. Should be replaceable from the bootloader and should be able to modify the data sections.
The platform is a STM32F4; I imagine to split the main memory like this: Sections 0 and 1 : (0x08000000 -> 0x08007FFF) : Bootloader Sections 2 and 3 : (0x08008000 -> 0x0800FFFF) : Non-volatile memory Sections 4 through 11 : (0x08010000 -> 0x080FFFFFF) : Application program.
The bootloaders start address will be remapped to 0x00000000 and be booted from. If nothing interesting happens, it will jump to 0x08010xxx (Cant remember exactly where the application reset vector is).
Now, I wonder how to make this happen? I believe scatter files is the way to go, but after some search online I have not yet got a clear idea of how.
How do I setup the scatter file to and Keil to put the bootloader and application in the correct places? Do I need two projects or can I tell keil to compile both the bootloader and the application program and put them in the flash? Perhaps even without wrecking the non-volatile data?
I'm sure I'll get the functionality for reading from and writing to the non-volatile memory up and running, but I need Keil not place any program code in the area where it will be...
Best regards, Peter Madsen