I had a cortex m0 USB mass storage project. I also have a PC app which makes sense out of the log and debug gibberish files inside the USB drive. This project has been dormant for a while
. I wanted to add more functionality to it.
Objective:
Drag .bin or .hex file in the USB drive. The code reads the file and writes it into the on-chip flash. The on-chip flash should always have 2 codes on it but only the latest will be run. This will allow me to check if the code was written correctly on the on-chip flash. If not then I can revert to the earlier code. Will this work like a pointer or like grub which will allow to switch between 2 OS by checking a flag. How do i go about this? I'm looking for a simple approach
.
P.S.
Later I'd also like to add some encryption in the .hex or .bin file. This will ensure that the code does not write the on-chip flash with anybody's files but only
mine!
Objective:
Drag .bin or .hex file in the USB drive. The code reads the file and writes it into the on-chip flash. The on-chip flash should always have 2 codes on it but only the latest will be run. This will allow me to check if the code was written correctly on the on-chip flash. If not then I can revert to the earlier code. Will this work like a pointer or like grub which will allow to switch between 2 OS by checking a flag. How do i go about this? I'm looking for a simple approach
P.S.
Later I'd also like to add some encryption in the .hex or .bin file. This will ensure that the code does not write the on-chip flash with anybody's files but only