Shop OBEX P1 Docs P2 Docs Learn Events
MACROS? with Propeller SPIN tool — Parallax Forums

MACROS? with Propeller SPIN tool

DavidMDavidM Posts: 630
edited 2010-02-08 22:04 in Propeller 1
HI,

Is there, or are there any plans to include some kind of "MACRO" functionality in the propeller tool?

i.e
I would like to have a small window appear when I compile that will list some variables ( and constants etc ) so I can change them for each compile.
I would like to have default values appear in the fields first, so that I can quickly compile with current values, but when I compile for production purposes I would like to change certain fields.

eg.

Serial numbers, base address, firmware/hardware versions, model number etc,

Sometimes I use the same spin software for several different versions of similar hardware and sometimes there are slight changes to say the i/o pins etc, It is difficult to maintain 2 version of the spin code.

I think a macro ( that is optional of course) could solve this problem.

My idea is that at the we could define a BLOCK called "MAC" for holding special code that runs at the start of compiling, this would hold the variable type and it name that appears in the window befor compiling, and would also include it default value.

eg ( very roughly thought of..)
MAC

  "Hardware Version ?" , LONG, HardVers = 1                    
  "     Serial Number ?",  STRING, SerNum = "0000000"




Thanks

Dave M

Comments

Sign In or Register to comment.