I have an application using a BF537. I understand how to create a loader file that will select between one or more programs at power up per "VisualDSP++ 5.0 Loader and Utilities Manual" page 3-13. This works fine for selecting a program at boot up (for example, if a DIP is wired to a GPIO pin, select which program to load based on the pin's value).
My goal is to have a simple "protected mode" program that the processor always boots to at power up. Then upon receiving a network message, switch to a "user mode program". The idea is that the protected mode program would do nothing more than handle updates to the user mode program and issue a reboot. Therefore, if we installed a user mode update that bricked the unit, we could always recover by cycling power, booting to protected mode and reprogramming the user mode program.
Currently, I'm issuing a reboot via the WDT and the boot loader checks the GPIO pin's state to select which program to load. This works great as long as I have physical access to the device. However, in the final configuration, we plan to have this embedded and the user won't have physical access to the device. So now, I'd like to add functionality to switch from one program to another via a software command (for example upon receiving a particular message over ethernet). Is there an easy way to do this?
I can't imagine that this is anything unusual. However, I haven't found an elegant solution. Can anyone point me to an example or suggest a general approach?
Note that I've considered storing a value to a flash that could be read at boot. However, I'd want this value to be reset at a power cycle (in case the user mode program is faulty). Therefore, flash is obviously not appropriate since values would be stored across power cycling.
Thanks in advance