Shop OBEX P1 Docs P2 Docs Learn Events
Good old BST (Brad's Spin Tool) - Page 4 — Parallax Forums

Good old BST (Brad's Spin Tool)

124»

Comments

  • Heater.Heater. Posts: 21,230
    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. 



     
  • yetiyeti Posts: 818
    edited 2015-07-28 20:19
    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...

    https://code.google.com/p/open-source-spin-compiler/wiki/Preprocessor may be a start...
  • Heater.Heater. Posts: 21,230
    edited 2015-07-29 01:15
    Edit:    OpenSpin DOES support #ifdef #define etc.
    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. 
  • yetiyeti Posts: 818
    edited 2015-07-28 20:26
    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...
  • Heater.Heater. Posts: 21,230
    Crappy migration lost all the old change logs then. Ah well. 
  • Thanks Heater I kinda figured it didnt. 
  • Heater.Heater. Posts: 21,230
    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.
  • Thanks Heater. Tried it once but wasn't ready for prime time. Will try again!
  • Heater.Heater. Posts: 21,230
    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. 
  • @Heater, been to tied up to dl an try it, perhaps this weekend.
Sign In or Register to comment.