Akankshu,

CFLAGS is usually the flags you pass to gcc (or in this case ncc). It simply is a lit of command line parameters that you pass to the program. To see what various flags do, you should look at the man pages for gcc/ncc. In general, the flag -D<SOMETHING> it basically is the same as if you had typed #define <SOMETHING> in your code. -D<SOMETHING>=### it's the same as #define <SOMETHING> ###.

-Paul

Akankshu Dhawan wrote:
Hi Paul
I dont have a similar problem but I want to learn about using CFLAGS and PLFAGS in tinyoy-2.x. I have used some of them when people have told me and for the most part they have worked but I want to learn about the usage and different such flags ?


I look forward to hearing from someone

Akankshu

On Fri, Nov 13, 2009 at 1:10 PM, Paul Johnson <[email protected] <mailto:[email protected]>> wrote:

    I am not aware of many people that are still using tinyos 1.x, so
    I doubt you will be able to get any sort of authoritative response
    from anyone.  Since the compiler is complaining about
    TOSH_NUM_NODES, have you considered adding to your Makefile a line
    like this:
    CFLAGS += -DTOSH_NUM_NODES=###

    where ### is the number of nodes in your experiment.  Most likely
    something is referring to this #define and since it's not defined,
    it's giving an error. Look at the file indicated:

    /opt/tinyos-1.x/tos/platform/pc/nido.h:63

    To see what the issue is.

    -Paul

    Arslan Shahid wrote:




    I'm currently following the Lesson 5 (TOSSIM) from the TinyOS 1.x
    Tutorial,
    in which I'm supposed to compile CntToLedsAndRfm application. In that step i
    found problems running the "make pc", and I realized that it happens for
    other applications. It shows:

    xubun...@xubuntos-tinyos:/opt/tinyos-1.x/apps/CntToLedsAndRfm$ 
<mailto:xubun...@xubuntos-tinyos:/opt/tinyos-1.x/apps/CntToLedsAndRfm$> make pc
    mkdir -p build/pc
        compiling CntToLedsAndRfm to a pc binary
    ncc -o build/pc/main.exe -g -O0 -I%T/lib/Counters -pthread
    -fnesc-nido-tosnodes=1000 -fnesc-simulate -Wall -Wshadow
    -DDEF_TOS_AM_GROUP=0x7d -Wnesc-all -target=pc -fnesc-cfile=build/pc/app.c
    -board=micasb -DIDENT_PROGRAM_NAME=\"CntToLedsAndRfm\"
    -DIDENT_USER_ID=\"xubuntos\" -DIDENT_HOSTNAME=\"xubuntos-tinyos\"
    -DIDENT_USER_HASH=0x00f95284L -DIDENT_UNIX_TIME=0x4addfadcL
    -DIDENT_UID_HASH=0xaa66b4d0L CntToLedsAndRfm.nc -lm
    In file included from /opt/tinyos-1.x/tos/platform/pc/hardware.h:43,
                     from /opt/tinyos-1.x/tos/system/tos.h:144:
    /opt/tinyos-1.x/tos/platform/pc/nido.h:63: `TOSH_NUM_NODES' undeclared here
    (not in a function)
    /opt/tinyos-1.x/tos/platform/pc/nido.h:63: enumerator value for `TOSNODES'
    not integer constant
    make: *** [exe0] Error 1


    Someone on the mailing list suggested to add the flag
    -fnesc-nido-tosnodes=1000 on the .target file found in
    /opt/tinyos-1.x/tools/make, but the flags are there, and as it is seen in
    the output above, they appear in the ncc command...

    So, i don't know if I missed make, or if there are any other files of TinyOS
    2.x that conflict with the 1.x version... How to fix this error?
    My environment is the xubuntos distribution, running it's image in VMWare
    Player.

    I crucially appreciate all the help. Thanks in advance!


    ------------------------------------------------------------------------
    Bing brings you maps, menus, and reviews organized in one place.
    Try it now.
    
<http://www.bing.com/search?q=restaurants&form=MFESRP&publ=WLHMTAG&crea=TEXT_MFESRP_Local_MapsMenu_Resturants_1x1>

    ------------------------------------------------------------------------

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

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




--
First they ignore you, then they laugh at you, then they fight you, then you win.
- Mahatma Gandhi
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to