Picaxe Compiler -- is anyone using it? Any development going on?

wapo54001

Senior Member
I have become interested in using the Picaxe compiler, and am surprised to find that it seems there is no recent discussion about it and no visible development of any tools to take advantage of it beyond the simple command line instructions which are six years old. The documentation on the Picaxe website is titled "Pre-release beta tester information v0.1 © Revolution Education Ltd 2008."

The forum for it is filled with minor problems encountered but I can't find any discussion about how to take advantage of the benefits. All of the discussion about programming multiple chips seems dated and impractical, and there is no discussion about using multiple AXE cables from multiple USB ports and whether or not simultaneous programming could be multi-tasked that way.

Is anyone using it for the obvious purposes -- faster chip programming, distributing compiled (therefore protected) Picaxe code, etc?

By the way, how secure is the code once compiled? Not as secure as the code programmed into a Picaxe, I assume?

Is there a GUI front-end out there anywhere? hippy have you abandoned your project?
 

premelec

Senior Member
If you want to try a compiler there apparently is a trial version http://pbp3.com/ from Micro Engineering Labs who have been making compilers for PICs for many years - but if you want to do it regularly it's pretty expensive [$250?] for the program - perhaps there is someone offering a compiling service for fee.
 

rs2845

Senior Member
I'm considering using it for a simple "firmware upgrade" for the control panel of an alarm system still under development. That way I can make more of a use out of my commissioning and maintenance application.

I don't think there's any huge difference when it comes to programming these chips. The code gets there one way or another. I just like that this way PE is hidden and it's only my program that would be on show.
 

wapo54001

Senior Member
I remember a discussion years ago in which the compiler was discussed as a means to send code to an end user for updating a chip and the advantage was that the program could not be read or copied or reverse engineered once it was compiled. Is that a dead issue?

Also I assumed that using the compiler in a batch file was a way to program a chip with minimum intervention.

I was hoping to use multiple USB ports supporting multiple USB-to-serial cables for simultaneous programming of more than one chip by using multiple batch files with a different com port specified for each programming operation.

Also isn't there is less chance of a compiled program being compromised during the loading process? A text program open in PE can always inadvertently be changed with the slip on the keyboard.
 

AllyCat

Senior Member
Hi,

Are you discussing programming a "raw" PIC using a PIC Programmer, or a PICAXE via its embedded bootloader? AFAIK, the latter bootloading process is "secret", but I guess you could run multiple instances of PE, each wth its own virtual (USB) serial port, if you really wanted to.


the compiler was discussed as a means to send code to an end user for updating a chip and the advantage was that the program could not be read or copied or reverse engineered once it was compiled.
But (a file of) compiled code is likely to be less secure than a programmed PIC(axe) chip. Raw PIC compiled code can be reverese engineered (dependeing on the competence of the engineer) because the opcodes are all defined in the PIC Data Sheet. PICAXE "compiled" code is not officially documented, but I suspect that the interpreter code (i.e. the output of the PE) could be reverse engineered by a serious hacker. However, IMHO there may not be much PICaxe code which is worthy of reverse engineering from the Basic code, rather than from a Functionality or Requirements Specification. ;)

