On Wed, Apr 29, 2015 at 9:06 AM, Li, Wenting <[email protected]> wrote:
> Dear all, > > I have several question with regard to the relation between the bootloader > and TinyOS with the underlying device as MicaZ (or Atmega128). My goal is > to understand how to upload an application to a specific memory address in > the internal flash of Atmega128. > > First, I want to confirm if what I learned is correct. > > 1. It seems that once I compiled a TinyOS application, e.g. Blink, the > output (and uploaded) image includes the whole OS (necessary components and > libraries in the dependencies) and the application BlinkApp, is it correct? > yes. > > 2. From the tutorial, it seems that I can only package one application > into the system image, because in the Makefile I can only define one > component. Is it correct? > yes. TinyOS uses whole program optimization. Only one program gets built and it is complete. > > 3. If 2. is correct, then the TinyOS is like a one task application. > calling the above a task is confusing in the TinyOS context because tasks have a different meaning. > If I want to add another function, e.g., Bark, I have to modify the top > component module as "BlinkAndBark", wire Blink and Bark components and > start them asynchronously. Is it correct? > Mostly. There are many different ways to accomplish this. You can have a Blink module that implements the Blink functionality. You can also have a Bark module that implements Bark. You main top level could do nothing and Blink and Bark both get activated via Boot.booted. > Here are my main questions: > > I learned from the datasheet of Atmega128 that its internal flash is > comprised of bootloader section (e.g. 0xF000 ~ 0xFFFF) and the application > section (e.g. 0x0000~0xEFFF). > > 1. I want to put an application in the bootloader section and the other > part in the applicatioin section, because I need the capability to write to > internal flash. But the whole TOS image is too big to fit in bootloader > section. So can I selectively choose a component to stay in bootloader > section, and the other parts outside. > no > How can I do it if TinyOS only allows the upload of one packaged system > image? > you can't in the context of TinyOS. The question above is outside the scope of how TinyOS gets built. You are actually asking a question about how to you make use of the embedded atmel environment. And how do you load two different pieces of code into the Atmel flash and have them cooperate in some fashion. TinyOS doesn't directly support doing those kinds of things. You can do this but it is outside the scope of how TinyOS works. So it is something that you would have to figure out. > > 2. I checked a bit about Deluge (using TOSBoot). It seems that the tosboot > indicates -DTOSBOOT_START in the Makefile where to put tosboot. Does it > mean that the rest stays elsewhere? But I compiled app/test/deluge/Blink, > and its main.srec does not include address within 0xF000~0xFFFF according > to the description of SREC format, only 0x0000~0x3610. I am confused... > sorry I haven't gone done the Deluge/TosBoot path so can't answer any more of your questions. > > 3. How to write bootloader in TinyOS? Any tutorials, principle? I have > only seen avr bootloader. > What are you actually trying to do? Do you need to change the code load on the fly? That is what Deluge/TosBoot are for. > > I am trying to understand it and finally build something. Any hint would > be welcome!! Thanks a lot for your help! > > regards, > Vivien > > > > > > _______________________________________________ > Tinyos-help mailing list > [email protected] > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help > -- Eric B. Decker Senior (over 50 :-) Researcher
_______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
