.copyfirmwarelzo Method, 32-bit Version (Selected Platforms Only)
The fd.copyfirmwarelzo method for 16-bit platforms is described here.
Function: |
Assumes that there is a block of data containing the TiOS firmware, optionally followed by an LZO-compressed application binary stored beginning from the logical sector 0 of the flash memory. Copies TiOS firmware into the TiOS area of the flash. If the app_present argument is not zero, decompresses the application binary and copies it into the application area of the flash. After that, reboots the device to make it run new TiOS firmware (and application). |
Syntax: |
fd.copyfirmwarelzo(app_present as no_yes) |
Returns: |
--- |
See Also: |
Self-Upgrading the Firmware/Application, Direct Sector Access, fd.copyfirmware, fd.copyfirmwarelzo, fd.copyfirmwarefromfile, fd.copyfirmwarefromfilelzo |
Part |
Description |
app_present |
NO — the method will just copy the number of sectors covering the size of TiOS YES — the method will also copy compiled application binary, which is supposed to follow TiOS |
Details
The decompression algorithm accepts data compressed with the lzo1x-999.exe utility.
The application portion (compiled Tibbo BASIC/C application binary) is optional.
Notice the differences from the 16-bit version of this method:
- The 16-bit version expects the TiOS firmware and application binary to be combined first, then compressed using the LZO algorithm. This 32-bit version expects that the TiOS firmware will be supplied as is (uncompressed) and the application binary will be supplied in the LZO-compressed form. Do not worry that this is somehow worse than compressing everything including TiOS: passing a TiOS file through the LZO algorithm achieves virtually no compression.
- The 16-bit version requires you to specify the combined total number of bytes in the TiOS and application binary portions. This 32-bit version only needs to know if there is an application portion to deal with (it is assumed that the TiOS portion is always present). Since TiOS size is fixed and known in advance for each platform, there is no need to supply this information. As for the LZO-compressed application binary, the LZO format allows the decompression algorithm to determine when the end of data is reached automatically.
Certain platforms do not support this method. Refer to your platform documentation for details.
On 32-bit platforms, this method will only work if your device has Monitor V2.00 or higher. Contact Tibbo Support for a free Monitor upgrader application.
BE VERY CAREFUL! Using this method on incorrect data will "incapacitate" your device and further remote upgrades will become impossible. You will need to visit your device's site and upload correct firmware and/or application, possibly through its serial port. Scary, huh?