If you pass the "verbose" flag to the compiler, you'll get a whole lot
of output, which includes the exact commands being run:

$ CFLAGS=-v make micaz

 

After a lot of lines like "preprocessing .../tos/system/RealMainP.nc"
there should be two that are the actual compiling and linking of app.c:

 

avr-gcc -B/usr/lib/ncc -mmcu=atmega128 -Os -Wall -Wshadow -v --param
max-inline-insns-single=100000 -o /tmp/cczlxPaS.o -c
-fdollars-in-identifiers build/micaz/app.c

 

/usr/bin/../lib/gcc/avr/4.1.2/../../../../avr/bin/ld -m avr5 -Tdata
0x800100 -o build/micaz/main.exe
/usr/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr5/crtm128.o
-L/usr/bin/../lib/gcc/avr/4.1.2/avr5 -L/usr/lib/gcc/avr/4.1.2/avr5
-L/usr/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr5 /tmp/cczlxPaS.o
-lm -lgcc -lc -lgcc

 

I think you should be able to run those two after modifying app.c to get
your main.exe.

 

Hope this helps,

Michiel 

 

From: [email protected]
[mailto:[email protected]] On Behalf Of Rafael
de Oliveira Costa
Sent: donderdag 12 januari 2012 17:11
To: tinyos-help
Subject: [Tinyos-help] compile an application after create app.c

 

Hi,

When I execute 'make micaz' command to compile RadioSenseToLeds the
following command is executed to compile this application and create
main.exe:

ncc -o build/micaz/main.exe  -O0 -fnesc-separator=__ -Wall -Wshadow
-Wnesc-all -target=micaz -fnesc-cfile=build/micaz/app.c -board=micasb
-DDEFINED_TOS_AM_GROUP=0x22 --param max-inline-insns-single=100000
-DIDENT_APPNAME=\"RadioSenseToLed\" -DIDENT_USERNAME=\"rafael\"
-DIDENT_HOSTNAME=\"home\" -DIDENT_USERHASH=0x8c73b18eL
-DIDENT_TIMESTAMP=0x4f0f0347L -DIDENT_UIDHASH=0x9eee1515L
-fnesc-dump=wiring -fnesc-dump='interfaces(!abstract())'
-fnesc-dump='referenced(interfacedefs, components)'
-fnesc-dumpfile=build/micaz/wiring-check.xml RadioSenseToLedsAppC.nc -lm

ncc can be created like this because it accepts any nescc option and any
gcc option. My question is: can I create app.c for RadioSenseToLeds and
then create main.exe with this created app.c ? This is because I need to
make some modifications in app.c before create main.exe

any ideas ?



Rafael de Oliveira Costa, M.Sc. Student
PPGI - UFRJ
Rio de Janeiro, RJ, Brazil
http://www.labnet.nce.ufrj.br <http://www.labnet.nce.ufrj.br/> 

"If the doors of perception were cleansed every thing would appear to
man as it is, infinite", William Blake

 

 

_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to