452
Platforms
©2000-2008 Tibbo Technology Inc.
Upgrading the Firmware/Application
As was explained under
to
write to the flash area occupied by the firmware and Tibbo Basic application. This
is done to prevent your application from inadvertently damaging its own code or
the firmware.
A special
method is provided for changing the data in the
firmware/application area of the flash. The method copies the specified number of
sectors (starting from the sector with logical number 0) from the data area and
into the firmware/application area of the flash memory, then reboots your device.
Before invoking this method, store the new binary image of the firmware/
application in the data area of the flash memory starting from logical sector #0.
Logical numbers are assigned to the sectors in reverse, so storing to sector #0
actually means storing to the topmost physical sector of the flash memory. It goes
without saying that your data area has to have enough capacity to store the new
binary image.
Exactly how you receive the new binary image is immaterial to this discussion. You
can use any suitable transmission method, such as TCIP/IP, FTP, your own
proprietary protocol, whatever! The important part is that before invoking fd.
copyfirmware you must have the binary image stored in the data area of the flash,
starting from logical sector #0, and you must know how many sectors this
occupies. After that, invoke fd.copyfirmware and hope that you prepared the right
data --
wrong data will render your device inoperable
. That's right -- no
second change for a remote upgrade if you loaded a wrong binary! You will have to
physically go to your device and upload it with the right firmware and it is quite
possible that you will have to do this through the serial port.
448
483
460