KMyres,
PropellerIDE has no idea about Spin language features. Apart from that required to do syntax highlighting of the source code. It is only an editor/IDE that uses a compiler to do the work.
The compiler in question is OpenSpin.
As far as I can tell OpenSpin does not support #define, #ifdef etc. Originally it was functionally equivalent of the PropTool compiler and I see no mention of these features in the git log of the development history.
This is something we should campaign for. I too have Spin programs that need #ifdef etc.
OpenSpin has some kind of preprocessor... or even two alternative implementations of how to preprocess... see -p and -a below:
(yeti@aurora:1)~$ /opt/openspin/bin/openspin Propeller Spin/PASM Compiler 'OpenSpin' (c)2012-2015 Parallax Inc. DBA Parallax Semiconductor.Version 1.00.77 Compiled on May 29 2015 16:30:38usage: openspin [ -h ] display this help [ -L or -I <path> ] add a directory to the include path [ -o <path> ] output filename [ -b ] output binary file format [ -e ] output eeprom file format [ -c ] output only DAT sections [ -d ] dump out doc mode [ -t ] output just the object file tree [ -f ] output a list of filenames for use in archiving [ -q ] quiet mode (suppress banner and non-error text) [ -v ] verbose output [ -p ] disable the preprocessor [ -a ] use alternative preprocessor rules [ -D <define> ] add a define [ -M <size> ] size of eeprom (up to 16777216 bytes) [ -s ] dump PUB & CON symbol information for top object [ -u ] enable unused method elimination <name.spin> spin file to compile
Maybe we need to search the documentation now...
KMyres,
No, no OpenSpin DOES support #define #idef etc
I was correcting myself by posting a link to the documentation about it above. Sorry I did not spell it out clearly there. I'll do that now.
KMyres,
I have not played with the pre-processor in OpenSpin. It is possible that it is not entirely with the syntax of the BST pre-processor or perhaps not functionally equivalent.
Be prepared to experiment. Would be interested in the results.
Comments
PropellerIDE has no idea about Spin language features. Apart from that required to do syntax highlighting of the source code. It is only an editor/IDE that uses a compiler to do the work.
The compiler in question is OpenSpin.
As far as I can tell OpenSpin does not support #define, #ifdef etc. Originally it was functionally equivalent of the PropTool compiler and I see no mention of these features in the git log of the development history.
This is something we should campaign for. I too have Spin programs that need #ifdef etc.
(yeti@aurora:1)~$ /opt/openspin/bin/openspin Propeller Spin/PASM Compiler 'OpenSpin' (c)2012-2015 Parallax Inc. DBA Parallax Semiconductor.Version 1.00.77 Compiled on May 29 2015 16:30:38usage: openspin [ -h ] display this help [ -L or -I <path> ] add a directory to the include path [ -o <path> ] output filename [ -b ] output binary file format [ -e ] output eeprom file format [ -c ] output only DAT sections [ -d ] dump out doc mode [ -t ] output just the object file tree [ -f ] output a list of filenames for use in archiving [ -q ] quiet mode (suppress banner and non-error text) [ -v ] verbose output [ -p ] disable the preprocessor [ -a ] use alternative preprocessor rules [ -D <define> ] add a define [ -M <size> ] size of eeprom (up to 16777216 bytes) [ -s ] dump PUB & CON symbol information for top object [ -u ] enable unused method elimination <name.spin> spin file to compile
Maybe we need to search the documentation now...
https://code.google.com/p/open-source-spin-compiler/wiki/Preprocessor may be a start...
Here you go, documentation for the PropellerIDE/OpenSpin preprocessor support:https://github.com/parallaxinc/OpenSpin/wiki/Preprocessor
Odd there is no mention of it in the source code change log.
It was in the Google code days when the preprocessor was added and probably the migration killed the old code's evolution steps and so the logs too...
No, no OpenSpin DOES support #define #idef etc
I was correcting myself by posting a link to the documentation about it above. Sorry I did not spell it out clearly there. I'll do that now.
I have not played with the pre-processor in OpenSpin. It is possible that it is not entirely with the syntax of the BST pre-processor or perhaps not functionally equivalent.
Be prepared to experiment. Would be interested in the results.