Closed sinanyil81 closed 7 years ago
It isn't a language issue.
it is a header issue.
TI defines C as..
not a good idea but what they did.
its like one goes out and defines say uint8_t as something else.
another one is FAIL.
the tinyos code handles this problem by doing...
// redefine ugly defines from msp-gcc
It isn't a language problem.
Dear all,
I am trying to develop a system with nesC only (not using TinyOS). My target platform is msp430. Since I need a "main", I created a component which has
int main () @spontaneous() @C() { ... }
However, the nesC compiler does not compile things when is included. After spending a couple of days, I realized that the NesC compiler gives an error for '@C()' and I solved the issue by creating another header file as
ifndef _MSP430_H
define _MSP430_H
include
// otherwise the nesC compiler gives error for @C() definition
undef C
endif
So, I guess that @C() and the C flag in the real msp430,h conflicts and makes nesC compiler confused. Maybe this is an issue that needs to be resolved in the following versions of nesC language. What do you think?
Cheers,
Sinan