Main application to a secondary application
Posted: Thu Jun 11, 2020 11:47 am
Hi,
I am working on a project that essentially requires a bootloader. But i dont really want to use a bootloader in the traditional sense.
I have a main application that performs various tasks. One of which is to download from the internet a hex file and store it in an external memory.
At a certain time of day, I want the main application to check to see if an update has been downloaded. If it meets the criteria, I want my application to complete its tasks and then jump into a second sub application.
This second application will get the data from the external memory and program it into the main application memory space. There is also a fancy light show which means constant update from I2C using interrputs. This will mean using SPI, I2C and Interrupts in both applications. Upon completion of the re-write of main application memory, there would be a reset command issued where the main application will start again.
I am using an STM32 IC with plenty of memory. 128KB currently.
Does this sound practical? I think it would be because it just seems like a more elaborate bootloader.
If i am on the right track then how would i go about jumping out of the main application and into a sub application?
How would i program a sub application to a specific place? (like a bootloader would be)
Is it possible to use different interrupt routines in 2 different programs?
I am working on a project that essentially requires a bootloader. But i dont really want to use a bootloader in the traditional sense.
I have a main application that performs various tasks. One of which is to download from the internet a hex file and store it in an external memory.
At a certain time of day, I want the main application to check to see if an update has been downloaded. If it meets the criteria, I want my application to complete its tasks and then jump into a second sub application.
This second application will get the data from the external memory and program it into the main application memory space. There is also a fancy light show which means constant update from I2C using interrputs. This will mean using SPI, I2C and Interrupts in both applications. Upon completion of the re-write of main application memory, there would be a reset command issued where the main application will start again.
I am using an STM32 IC with plenty of memory. 128KB currently.
Does this sound practical? I think it would be because it just seems like a more elaborate bootloader.
If i am on the right track then how would i go about jumping out of the main application and into a sub application?
How would i program a sub application to a specific place? (like a bootloader would be)
Is it possible to use different interrupt routines in 2 different programs?