I swear I answered this exact same question before; is the question
homework for a class?

tos-set-symbols can only list/set symbols which, well, reside in the
symbol table.

enum{
       symbol_1=1,
       symbol_2=2
};
-- Nope, enums are compile-time constructs. The names never make it
into the binary.

#define symbol_4 10
-- Nope, macros are replaced by the CPP. The names never make it to
the actual C compilation.

uint8_t symbol_3=10;
-- Maybe:

In the latter case, symbol_3 MUST:
1) be defined outside of any function; this ensures that it will exist
in the symbol table
2) must be used in a non-static way so that it is not optimized out
during compilation
[There might also be some nifty compiler flag; don't ask me what it would be.]

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

Reply via email to