Shop OBEX P1 Docs P2 Docs Learn Events
compiler options/directives — Parallax Forums

compiler options/directives

bozobozo Posts: 70
edited 2010-10-02 06:12 in Propeller 1
Hi all,

I suspect that the answer is no, but I'll ask anyway:

Is there any way to get the Propeller Tool to compile & load conditionally?

In my development code I fire up some cogs for debugging and simulation etc, but in the production version I don't want that code in there. It would be good to be able to include or exclude chunks of code conditionally, based on whether I defined a constant as 'development' or 'production' (for example).

Or do I have to just manually comment out the code that I don't want in the final product?

Cheers,
Mark

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2010-09-30 19:26
    The Propeller Tool does not have conditional compilation/assembly, but BST does. This is a free 3rd party compiler/assembler/IDE for the Propeller that is also cross platform. There are versions for Windows, Linux, and the MacOS. There's a link to it on the Propeller Downloads webpage (here). I use it all the time.
  • Cluso99Cluso99 Posts: 18,069
    edited 2010-09-30 20:49
    bst is a great tool for this. ZiCog uses the conditionals to compile various hardware implementations.
  • bozobozo Posts: 70
    edited 2010-10-02 06:12
    Wow.

    I just had a play with bst on my macbook.

    I would have PAID for this.

    Now I can just about scrap parallels.

    Is there any way to turn on indention marker lines to guide me with indented code?

    cheers,
Sign In or Register to comment.