Core Dumps (linux & FreeBSD)

steliosm

Senior Member
Hello!

I tried the compilers on a x86 Ubuntu 7.10 installation and also on the eeePC 701 default OS. Everything was fine. I hve a USB2RS-232 cable bought from a local shop using the FTDI module.

I noticed that if I don't save the file as .bas the compilers crash giving me a Segmentation fault (core dumped) message:

renos@narnia:~$ picaxe08m -s test

PICAXE-08M Enhanced Compiler. Version 0.1
Copyright (c) 1996-2008 Revolution Education Ltd
All rights reserved.
www.picaxe.co.uk

Segmentation fault (core dumped)
renos@narnia:~$
Same thing is happening on both platforms (PC & eeePC) by both compilers.
Nevertheless it is an excellent work to port the compilers for the linux platform.

I was also able to run the compilers on a FreeBSD 5.4 system using Linux Binary Emulation mode. I can also produce the core dump if I omit the filename extension. I have problems downloading the program though since the compiler reports:

games# ./picaxe08m -c/dev/cuaa1 -t test.bas

PICAXE-08M Enhanced Compiler. Version 0.1
Copyright (c) 1996-2008 Revolution Education Ltd
All rights reserved.
www.picaxe.co.uk

Compiled successfully.
Memory used = 14 out of 256 bytes.


line# 0 col# 0

Error: Can't open port /dev/cuaa1.
(err=14: Bad address)
games#
Device /dev/cuaa1 is the correct device where I have hooked the serial cable connected with the PicAxe. Message Bad address might means something else then?


Regards,
Stelios
 

evanh

Senior Member
I've just given core dump issue a run through and found that it only happens if the source file has no suffix. If you specify no suffix but the file has one then the tokeniser just complains it can't find the file specified.


Evan
 

Technical

Technical Support
Staff member
Thanks.

We do recommend you always use a .bas extension. Although Linux doesn't need extensions, using a .bas will
1) keep the file in line/interchangeable with other platforms
2) enable Kate etc. to work out which colour syntax coding to use
3) ensure the default log file (filename.err) is correctly generated.

However we will clean up and trap the error message if extension is missing.

Bad address is the straight linux err message, we do not change it at all. You do realise /dev/cuaa1 is COM2 (/dev/cuaa0 will be COM1)
Have you also tried
-c/dev/cuad1 (or 0)
 
Last edited:

hippy

Technical Support
Staff member
Can the operation be made such that the compiler looks for the specific filename first ( whether with an extension or not ) and then looks for whatever's specified plus a .bas extension ? I hate typing extensions when the app knows what the default should be.

Also for the comms port. Is it possible for the option to be -c1 etc and have the app work out that means COM1:, /dev/ttyS1, /dev/cuaa1 etc as appropriate ?
 

evanh

Senior Member
Can the operation be made such that the compiler looks for the specific filename first ( whether with an extension or not ) and then looks for whatever's specified plus a .bas extension ? I hate typing extensions when the app knows what the default should be.
I use <TAB> filename completion. But if RevEd want it hard coded then I guess that's no biggie. Just have to make sure the suffix is case insensitive.

Also for the comms port. Is it possible for the option to be -c1 etc and have the app work out that means COM1:, /dev/ttyS1, /dev/cuaa1 etc as appropriate ?
A small script solves all. I'd rather know it's not the path guessing that's stopping it from opening the comport. Remember, this tool is for embedding.


Evan
 

steliosm

Senior Member
Technical, the port is the correct port on the FreeBSD system. The weird think is that if I cat /dev/cuaa1 I do get some output from the picaxe test program which sertxd a small phrase.
I'll run some more tests now that I'm back from the weekend break.
 

Technical

Technical Support
Staff member
Also for the comms port. Is it possible for the option to be -c1 etc and have the app work out that means COM1:, /dev/ttyS1, /dev/cuaa1 etc as appropriate ?
Does 1 mean /dev/ttyS1 or /dev/ttyUSB1 ?
We prefer to have the full device description here, although the Windows version could possibly check for 'COM', as it does already add '\\\\.\\' to ensure COM10 upwards work correctly.
 
Top