[Tinyos-devel] tinyos-1.x TOSBoot bootloader

Paul.McCarthy at csiro.au Paul.McCarthy at csiro.au
Sun Aug 5 16:47:27 PDT 2007


Hi,

I have a few questions regarding the TOSBoot bootloader for which I
would appreciate some clarification. I am working from the 1.1.15
snapshot release, and am exclusively using an AVR Atmega128
microcontroller, with an AT45DB081B 8Mbit external flash.

First of all, straight out of the CVS, the bootloader will compile, but
does not correctly copy images from the external flash over to internal
program memory.

1. The FormatFlash utility formats image volumes of 65536 bytes, however
the TOSBoot bootloader allows images of up to 131072 bytes. Why is this?


2. Building on the previous question, if the maximum image size is 65536
bytes (going by the FormatFlash utility), why is it necessary for
TOSBoot to support the extended segment addressing in ihex? The standard
16 bit addressing in ihex is enough for 65536 byte programs.

3. In the "result_t programImage(ex_flash_addr_t startAddr)" function,
there is a check to make sure that the starting program address is equal
to the end of the bootloader section in program memory ("if (intAddr !=
TOSBOOT_END)"). Why is this?

In the Atmega128 controller, the bootloader is at the end of the program
memory space, so this check is totally wrong. Rather, the check should
be "if (intAddr != 0x00000)", or, even better, "if (intAddr != 0x00000
|| intAddr + secLength >= TOSBOOT_START)".

Perhaps I have made a mistake in my interpretation of the code. If I
have, please correct me.

Finally, I've rewritten the programImage function so that it does work
with my platform. Would this be a useful contribution to the 1.1.15
codebase?

Many thanks,

Paul McCarthy.

Software Engineer - Tasmanian ICT Centre
GPO Box 1538 Hobart TAS 7001
Castray Esplanade Hobart TAS 7000
www.ict.csiro.au
 
+61 3 6232 5518
paul.mccarthy at csiro.au
 
The Tasmanian ICT Centre is jointly funded by the Australian Government
through the Intelligent Island Program and the CSIRO. The Intelligent
Island Program is administered by the Tasmanian Department of Economic
Development.



More information about the Tinyos-devel mailing list