Hello all,

i'm trying to invoke one function from a C file which has been generated
with the option -fnesc-cfile of the nesc compiler.  Each one of the
functions prototypes in this C file uses the dollar symbol in order to
separate the component names and the final function invoked, for example,
PhotoTempM$InternalTempADC$getData().

I have automatically generated a header file for the C file and included
into my application.  However, when I compile my application for the 'pc'
platform I get the next error:

[EMAIL PROTECTED] make pc

mkdir -p build/pc
    compiling Ejemplo to a pc binary
ncc -o build/pc/main.exe -g -O0 -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_USER_ID=\"root\" -DIDENT_HOSTNAME=\"comodin\"
-DIDENT_USER_HASH=0x28ea6fa8L -DIDENT_UNIX_TIME=0x466e0205L
-DIDENT_UID_HASH=0x107262b2L -I../../include
-I/opt/tinyos-1.x/tos/platform/avrmote/ 
-I/opt/tinyos-1.x/usr/local/avr/include/avr Ejemplo.nc -lm
../../lib/libdrv.a
gcc-_fnesc-gcc=gcc-specs=/usr/local/lib/ncc/tdspecs-_fnesc-include=nesc_nx-I/usr/local/lib/ncc-DPLATFORM_PC-DBOARD_MICASB-_fnesc-include=tos-obuild/pc/main.exe-g-O0-pthread-_fnesc-nido-tosnodes=1000-_fnesc-simulate-Wall-Wshadow-DDEF_TOS_AM_GROUP=0x7d-_Wnesc-all-_fnesc-cfile=build/pc/app.c-DIDENT_USER_ID="root"-DIDENT_HOSTNAME="comodin"-DIDENT_USER_HASH=0x28ea6fa8L-DIDENT_UNIX_TIME=0x466e0205L-DIDENT_UID_HASH=0x107262b2LEjemplo.nc-lm../../lib/libdrv.a-_fnesc-target=pc-_fnesc-simulate-I../../include-I/opt/tinyos-1.x/tos/platform/avrmote/-I/opt/tinyos-1.x/usr/local/avr/include/avr-I/opt/tinyos-1.x/tos/sensorboards/micasb-I/opt/tinyos-1.x/tos/platform/pc-I/opt/tinyos-1.x/tos/interfaces-I/opt/tinyos-1.x/tos/types-I/opt/tinyos-1.x/tos/system-DNESC=127-fdollars-in-identifiersnesC
does not support $ in identifiersIn file included from EjemploM.nc:13,
../../lib/libdrv.a(drv_sensor.o)(.text+0x347): In function
`read_sensor_temperature':
: undefined reference to `PhotoTempM$InternalTempADC$getData'
collect2: ld returned 1 exit status
make: *** [exe0] Error 1

I have read that the nesc compiler does not support dollar in identifiers,
could be that the problem? The 'PhotoTempM$InternalTempADC$getData' symbol
exists in the object file and therefore, I do not understand which is the
problem, can someone help me?

Other question, knows someone how this C file is generated from a nc file?
Why the '$' symbol is used to separate the component names?

Thank you very much and regards,
Soledad Escolar.

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

Reply via email to