Hi Michiel,

Due to your help, now I can do what I want. Actually the commands that you
mentioned doesn't create main.exe. but your ideas have given me a clue to
attack this problem.

First I execute 'CFLAGS=-v make micaz &> make.txt' for Null application.
After I remove main.exe created and edit app.c like I wanted. So from
make.txt I extract the following commands:


   -  /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/ccuR4KfU.o -O0 -Wall -Wshadow -version
   -fdollars-in-identifiers --param max-inline-insns-single=100000 -o
   /tmp/ccPAxkTT.s


   - /usr/bin/avr-as -mmcu=atmega128 -o /tmp/ccuR4KfU.o /tmp/ccPAxkTT.s


   -

    /usr/bin/avr-ld -m avr5 -Tdata 0x800100 -o build/micaz/main.exe
   /usr/lib/gcc/avr/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/ccuR4KfU.o -lm -lgcc
   -lc -lgcc

And then main.exe was created like I wanted.

Thanks for your help and I expect that this thread could help someone later.

Best Regards

Rafael de Oliveira Costa, M.Sc. Student
PPGI - UFRJ
Rio de Janeiro, RJ, Brazil
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




On Fri, Jan 13, 2012 at 6:38 AM, Michiel Konstapel <[email protected]>wrote:

> 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****
>
> "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