#picaxe 20x2

adub

New Member
When axePad first came out I happily put in on my linux box and now no longer even have a windows computer to test on. (Wife won't let me touch hers!)

"#picaxe 20x2" or any of the picaxe versions is not accepted by axePad. When I first started using Pad I didn't care, even though it "broke" some existing code, I figured it would be fixed later and just remmed it out.

....now I'm wondering...why?

It was a very handy directive so I wouldn't have to change the Pad's options when changing between picaxes. Was it an oversight, or just an unused directive, or just not reported?

Will it ever be working for the axePad?
 

hippy

Technical Support
Staff member
AXEpad works slightly differently to Programming Editor so #PICAXE is used by each specific compiler to check the code is intended for the PICAXE the compiler supports, rather than altering the options to select the compiler to use. Thus ...

#Picaxe 08M
Let b0 = 1

Should compile okay when PICAXE-08M is selected in View -> Options -> Mode but not otherwise.

There does seem to be an issue ( with Windows AXEpad ) when the program consists of a single line #PICAXE directive, generating a syntax error even though the Option -> Mode matches the PICAXE specified. We will investigate this, but it should not affect other programs with more than just a #PICAXE directive. This may be what you are seeing with Linux AXEpad ?

We will investigate the situation with regards to Linux, and particularly in respect of the 20X2 - The 20X2 compiler should accept #PICAXE 20X2 without error.

AXEpad was primarily intended as a means to enable easier multi-platform PICAXE development so there were slightly different design decisions to Programming Editor. One of those was how to handle # directives. Handling of the #PICAXE directive in the same way as Programming Editor requires full pre-parsing of the source code within AXEpad itself before invoking the compiler. That is presently not included but we may consider adding that in the future.
 
Last edited:

adub

New Member
Yep. You describe exactly the behavior I am seeing.

When I was using windows the directive actually set the options for me so I did not have to manually change the type of chip I was using.

I was useing 08m's, 14m's, and 18x's often at the same time. It was nice to be able to add the #picaxe directive in the code instead of manually changing when going from chip to chip. Where now all it does is error out till I change the optoon manually.
 
Top