Hi there,
I have an LPC1788 with an own bootloader and an application. Is it possible to exchange RAM data between both? The board also have an external RAM.
Physically this should be possible, since there is no power-down between the jump from the bootloader to the application. But I suppose the RAM is cleared, when the stack/heap are initiated.
regards Frederic
If the refresh time of an external DRAM is not too short, you can get this done. But note that you don't need to configure the DRAM twice - do it in the bootloader and get it over and done! SRAM contents should remain unchanged.
It is easier to exchange information in the internal RAM. Just modify the application project to make the IRAM region smaller. Then the last bytes will not be cleared. Or adjust the start address of the IRAM - then the start of IRAM will not be cleared.
Then you can set a struct pointer to this memory range, and access whatever information the boot loader wanted to transfer.
But there are a number of other solutions too, like playing with absolutely located variables, and playing with attributes to force a memory region to not be initialied.
But I suppose the RAM is cleared, when the stack/heap are initiated.
Looking at the startup code should clear that up for you. Alter the memory arena the two use, and they won't interfere, Store data you want to pass in a location known by both.
Ok. Thanks for the help, guys. I'll look at this asap.