On 30 April 2015 at 18:42, Li, Wenting <luth...@gmail.com> wrote:

> Hi Eric, Hi Johny,
>
> Thank you all for the answer! I still need to digest the information, for
> example, I don't know if in TinyOS we can generate a linking library. Are
> you suggesting writing c code instead of tos components?
>

Nope. It's still TinyOS (though TosBoot itself is a bit more C-ish due to
its low-level nature). You essentially first build the TinyOS TosBoot app,
then take that binary as input to objcopy, and extract the symbol entries
for flash_read/flash_write, putting those into a link library (see the
Makefile I linked in the earlier email for the exact details on how it does
that for the atxm256). This library is just a helper for when you link your
main TinyOS application, so that it can find where to call for the
flash_read/flash_write functions.

If you've placed those functions at fixed addresses, it would probably
possible to manually specify those symbols/addresses to the linker, but I
preferred doing it via a library since that way I'm sure that there is no
mismatch between the TosBoot and the main app.

I'd recommend you keep reading up on TosBoot / Deluge. For the project we
did $years ago, we didn't actually use the Deluge protocol (though we did
use TosBoot), but ran something on top of CoAP instead. Dealing with the
new firmware blocks once you get them to your device is quite easy - just
write them to the correct offset of the correct partition, and when fully
received, set the flags for TosBoot and reset the micro. Done!

Cheers,
/Johny
-- 
Johny Mattsson
Senior Software Engineer

DiUS Computing Pty. Ltd.

*where ideas are engineered *
_______________________________________________
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to