Re:Storing multiple apps in Flash

"Andrew Page" <[email protected]> Sat, 19 Jun 2004 19:04:09 +0100
Newsgroups gmane.comp.hardware.microcontrollers.tini
Message-ID <000b01c45627$d1dc3740$0100a8c0@andy>
Hi Marc,

The DataPort class has some memory restrictions on firmware version 1.12 and
earlier.  Although this is not documented, this is the cause of the
IllegalAddressException.  This is fixed on firmware version 1.13.  Note that
1.13 still has restrictions but will allow reading anywhere above 0x400000
(i.e. anywhere in flash).

If your application is going to upgrade itself, have you written native code
to write to flash?  There are no java classes/methods supplied by Dallas for
doing this.

Best Regards,

Andy Page,
Unipower Europe Limited.

> --__--__--
>
> Message: 2
> Date: Fri, 18 Jun 2004 15:55:25 -0400 (EDT)
> From: marc-F8lsx2r+rRhWk0Htik3J/[email protected]
> To: tini-6tN4nzCoH/[email protected]
> Subject: [TINI]Storing multiple apps in Flash
>
>
> 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
>
>
> End of TINI Digest_______________________________________________
> TINI mailing list
> TINI-6tN4nzCoH/[email protected]
> To UNSUBSCRIBE, edit your profile, or see list archives:
> http://lists.dalsemi.com/mailman/listinfo/tini

_______________________________________________
TINI mailing list
TINI-6tN4nzCoH/[email protected]
To UNSUBSCRIBE, edit your profile, or see list archives:
http://lists.dalsemi.com/mailman/listinfo/tini