problem with compiling BASIC source file

ptica

New Member
Hello,

I have been trying to test a compiler for Mac following instructions in picaxe_beta_compiler.pdf document. I would like to upload a file to Picaxe 28x1 microcontroller. I am doing it in a Terminal application in Mac OS 10.5.5.

When trying to compile I am getting this message:

"PICAXE-28X1 (40X1) Enhanced Compiler. Version 0.2
Copyright (c) 1996-2008 Revolution Education Ltd
All rights reserved.
www.picaxe.co.uk

Can't open BASIC source file 'test.bas'!"

I do understand that the file should be a raw text file and I have been trying to save the document in different ways in BBEdit, TextEdit and Microsoft Word but I am getting the same message.
Does anyone have any idea what the solution for this could be?
Thanks in advance for your help.
 

Technical

Technical Support
Staff member
This error message is that the compiler can't find the file, not that it is the wrong format.

Make sure 'test.bas' is in the same folder as the compiler and remember the naming is case sensitive. The file could also be locked (e.g. if it is being edited at the same time in a text editor).
 

ptica

New Member
Thanks for such a quick reply.

In my first attempt I did get a "no such directory or file" message so I assumed the problem is with the file. The test file is in the same folder with compiler. And this is the directory the way I typed it in the Terminal window:

/Users/cedomirkovacev/picaxec/picaxe28x1 -s test.bas

Is anything wrong with this path?

Thanks for your help.
 

Technical

Technical Support
Staff member
Yes, test.bas is not in teh folder where you are calling from, hence the path is wrong.

so either
cd /Users/cedomirkovacev/picaxec
./picaxe28x1 -s test.bas

or
/Users/cedomirkovacev/picaxec/picaxe28x1 -s /Users/cedomirkovacev/picaxec/test.bas
 

ptica

New Member
Thank you, I did not realize that the .bas document has to have a path information, or however you call it.

I typed into the document just one line

servo 0, 150

What I got as an answer is this:

"??s
line# 1, col# 0

Error: Illegal character: ((0xFFFFFFFF))"

Thanks a lot for your help.
 

Technical

Technical Support
Staff member
This is probably a funny non-printing (formatting) character added by the text editor.

We have always used TextEdit on the Mac without any problem.

Start a new file, type in 'servo 0,150' (return) and hit save.
 

ptica

New Member
The message I wanted to see:

"Compiled successfully.
Memory used = 7 out of 4096 bytes."

All your suggestions were spot on. Now I have to try to actually download the file to the microcontroller.

Thanks again.
 

ptica

New Member
USB driver

I installed USB driver for AXE027 USB cable, restarted the computer following the instructions provided in the pdf document for the cable, but when I opened Network preferences no new port was detected.
I also could not find /dev directory.
Thanks for your help.
 

Technical

Technical Support
Staff member
Start a Terminal session, then type

cd /dev
ls -l

You should see an entry like
tty.serialusb-1234 (1234 will be unique)

This is the port to use, ie in the compiler type command line
-c/dev/tty.serialusb-1234
 

ptica

New Member
Thanks.
This is the problem. I actually did that and tty.serialusb is not listed. I tried installing driver again but nothing changed.

Here is the image:
picture.jpg
 

ptica

New Member
I wonder if it has anything to do with the fact that I also have Arduino installed. When I connect Arduino to the same port I have tty.usbserial-A70063zq listed. I do not run arduino when I am trying to use Picaxe usb cable and Arduino is disconnected.
 

Technical

Technical Support
Staff member
Something is not quite right with your driver install then. The Arduino should not be relevant, unless it is preventing the PICAXE driver installing. You could try unistalling both drivers and then reinstalling just the PICAXE driver.
 
Last edited:
Top