On Thu, Sep 25, 2008 at 10:37 PM, UGlee <[EMAIL PROTECTED]> wrote: > I am a newbie on tinyos. > > would anyone like to explain the relationship among main.exe, ihex > file, and the rom/ram size printed when launching make command? Say, > blink on telosb on tinyos 2.1:
main.exe is actually a binary file produced by the linker. It is actually in the ELF executable output format so contains lots of information including the actual object that is your program, data areas for initilized data, and information about how big the different data areas are. It is a linker output format. As such it will always be larger than the actual program. ihex is intel hex format and is a format that is a conversion of the ELF output into something that TI's BSL (boot strap loader) can download and burn into the flash area on the MSP430. > > > /opt/tinyos-2.1.0/apps/Blink$ make telosb > mkdir -p build/telosb > compiling BlinkAppC to a telosb binary > ncc -o build/telosb/main.exe -Os -O -mdisable-hwmul -Wall -Wshadow > -Wnesc-all -target=telosb -fnesc-cfile=build/telosb/app.c -board= > -DDEFINED_TOS_AM_GROUP=0x22 -DIDENT_APPNAME=\"BlinkAppC\" > -DIDENT_USERNAME=\"matianfu\" -DIDENT_HOSTNAME=\"ubuntu\" > -DIDENT_USERHASH=0x03283c3eL -DIDENT_TIMESTAMP=0x48dc730bL > -DIDENT_UIDHASH=0xebb60a89L BlinkAppC.nc -lm > compiled BlinkAppC to build/telosb/main.exe > 2650 bytes in ROM > 55 bytes in RAM > msp430-objcopy --output-target=ihex build/telosb/main.exe > build/telosb/main.ihex > writing TOS image > > then I got a /build/telosb folder with following files > > -rw-r--r-- 1 matianfu matianfu 164720 2008-09-26 13:28 app.c > -rw-r--r-- 1 matianfu matianfu 175 2008-09-26 13:28 ident_flags.txt > -rwxr-xr-x 1 matianfu matianfu 11430 2008-09-26 13:28 main.exe > -rw-r--r-- 1 matianfu matianfu 7595 2008-09-26 13:28 main.ihex > -rw-r--r-- 1 matianfu matianfu 7952 2008-09-26 13:28 tos_image.xml > > main.exe is 11K and ihex file is about 7.6K, what is the difference > between them? if ihex is the final image running on msp430 MCU, then > what is the target platform for main.exe file? I am really confused. > Furthermore. MAKE command prints 2650 Byte in ROM and 55 Bytes in RAM. These are sizes (pretty close) of number of bytes in FLASH (ROM) and how much RAM is used up. So yes these will run on your MSP variant. > > Why they are so smaller than the size of main.exe or ihex file? and if > I have an msp430 mcu with only 4K Flash and 512B ram, could this app > run on it? How could I just if the MCU has enough rom/ram for certain > app? by MAKE command print or file size of main.exe/ihex ? I don't know what that last question meant. eric > > > Thanks in advance. > > Tianfu Ma > _______________________________________________ > Tinyos-help mailing list > [email protected] > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help > -- Eric B. Decker Senior (over 50 :-) Researcher Autonomous Systems Lab Jack Baskin School of Engineering UCSC
_______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
