Hi Gary, Sorry for the late reply.
On Sun, Sep 16, 2012 at 4:21 AM, Gary Lee <gary.lee1...@gmail.com> wrote: > Hi András, > > > Thanks for your reply. > > > I am using TinyOS 2.1.1. I have added “BOOTLOADER=tosboot” in the Makefile. > After “make micaz verbose”: > > 1. 1. I have tos/lib/tosboot, but no tos/lib/tosboot/build directory. So > I cannot find the other image (for the bootloader) you mention; Go through the Deluge T2 wiki page (the first step of the quickstart is the tosboot compilation): http://docs.tinyos.net/tinywiki/index.php/Deluge_T2 > > 2. 2. I attach the output of “make micaz verbose” in this email. make micaz will just compile your application, not the bootloader. You should compile the tosboot and your application. After that, make micaz install from the application's directory will install both of them. Andris > > Thanks a lot. > > > Gary > > > nescc: 1.3.4 > > NCDIR="/usr/lib/ncc" > > NESCC_ARGS="-fnesc-include=nesc_nx -fnesc-include=tos > -fnesc-scheduler=TinySched > ulerC,TinySchedulerC.TaskBasic,TaskBasic,TaskBasic,runTask,postTask > -fnesc-separ ator=__ -Wnesc-all > -fnesc-dump=wiring -fnesc-dump=interfaces\(\!abstract\(\)\) - > fnesc-dump=referenced\(interfacedefs,\ components\) > -fnesc-dumpfile=build/micaz/ wiring-check.xml > -fnesc-target=avr -fnesc-no-debug" > > NESCC_CFILE="build/micaz/app.c" > > NESCC_GCC="avr-gcc" > > avr-gcc -specs=/usr/lib/ncc/tdspecs -I/usr/lib/ncc -D PLATFORM_MICAZ -D > BOARD_MI CASB -o build/micaz/main.exe -Os -v > -Wall -Wshadow -D DEFINED_TOS_AM_GROUP=0x22 > --param max-inline-insns-single=100000 -D IDENT_APPNAME="NullAppC" -D > IDENT_USER NAME="root" -D > IDENT_HOSTNAME="ubuntu" -D IDENT_USERHASH=0xa3473ba6L -D IDENT_TI > MESTAMP=0x505540efL -D IDENT_UIDHASH=0xc716f8afL -D DELUGE NullAppC.nc -lm > -mmcu =atmega128 -I > /opt/tinyos-2.1.1/tos/lib/net -I /opt/tinyos-2.1.1/tos/lib/net/dri > p -I /opt/tinyos-2.1.1/tos/lib/net/Deluge -I > /opt/tinyos-2.1.1/tos/lib/net/Delug > e/FlashVolumeManager -I > /opt/tinyos-2.1.1/tos/lib/net/Deluge/BlockStorageManager > -I /opt/tinyos-2.1.1/tos/lib/net/Deluge/extra -I > /opt/tinyos-2.1.1/tos/lib/net/ > Deluge/extra/avr -I /opt/tinyos-2.1.1/tos/lib/net/Deluge/extra/micaz -I > /opt/tin > yos-2.1.1/tos/lib/net/Deluge/extra/mica2 -I > /opt/tinyos-2.1.1/tos/sensorboards/m icasb -I > /opt/tinyos-2.1.1/tos/platforms/micaz -I /opt/tinyos-2.1.1/tos/platform > s/mica -I /opt/tinyos-2.1.1/tos/platforms/micaz/chips/cc2420 -I > /opt/tinyos-2.1. 1/tos/chips/cc2420 -I > /opt/tinyos-2.1.1/tos/chips/cc2420/alarm -I /opt/tinyos-2. > 1.1/tos/chips/cc2420/control -I /opt/tinyos-2.1.1/tos/chips/cc2420/csma -I > /opt/ > tinyos-2.1.1/tos/chips/cc2420/interfaces -I > /opt/tinyos-2.1.1/tos/chips/cc2420/l ink -I > /opt/tinyos-2.1.1/tos/chips/cc2420/lowpan -I /opt/tinyos-2.1.1/tos/chips/ > cc2420/lpl -I /opt/tinyos-2.1.1/tos/chips/cc2420/packet -I > /opt/tinyos-2.1.1/tos /chips/cc2420/receive > -I /opt/tinyos-2.1.1/tos/chips/cc2420/spi -I /opt/tinyos-2 > .1.1/tos/chips/cc2420/transmit -I /opt/tinyos-2.1.1/tos/chips/cc2420/unique > -I / > opt/tinyos-2.1.1/tos/chips/cc2420/security -I > /opt/tinyos-2.1.1/tos/platforms/mi > ca2/chips/at45db -I /opt/tinyos-2.1.1/tos/platforms/mica/chips/at45db -I > /opt/ti nyos-2.1.1/tos/chips/at45db -I > /opt/tinyos-2.1.1/tos/chips/atm128 -I /opt/tinyos > -2.1.1/tos/chips/atm128/adc -I /opt/tinyos-2.1.1/tos/chips/atm128/pins -I > /opt/t inyos-2.1.1/tos/chips/atm128/spi -I > /opt/tinyos-2.1.1/tos/chips/atm128/i2c -I /o > pt/tinyos-2.1.1/tos/chips/atm128/timer -I /opt/tinyos-2.1.1/tos/lib/timer -I > /op t/tinyos-2.1.1/tos/lib/serial -I > /opt/tinyos-2.1.1/tos/lib/power -I /opt/tinyos- > 2.1.1/tos/interfaces -I /opt/tinyos-2.1.1/tos/types -I > /opt/tinyos-2.1.1/tos/sys tem -DNESC=134 > > Using built-in specs. > > Reading specs from /usr/lib/ncc/tdspecs > > Target: avr > > Configured with: ./configure --prefix=/usr --disable-libssp --disable-nls > --enab le-languages=c,c++ > --infodir=/usr/share/info --libdir=/usr/lib --libexecdir=/usr > /lib --mandir=/usr/share/man --target=avr --with-ld=/usr/bin/avr-ld > --with-as=/u sr/bin/avr-as > > Thread model: single > > gcc version 4.1.2 > > perl -S nesc-compile -mmcu=atmega128 -D PLATFORM_MICAZ -D BOARD_MICASB -D > DEFIN ED_TOS_AM_GROUP=0x22 -D > IDENT_APPNAME="NullAppC" -D IDENT_USERNAME="root" -D IDE > NT_HOSTNAME="ubuntu" -D IDENT_USERHASH=0xa3473ba6L -D > IDENT_TIMESTAMP=0x505540ef L -D > IDENT_UIDHASH=0xc716f8afL -D DELUGE -DNESC=134 -I/usr/lib/ncc -I /opt/tinyo > s-2.1.1/tos/lib/net -I /opt/tinyos-2.1.1/tos/lib/net/drip -I > /opt/tinyos-2.1.1/t os/lib/net/Deluge -I > /opt/tinyos-2.1.1/tos/lib/net/Deluge/FlashVolumeManager -I > /opt/tinyos-2.1.1/tos/lib/net/Deluge/BlockStorageManager -I > /opt/tinyos-2.1.1/to s/lib/net/Deluge/extra > -I /opt/tinyos-2.1.1/tos/lib/net/Deluge/extra/avr -I /opt > /tinyos-2.1.1/tos/lib/net/Deluge/extra/micaz -I > /opt/tinyos-2.1.1/tos/lib/net/De > luge/extra/mica2 -I /opt/tinyos-2.1.1/tos/sensorboards/micasb -I > /opt/tinyos-2.1 .1/tos/platforms/micaz -I > /opt/tinyos-2.1.1/tos/platforms/mica -I /opt/tinyos-2. > 1.1/tos/platforms/micaz/chips/cc2420 -I /opt/tinyos-2.1.1/tos/chips/cc2420 > -I /o pt/tinyos-2.1.1/tos/chips/cc2420/alarm > -I /opt/tinyos-2.1.1/tos/chips/cc2420/con > trol -I /opt/tinyos-2.1.1/tos/chips/cc2420/csma -I > /opt/tinyos-2.1.1/tos/chips/c > c2420/interfaces -I /opt/tinyos-2.1.1/tos/chips/cc2420/link -I > /opt/tinyos-2.1.1 /tos/chips/cc2420/lowpan -I > /opt/tinyos-2.1.1/tos/chips/cc2420/lpl -I /opt/tinyo > s-2.1.1/tos/chips/cc2420/packet -I > /opt/tinyos-2.1.1/tos/chips/cc2420/receive -I > /opt/tinyos-2.1.1/tos/chips/cc2420/spi -I > /opt/tinyos-2.1.1/tos/chips/cc2420/tr ansmit > -I /opt/tinyos-2.1.1/tos/chips/cc2420/unique -I /opt/tinyos-2.1.1/tos/chi > ps/cc2420/security -I /opt/tinyos-2.1.1/tos/platforms/mica2/chips/at45db -I > /opt > /tinyos-2.1.1/tos/platforms/mica/chips/at45db -I > /opt/tinyos-2.1.1/tos/chips/at4 5db -I > /opt/tinyos-2.1.1/tos/chips/atm128 -I /opt/tinyos-2.1.1/tos/chips/atm128/ > adc -I /opt/tinyos-2.1.1/tos/chips/atm128/pins -I > /opt/tinyos-2.1.1/tos/chips/at m128/spi -I > /opt/tinyos-2.1.1/tos/chips/atm128/i2c -I /opt/tinyos-2.1.1/tos/chip > s/atm128/timer -I /opt/tinyos-2.1.1/tos/lib/timer -I > /opt/tinyos-2.1.1/tos/lib/s erial -I > /opt/tinyos-2.1.1/tos/lib/power -I /opt/tinyos-2.1.1/tos/interfaces -I > /opt/tinyos-2.1.1/tos/types -I /opt/tinyos-2.1.1/tos/system -Os -Wall > -Wshadow - v -fnesc-tmpcfile=/tmp/ccWAwYDw.c > -o /tmp/ccpfuNAV.o --param max-inline-insns-si > ngle=100000 NullAppC.nc -_ASM > > nesc1 -U__BLOCKS__ -fnesc-include=deputy_nodeputy -fnesc-gcc=avr-gcc > -mmcu=atmeg a128 -DPLATFORM_MICAZ > -DBOARD_MICASB -DDEFINED_TOS_AM_GROUP=0x22 -DIDENT_APPNAME > ="NullAppC" -DIDENT_USERNAME="root" -DIDENT_HOSTNAME="ubuntu" > -DIDENT_USERHASH=0 xa3473ba6L > -DIDENT_TIMESTAMP=0x505540efL -DIDENT_UIDHASH=0xc716f8afL -DDELUGE -D > NESC=134 -I/usr/lib/ncc -I/opt/tinyos-2.1.1/tos/lib/net > -I/opt/tinyos-2.1.1/tos/ lib/net/drip > -I/opt/tinyos-2.1.1/tos/lib/net/Deluge -I/opt/tinyos-2.1.1/tos/lib/ > net/Deluge/FlashVolumeManager > -I/opt/tinyos-2.1.1/tos/lib/net/Deluge/BlockStorag > eManager -I/opt/tinyos-2.1.1/tos/lib/net/Deluge/extra > -I/opt/tinyos-2.1.1/tos/li > b/net/Deluge/extra/avr -I/opt/tinyos-2.1.1/tos/lib/net/Deluge/extra/micaz > -I/opt > /tinyos-2.1.1/tos/lib/net/Deluge/extra/mica2 > -I/opt/tinyos-2.1.1/tos/sensorboard s/micasb > -I/opt/tinyos-2.1.1/tos/platforms/micaz -I/opt/tinyos-2.1.1/tos/platfor > ms/mica -I/opt/tinyos-2.1.1/tos/platforms/micaz/chips/cc2420 > -I/opt/tinyos-2.1.1 /tos/chips/cc2420 > -I/opt/tinyos-2.1.1/tos/chips/cc2420/alarm -I/opt/tinyos-2.1.1 > /tos/chips/cc2420/control -I/opt/tinyos-2.1.1/tos/chips/cc2420/csma > -I/opt/tinyo > s-2.1.1/tos/chips/cc2420/interfaces > -I/opt/tinyos-2.1.1/tos/chips/cc2420/link -I > /opt/tinyos-2.1.1/tos/chips/cc2420/lowpan > -I/opt/tinyos-2.1.1/tos/chips/cc2420/l pl > -I/opt/tinyos-2.1.1/tos/chips/cc2420/packet > -I/opt/tinyos-2.1.1/tos/chips/cc2 420/receive > -I/opt/tinyos-2.1.1/tos/chips/cc2420/spi -I/opt/tinyos-2.1.1/tos/chi > ps/cc2420/transmit -I/opt/tinyos-2.1.1/tos/chips/cc2420/unique > -I/opt/tinyos-2.1 > .1/tos/chips/cc2420/security > -I/opt/tinyos-2.1.1/tos/platforms/mica2/chips/at45d > b -I/opt/tinyos-2.1.1/tos/platforms/mica/chips/at45db > -I/opt/tinyos-2.1.1/tos/ch ips/at45db > -I/opt/tinyos-2.1.1/tos/chips/atm128 -I/opt/tinyos-2.1.1/tos/chips/at > m128/adc -I/opt/tinyos-2.1.1/tos/chips/atm128/pins > -I/opt/tinyos-2.1.1/tos/chips /atm128/spi > -I/opt/tinyos-2.1.1/tos/chips/atm128/i2c -I/opt/tinyos-2.1.1/tos/chi > ps/atm128/timer -I/opt/tinyos-2.1.1/tos/lib/timer > -I/opt/tinyos-2.1.1/tos/lib/se rial > -I/opt/tinyos-2.1.1/tos/lib/power -I/opt/tinyos-2.1.1/tos/interfaces -I/opt > /tinyos-2.1.1/tos/types -I/opt/tinyos-2.1.1/tos/system -Wall -Wshadow -v > -fnesc- tmpcfile=/tmp/ccWAwYDw.c > -fnesc-include=nesc_nx -fnesc-include=tos -fnesc-schedu > ler=TinySchedulerC,TinySchedulerC.TaskBasic,TaskBasic,TaskBasic,runTask,postTask > -fnesc-separator=__ -Wnesc-all -fnesc-dump=wiring > -fnesc-dump=interfaces(!abstr act()) > -fnesc-dump=referenced(interfacedefs, components) -fnesc-dumpfile=build/m > icaz/wiring-check.xml -fnesc-target=avr -fnesc-no-debug NullAppC.nc -o > build/mic az/app.c > > #include "..." and component search starts here: > > #include <...> search starts here: > > /usr/lib/ncc/ > > /opt/tinyos-2.1.1/tos/lib/net/ > > /opt/tinyos-2.1.1/tos/lib/net/drip/ > > /opt/tinyos-2.1.1/tos/lib/net/Deluge/ > > /opt/tinyos-2.1.1/tos/lib/net/Deluge/FlashVolumeManager/ > > /opt/tinyos-2.1.1/tos/lib/net/Deluge/BlockStorageManager/ > > /opt/tinyos-2.1.1/tos/lib/net/Deluge/extra/ > > /opt/tinyos-2.1.1/tos/lib/net/Deluge/extra/avr/ > > /opt/tinyos-2.1.1/tos/lib/net/Deluge/extra/micaz/ > > /opt/tinyos-2.1.1/tos/lib/net/Deluge/extra/mica2/ > > /opt/tinyos-2.1.1/tos/sensorboards/micasb/ > > /opt/tinyos-2.1.1/tos/platforms/micaz/ > > /opt/tinyos-2.1.1/tos/platforms/mica/ > > /opt/tinyos-2.1.1/tos/platforms/micaz/chips/cc2420/ > > /opt/tinyos-2.1.1/tos/chips/cc2420/ > > /opt/tinyos-2.1.1/tos/chips/cc2420/alarm/ > > /opt/tinyos-2.1.1/tos/chips/cc2420/control/ > > /opt/tinyos-2.1.1/tos/chips/cc2420/csma/ > > /opt/tinyos-2.1.1/tos/chips/cc2420/interfaces/ > > /opt/tinyos-2.1.1/tos/chips/cc2420/link/ > > /opt/tinyos-2.1.1/tos/chips/cc2420/lowpan/ > > /opt/tinyos-2.1.1/tos/chips/cc2420/lpl/ > > /opt/tinyos-2.1.1/tos/chips/cc2420/packet/ > > /opt/tinyos-2.1.1/tos/chips/cc2420/receive/ > > /opt/tinyos-2.1.1/tos/chips/cc2420/spi/ > > /opt/tinyos-2.1.1/tos/chips/cc2420/transmit/ > > /opt/tinyos-2.1.1/tos/chips/cc2420/unique/ > > /opt/tinyos-2.1.1/tos/chips/cc2420/security/ > > /opt/tinyos-2.1.1/tos/platforms/mica2/chips/at45db/ > > /opt/tinyos-2.1.1/tos/platforms/mica/chips/at45db/ > > /opt/tinyos-2.1.1/tos/chips/at45db/ > > /opt/tinyos-2.1.1/tos/chips/atm128/ > > /opt/tinyos-2.1.1/tos/chips/atm128/adc/ > > /opt/tinyos-2.1.1/tos/chips/atm128/pins/ > > /opt/tinyos-2.1.1/tos/chips/atm128/spi/ > > /opt/tinyos-2.1.1/tos/chips/atm128/i2c/ > > /opt/tinyos-2.1.1/tos/chips/atm128/timer/ > > /opt/tinyos-2.1.1/tos/lib/timer/ > > /opt/tinyos-2.1.1/tos/lib/serial/ > > /opt/tinyos-2.1.1/tos/lib/power/ > > /opt/tinyos-2.1.1/tos/interfaces/ > > /opt/tinyos-2.1.1/tos/types/ > > /opt/tinyos-2.1.1/tos/system/ > > /usr/lib/gcc/avr/4.1.2/include/ > > /usr/lib/gcc/avr/4.1.2/../../../../avr/include/ > > End of search list. > > preprocessing /usr/lib/ncc/deputy_nodeputy.h > > preprocessing /usr/lib/ncc/nesc_nx.h > > preprocessing /opt/tinyos-2.1.1/tos/system/tos.h > > preprocessing /opt/tinyos-2.1.1/tos/system/TinySchedulerC.nc > > preprocessing /opt/tinyos-2.1.1/tos/interfaces/Scheduler.nc > > preprocessing /opt/tinyos-2.1.1/tos/interfaces/TaskBasic.nc > > preprocessing /opt/tinyos-2.1.1/tos/system/SchedulerBasicP.nc > > preprocessing /opt/tinyos-2.1.1/tos/interfaces/McuSleep.nc > > preprocessing /opt/tinyos-2.1.1/tos/chips/atm128/McuSleepC.nc > > preprocessing /opt/tinyos-2.1.1/tos/interfaces/McuPowerState.nc > > preprocessing /opt/tinyos-2.1.1/tos/interfaces/McuPowerOverride.nc > > preprocessing NullAppC.nc > > preprocessing /opt/tinyos-2.1.1/tos/system/MainC.nc > > preprocessing /opt/tinyos-2.1.1/tos/interfaces/Boot.nc > > preprocessing /opt/tinyos-2.1.1/tos/interfaces/Init.nc > > preprocessing /opt/tinyos-2.1.1/tos/platforms/mica/PlatformC.nc > > preprocessing /opt/tinyos-2.1.1/tos/chips/atm128/timer/Atm128Calibrate.nc > > preprocessing /opt/tinyos-2.1.1/tos/platforms/mica/PlatformP.nc > > preprocessing /opt/tinyos-2.1.1/tos/platforms/micaz/MotePlatformC.nc > > preprocessing /opt/tinyos-2.1.1/tos/platforms/micaz/MotePlatformP.nc > > preprocessing /opt/tinyos-2.1.1/tos/interfaces/GeneralIO.nc > > preprocessing /opt/tinyos-2.1.1/tos/chips/atm128/pins/HplAtm128GeneralIOC.nc > > preprocessing > /opt/tinyos-2.1.1/tos/chips/atm128/pins/HplAtm128GeneralIOPortP.nc > > preprocessing > /opt/tinyos-2.1.1/tos/chips/atm128/pins/HplAtm128GeneralIOPinP.nc > > preprocessing > /opt/tinyos-2.1.1/tos/chips/atm128/pins/HplAtm128GeneralIOSlowPinP > .nc > > preprocessing /opt/tinyos-2.1.1/tos/platforms/mica/MeasureClockC.nc > > preprocessing /opt/tinyos-2.1.1/tos/system/RealMainP.nc > > preprocessing NullC.nc > > avr-gcc -B/usr/lib/ncc -mmcu=atmega128 -Os -Wall -Wshadow -v --param > max-inline- insns-single=100000 -o > /tmp/ccpfuNAV.o -c -fdollars-in-identifiers build/micaz/a > pp.c > > Using built-in specs. > > Target: avr > > Configured with: ./configure --prefix=/usr --disable-libssp --disable-nls > --enab le-languages=c,c++ > --infodir=/usr/share/info --libdir=/usr/lib --libexecdir=/usr > /lib --mandir=/usr/share/man --target=avr --with-ld=/usr/bin/avr-ld > --with-as=/u sr/bin/avr-as > > Thread model: single > > gcc version 4.1.2 > > /usr/lib/gcc/avr/4.1.2/cc1 -quiet -v build/micaz/app.c > -fno-delete-null-pointer -checks -quiet > -dumpbase app.c -mmcu=atmega128 -auxbase-strip /tmp/ccpfuNAV.o -O > s -Wall -Wshadow -version -fdollars-in-identifiers --param > max-inline-insns-sing le=100000 -o > /tmp/cc8JZBhD.s > > ignoring nonexistent directory > "/usr/lib/gcc/avr/4.1.2/../../../../avr/sys-inclu > de" > > #include "..." search starts here: > > #include <...> search starts here: > > /usr/lib/gcc/avr/4.1.2/include > > /usr/lib/gcc/avr/4.1.2/../../../../avr/include > > End of search list. > > GNU C version 4.1.2 (avr) > > compiled by GNU C version 4.4.3. > > GGC heuristics: --param ggc-min-expand=98 --param ggc-min-heapsize=128097 > > Compiler executable checksum: 782902a126eb402d1161a03cfa2f1148 > > /usr/bin/avr-as -mmcu=atmega128 -o /tmp/ccpfuNAV.o /tmp/cc8JZBhD.s > > /usr/bin/avr-ld -m avr5 -Tdata 0x800100 -o build/micaz/main.exe > /usr/lib/gcc/av > r/4.1.2/../../../../avr/lib/avr5/crtm128.o -L/usr/lib/gcc/avr/4.1.2/avr5 > -L/usr/ lib/gcc/avr/4.1.2/avr5 > -L/usr/lib/gcc/avr/4.1.2/../../../../avr/lib/avr5 /tmp/cc > pfuNAV.o -lm -lgcc -lc -lgcc > > compiled NullAppC to build/micaz/main.exe > > 608 bytes in ROM > > 4 bytes in RAM > > avr-objcopy --output-target=srec build/micaz/main.exe build/micaz/main.srec > > avr-objcopy --output-target=ihex build/micaz/main.exe build/micaz/main.ihex > > writing TOS image > > > > > > > > On Sat, Sep 15, 2012 at 5:00 AM, András Bíró <andras.b...@unicomp.hu> wrote: >> >> Hi Gary, >> >> You're both right and not. There are two images, one for the app (in the >> apps/Null/build/... directory), and one for the bootloader (in >> tos/lib/tosboot/build). On the avr platforms, the bootloader goes to the >> last 4k of the flash, therefor the bootloader image is 128kB, but the first >> 124kB is empty (this is achieved with the --section-start=.text=0x1f000 gcc >> flag). So programming goes like this: >> -install app after erasing ROM >> -install bootloader without erasing ROM >> >> Andris >> >> On Sat, Sep 15, 2012 at 4:57 AM, Gary Lee <gary.lee1...@gmail.com> wrote: >>> >>> Dear All, >>> >>> Here is what I do: >>> >>> 1. For the Null application, I run “make micaz”, the image needs >>> 608 byte of ROM and 4 byte of RAM; >>> >>> 2. Then in the Makefile, I add “BOOTLOADER=tosboot”, and I run >>> “make micaz”, the image still needs 608 byte of ROM and 4 byte of RAM; >>> >>> I think the image from 2) should be larger than the image from 1), >>> because 2) includes bootloader, right? >>> >>> >>> Thanks a lot, >>> >>> >>> Gary >>> >>> >>> >>> >>> >>> _______________________________________________ >>> Tinyos-help mailing list >>> Tinyos-help@millennium.berkeley.edu >>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help >> >> > _______________________________________________ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help