Thanks for the reply. Let me get this straight, the actual occupied memory is provided as a value for the ROM (13800). The flash memory contains the .hex file, which is then decomposed into the ROM and RAM.
Is my understanding correct? Regards, -- Ricardo On Fri, Jul 16, 2010 at 2:40 PM, Urs Hunkeler <[email protected]> wrote: > Hi Ricardo, > > The HEX file is a text file. Every byte of the binary is written as two > characters (human readable hex values). In addition, there are addresses, > checksums and other programming or control information. > > If you don't assign any value to a variable declaration, that variable will > get a reserved space in the RAM, but this space is not initialized. Hence > there is nothing to do, the code "might" execute a little bit faster and > "might" be a little bit smaller, but you have to be sure to do the right > thing. If you assign a value to a variable at initialization, this value has > to be stored somewhere and the variable needs to be initialized before it > can be used. I think (please, someone correct me if I am wrong) this > concerns only global variables, and the mote will copy part of the FLASH to > the RAM when booting to initialize these variables (they always have exactly > the same address in the RAM, determined at compile-time). > > Cheers, > Urs > > > > On 7/16/10 2:55 PM, Ricardo . wrote: > >> Hello everyone, >> >> I'm trying to understand the relationship between ROM and RAM .hex file >> generated in the build. >> It has been said here that: >> >> > In words few ROM includes the code and initialized data RAM and >>> includes >>> > BOTH initialized and uninitialized data (note the stack That Is Not >>> > Included). >>> >> >> But for example, when compiling the code this values are displayed: ROM: >> 13800 bytes, RAM: 594 bytes and the .hex file generated has 38 832 >> bytes. I can not see how it goes from 38832 bytes to (13800 +594) bytes. >> >> What is the advantage of uninitialized data in RAM? >> >> Someone help me understand this? >> Regards, >> -- >> Ricardo >> > >
_______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
