Hello,

On Sat, Oct 23, 2010 at 2:20 PM, Francisco Sant'anna <
[email protected]> wrote:

> I have a C project that uses different "backends" than just nesC.
> I'd rather keep a single file and use a mechanism to interface with the
> different backends.
> From inside my code I use a macro named OUTPUT, which is the single point
> that has to be redefined for each "backend".
> For nesC I would like the following to work:
>
> #define OUTPUT(id, size, buf)    signal IO.output(id, size, buf)
>
> This of course does not work, as the right part is nesC specific.
> I examined the generated app.c in the build directory, and came up with
> this:
>
> #define OUTPUT(id, size, buf)    MYPRJC$IO$output(id, size, buf)
>
> Now it complains about the '$' character:
>
> ../myprj.c:156: stray $ in program
>
> Is there a solution for this?
>

Problem solved, I found the flag  -fnesc-separator in the nesC compiler.
Now I can mix C/nesC files.

-- 
Francisco Sant'Anna
http://www.lua.inf.puc-rio.br/~francisco/<http://www.lua.inf.puc-rio.br/%7Efrancisco/>
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to