Storing multiple apps in Flash
marc-F8lsx2r+rRhWk0Htik3J/[email protected] Fri, 18 Jun 2004 15:55:25 -0400 (EDT)
| Newsgroups | gmane.comp.hardware.microcontrollers.tini |
|---|---|
| Message-ID | <[email protected]> |
Hi everybody, I'm brand new to Tini so please forgive me if it turns out that this has been answered before. I currently am trying to store 2 different applications in flash. The first application is a simple bootloader. Its job is on startup to read the 2nd application out of flash, write the bytes to ram and then launch the second application. Actually if it could run the 2nd application directly out of flash, that would be fine too. The 2nd application has the ability to upgrade itself over the network. This allows us to have an application that can recover and upgrade itself even in situations where the battery backed RAM gets trashed. I build the first bootstrap application and generate a .tbin file with the -l -t 470100 parameters, so that it will run on bootup. I build the second application and generate a .tbin file but this time is use the -l -t 524288 (80000 hex) parameters. I load both files using JavaKit using the -400 -flash 40 parameters. I'm using the DS80C400 module with the 1.12 firmware. The bootstrap application attempts to read using a DataPort object. I set the address to 0x80000 and then read the application into a byteArray. I can then write it out the raw bytes using a FileOutputStream and start the second app using the RuntimeClass. I don't get that far because I always get an IllegalAddress exception when I read the memory (even if I try to read a couple of bytes). Ironically I did accidentally get it to successfully read once from adress 0x800000 when I typed it in by accident. Obviously it couldn't successfully run the app. Any help would be appreciated Thanks Marc Paris _______________________________________________ TINI mailing list TINI-6tN4nzCoH/[email protected] To UNSUBSCRIBE, edit your profile, or see list archives: http://lists.dalsemi.com/mailman/listinfo/tini