Preprocessor?
pmrobert
Posts: 677
I'm working my way through thousands of messages in various threads regarding Spin2 in search of whether a preprocessor was ever added to Spin2. I have found several requests for such an addition but have come to a dead end so far. Apparently I'm striking out - did I not peer deep enough into the evolution of Spin2?
#include, #def, #ifdef, etc., would be very nice. By the way Macca has done an exemplary job with Spin Tools. Thank you Marco!
-Mike R...
Comments
Flexspin supports them.
Chip was talking about it a while back but I suspect it got buried under his ever growing list of todos.
PNut-TS also supports preprocessing, but when I last tested it, it was a bit bugged. Should be fixed by now.
Thank you!
Spin Tools IDE supports C-like preprocessor statements, for both Spin1 and Spin2.
Evan, Ada, Marco - thank you much. This has me headed in a far more organized direction!
-Mike R...
Where can I find documentation on the specifics, Marco? While I tend to keep my code backward-compatible with PNut, it might be time to move past that given PNut is not keeping up with customer needs.
As usual there isn't a documentation (big weak point, I know), however if you have some C experience you can use nearly the same syntax:
These are examples from my P1 vga terminal firmware.
There are some limitations, like can't cross CON/VAR/PRI/PUB/DAT sections.