Converesely, code programmed into a PIC chip (including the embedded PICaxe interpreter/bootloader and any user's code programmed via the bootloader) should be "completely" secure, because Microchip have designed their chips with the ability to (fully) protect their customers "Intellectual Property".

Cheers, Alan.
 

WHITEKNUCKLES

New Member
I used the Picaxe Programmer wizard to convert a Picaxe Basic program to Hex and program a 12F675 with identical functionality.
After several attempts it finally worked on an older computer running Programming Editor 4.1.2 which still holds both versions.
I found the effort interesting and instructive, posting the results on 07-03-2014 and was informed at one time that an uprated version would be in PE 6.

Dave

http://www.picaxeforum.co.uk/showthread.php?25536-programmin-a-normal-PIC&p=259338#post259338
 

Circuit

Senior Member
I'm considering using it for a simple "firmware upgrade" for the control panel of an alarm system still under development. That way I can make more of a use out of my commissioning and maintenance application.

I don't think there's any huge difference when it comes to programming these chips. The code gets there one way or another. I just like that this way PE is hidden and it's only my program that would be on show.
Have you considered loading a program into Slot#6 on an eeprom and then using the PICAXE BOOTI2C command (Manual 2, page 38)? Then you can upgrade your PICAXE chip on site without ever showing your code or Programming Editor etc. at all.
 

wapo54001

Senior Member
OK, so maybe using the compiler to update code is not useful. It seems to me that an encrypted operation was envisaged at one time, but all of this is now in a fairly distant past.

Then, what about benefits when programming a chip? If the compiler can be used from a command line, maybe it would be useful to program more than one slot in a single operation? As in a batch file with contents something like this:

picaxe28X2 –cCOM7 slot0_program.bas
picaxe28X2 –cCOM7 slot1_program.bas
picaxe28X2 –cCOM7 slot2_program.bas

And could you then simultaneously run multiple copies of this batch program with different cCOMX so that you could program all slots in one operation and do it to multiple chips at one time? It appears that you can run multiple copies of the command window simultaneously, so Windows can probably handle it . . .
 

srnet

Senior Member
When PE6 was announced, it was said the intention was to release a compiler that would turn most\any PICAXE basic programs into a HEX file that could be used to program raw PIC processors.

Not much has been heard about that for a while .................
 

hippy

Technical Support
Staff member
When PE6 was announced, it was said the intention was to release a compiler that would turn most\any PICAXE basic programs into a HEX file that could be used to program raw PIC processors.
The plan is to provide an option for PE6 which will convert PICAXE Basic into Microchip Assembler language which can then be used with Microchip and compatible tools to produce HEX files and program PICmicro devices -

http://www.picaxeforum.co.uk/showthread.php?23670-Compile-a-BAS-file-as-an-HEX-file-and-upload-to-PICAXE-Possible&p=235612&viewfull=1#post235612

I remember a discussion years ago in which the compiler was discussed as a means to send code to an end user for updating a chip and the advantage was that the program could not be read or copied or reverse engineered once it was compiled. Is that a dead issue?
That is also a future feature to come for PE6, and I believe it would also be supported by the standalone compilers.

I was hoping to use multiple USB ports supporting multiple USB-to-serial cables for simultaneous programming of more than one chip by using multiple batch files with a different com port specified for each programming operation.
That should indeed be possible with the compilers as they are, likewise for downloading multiple slot programs.

The compilers can be invoked directly on a command line, called from within batch files, or executed by user-coded command line programs or Windows application.
 

wapo54001

Senior Member
hippy, thank you for the information which clarifies what is currently possible and what (perhaps) is coming sometime down the road but no one should be holding their breath in anticipation.

Some folks have mentioned from time to time selling boards controlled by Picaxes; my eyes glaze over at the idea of using the F5 key in PE to program a lot of 3-slot chips one chip at a time since it takes long enough for one slot of one chip to program . . .
 

Circuit

Senior Member
my eyes glaze over at the idea of using the F5 key in PE to program a lot of 3-slot chips one chip at a time since it takes long enough for one slot of one chip to program . . .
Have you optimised the operation of your AXE027 cable with reference to http://www.picaxe.com/docs/axe027_settings.pdf - Section B) Improving the AXE027 PICAXE USB Cable download speed..."...you can approximately halve your overall download time". Perhaps your eyes will now only half glaze over! Seriously, it makes a difference.
Also, lots of discussion about bulk programming here http://www.picaxeforum.co.uk/showthread.php?16836-Best-way-to-mass-program-08-chips.
 

wapo54001

Senior Member
Have you optimised the operation of your AXE027 cable with reference to http://www.picaxe.com/docs/axe027_settings.pdf - Section B) Improving the AXE027 PICAXE USB Cable download speed..."...you can approximately halve your overall download time". Perhaps your eyes will now only half glaze over! Seriously, it makes a difference.
Also, lots of discussion about bulk programming here http://www.picaxeforum.co.uk/showthread.php?16836-Best-way-to-mass-program-08-chips.
I had not seen the optimization PDF, and I'll definitely follow up with that if it can be done with the command line compiler approach. One of the problems I have with using PE to program multiple chips is that the program is open in the editor while the programming happens. That means a small slip of a finger on the keyboard could alter the program and lead to a lot of misprogrammed chips. The command line compiler is much more reliable in that regard.

I had previously found the link to the mass production thread and thought it was pretty much useless information except for the post regarding batch files. I'm going to follow up and look at that closely to see if there are ideas that would work for me.
 

hippy

Technical Support
Staff member
One of the problems I have with using PE to program multiple chips is that the program is open in the editor while the programming happens. That means a small slip of a finger on the keyboard could alter the program and lead to a lot of misprogrammed chips.
It is possible and one might be unlucky enough to not create a syntax error.

PE6 allows the source code ( some or all ) to be set as read only so it can be protected from accidental key press changes -- Right-click over selected text, "Read Only" towards the bottom of the pop-up menu.

Text can be added at the end of the source code but that should not affect the operation of well written programs.
 

wapo54001

Senior Member
It is possible and one might be unlucky enough to not create a syntax error.

PE6 allows the source code ( some or all ) to be set as read only so it can be protected from accidental key press changes -- Right-click over selected text, "Read Only" towards the bottom of the pop-up menu.

Text can be added at the end of the source code but that should not affect the operation of well written programs.
hippy, I didn't know that, thank you.
 
Last edited:
Top