programming a program that allows for updates
grasshopper
Posts: 438
My question is how would I design my firmware in the propeller to be updated? Do I need to create arrays that themselves are arrays? Any ideas will be appreciated.
I am speaking about “code structure” not actually getting updates off of the web. Currently I have a way to store data from a text file, this makes it somewhat dynamic.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Visit my site -> [url=Http://www.rawcircuits.com]www.rawcircuits.com[/url]
I am speaking about “code structure” not actually getting updates off of the web. Currently I have a way to store data from a text file, this makes it somewhat dynamic.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Visit my site -> [url=Http://www.rawcircuits.com]www.rawcircuits.com[/url]
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Need to make your prop design easier or secure? Get a PropMod has crystal, eeprom, and programing header in a 40 pin dip 0.7" pitch module with uSD reader, and RTC options.
Have a look at the YBOX2 software which can download different application programs via the Internet.
I was recently looking for something like your object and simply didn't see it.
There it is!!!: http://obex.parallax.com/objects/410/
Grasshopper,
I'm not sure I completely understand your question. So, I'll just paraphrase mctrivia... to flesh it out his comments a little and if I'm wrong... then I need to be corrected.
You could write an EEPROM loader into your application code, which has one feature: to take an update from an SD card and load it into the EEPROM. This could look a lot like a stripped down version of PropDos... with no menu structures, no instructions, and no keyboard... all you would need is a button, which would trigger the event. And it would also look a lot like Chip's PropLoader. Right now both PropDos and PropLoader load files to HUB RAM. But with a few hints from mctrivia's ID object, and the "read" functions built into the SD demo routines, you should be off to the races.
If you put your result into the OBEX, I would predict that it will jump to the top 20 downloads in no time.
Rich
I've had the misfortune to work on a number of projects that employed this kind of thing for updating embedded code and it always led to problems. Even in the "sophisticated" world of avionics systems.
Seems to me it's best to have a bootloader program in your EEPROM that is never changed. Have that load application from SD card or high end of EEPROM on reset. Have it do updates to SD card or high end of EEPROM and do something to verify the update is valid. Best use SD card and use the space to keep the old app version as a fallback when the new app version download is screwed.
Now if the Prop you are updating is at a remote location you have to be even more careful. Perhaps the update is valid but for some reason it no longer communicates back to base. How do you get it to reboot and switch back to the old working code ?
Well here we might want to have the bootloader run in a dedicated COG as PASM with minimal communication back to base. The application would be loaded from SD card and started from the bootloader. The app would not use the bootloader COG so that COG could still get commands form base to reload a previous version.
How complex do you want this to be?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.