Raspberry pi - picaxe editor 6

BENSALVAGE

New Member
Hello, I am looking to create picaxe projects but I want to be able to programme the chips with my raspberry pi, I am running the latest version of raspian Jessie. Is there a way to get editor 6 or even axepad to work on the raspberry. Sorry this is my first post and I look forward to hopefully contributing to the forum
 

hippy

Technical Support
Staff member
Welcome to the PICAXE forum.

Our software is for the X86 architecture rather than ARM but it is possible to run the PICAXE X86 Linux compiler binaries on the Pi ...

http://www.picaxeforum.co.uk/showthread.php?22547-ARM-binaries-for-command-line-compilers

It might be possible to get LinAXEpad to run the same way. Or just use nano or some other text editor to create the program files and then use the command line compilers to syntax check and download.
 

BENSALVAGE

New Member
hello, stevedee i have followed your link and managed to get that far however i have gotten to the point where i need to set up my pins 8 and 10 ive tried using what it says in the configuration but it just showspi@raspberrypi:~ $ sudo pcmanfm
** Message: x-terminal-emulator has very limited support, consider choose another terminal

** (pcmanfm:1273): WARNING **: The directory '~/Templates' doesn't exist, ignoring it
pi@raspberrypi:~ $ /boot/cmdline.txt
/boot/cmdline.txt: line 1: dwc_otg.lpm_enable=0: command not found
pi@raspberrypi:~ $ /boot/cmdline.txt
/boot/cmdline.txt: line 1: dwc_otg.lpm_enable=0: command not found
pi@raspberrypi:~ $ /boot/cmdline.txt

also the point where it says about creating the killer app ive copied that and created the empty file but no luck. can you please assist
 

hippy

Technical Support
Staff member
pi@raspberrypi:~ $ sudo pcmanfm
** Message: x-terminal-emulator has very limited support, consider choose another terminal

** (pcmanfm:1273): WARNING **: The directory '~/Templates' doesn't exist, ignoring it
Executing sudo pcmanfm, after giving the warnings, should have opened a file manager window from which you can select then edit /boot/cmdline.txt.

pi@raspberrypi:~ $ /boot/cmdline.txt
/boot/cmdline.txt: line 1: dwc_otg.lpm_enable=0: command not found
You seem to have got back to the terminal command line and are trying to execute /boot/cmdline.txt as if a shell script, which it isn't, which is giving you the error you are seeing.
 

SteveDee

Senior Member
Executing sudo pcmanfm, after giving the warnings, should have opened a file manager window from which you can select then edit /boot/cmdline.txt....
As hippy says, the sudo pcmanfm command is just so you launch the file manager as root, because you need to have root privileges to edit the cmdline.txt file.

So the sequence is:-
in terminal: sudo pcmanfm ...and wait for the file manager to load as root (this will have an orange warning triangle in the icon bar).
navigate to /boot/cmdline.txt in file manager and then right click on it and open with leafpad (the text editor)
Very carefully edit this file as described.
In a similar fashion (i.e. from file manager when running as root) navigate to /etc/inittab and edit this file.

Replace KillerApp.bas with your Picaxe file (whatever you have written as a basic Picaxe program).

Have you built a suitable interface to invert serial lines as shown in the illustration?
 

BENSALVAGE

New Member
I haven't built anything yet as I was firstly seeing if it would work on the pi. That will be my next step once I know it works software wise
 

SteveDee

Senior Member
Also just to ask does a picaxe programme become downloaded using these steps ?
The command will attempt to compile your code, and if successful will wait for the Picaxe to be ready for download (which will fail because it is not connected at the moment).
 

BENSALVAGE

New Member
okay i am up to the point where i am looking for the /boot/cmdline.txt to then open in leaf pad however when i do this it only has one line of text
 

hippy

Technical Support
Staff member
okay i am up to the point where i am looking for the /boot/cmdline.txt to then open in leaf pad however when i do this it only has one line of text
That is correct and as it should be. You need to delete the console=ttyAMA0,115200 part as described ...

http://captainbodgit.blogspot.co.uk/2015/05/raspberrypi-serial-comms-php.html

You don't need to do this and the other steps described to test the PICAXE software is working at this stage. And you only need to do it if you want to use the on-board Pi UART. If using a USB to serial cable to program the PICAXE you can leave ttyAMA0 settings as they are.
 

BENSALVAGE

New Member
okay im going to be using the usb to serial cable to programme so i will re input that ttyamo, would you be able to copy me the whole line so i can replace that? also i am now at the root part for the etc/innitab however i cannot find the innitab
 

hippy

Technical Support
Staff member
okay im going to be using the usb to serial cable to programme so i will re input that ttyamo, would you be able to copy me the whole line so i can replace that?
I am not sure what your line would have been but just put console=ttyAMA0,115200 back before console=tty1.

also i am now at the root part for the etc/innitab however i cannot find the innitab
The /etc/inittab was part of sysvinit which no longer exists with systemd which Raspbian Jessie uses.

I have no idea what would need to change to fully disable the console but if putting console=ttyAMA0,115200 back into /boot/cmdline.txt you won't need to edit anything.
 

BENSALVAGE

New Member
so after these steps how do i then create a programme for the picaxe can it only be done in command line or is there a way to have either axepad or similar downloaded
 

hippy

Technical Support
Staff member
so after these steps how do i then create a programme for the picaxe can it only be done in command line or is there a way to have either axepad or similar downloaded
At present you need to use a text editor to create a .bas file, then run the compilers from the command line.
 

BENSALVAGE

New Member
also i have checked i had the correct file saved under the KillerApp and ran commands as said and i get this
pi@raspberrypi:~/picaxe/bin $ ./picaxe08m2 -c/dev/ttyAMA0 KillerApp.bas
ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem.so' from /etc/ld.so.preload cannot be preloaded: ignored.

PICAXE-08M2 Compiler
Version 3.1
Copyright (c) 1996-2014
Revolution Education Ltd

Compiled successfully.
Memory used = 3 out of 2048 bytes.


line# 0, col# 0

Error: Can't open port /dev/ttyAMA0.
(err=13: Permission denied)
is this correct or how do i grant permission
 

Technical

Technical Support
Staff member
ls -l /dev/ttyAMA0

will check the group - normally it is dialout or tty
Then add yourself to that group.

sudo adduser pi tty
 
Top