PropGCC on the RPi or other...
Rsadeika
Posts: 3,837
similar systems. I know we have SimpleIDE that is available for that but, ...
Since I am starting to accumulate RPi boards, I would like to try too attach a Propeller board, maybe via ttyUSB0, and try to program it. I am also thinking it should be in the simplest setup possible maybe something a little more powerful than a NANO or VIM editor, but a whole lot simpler than CODE::BLOCKS or even Geany. Then possibly use a bash script to do the actual work to compile, load, and run the code on the Propeller. The important note, the simplest way possible.
Not sure if there is a PropGCC package that you can load to the RPi, do a setup.sh too get the files where they should be and then run it from a command line or the GUI, or possibly an editor that would allow you to run bash script files. It would be nice to cover both areas, command line and GUI. Any ideas?
Ray
Since I am starting to accumulate RPi boards, I would like to try too attach a Propeller board, maybe via ttyUSB0, and try to program it. I am also thinking it should be in the simplest setup possible maybe something a little more powerful than a NANO or VIM editor, but a whole lot simpler than CODE::BLOCKS or even Geany. Then possibly use a bash script to do the actual work to compile, load, and run the code on the Propeller. The important note, the simplest way possible.
Not sure if there is a PropGCC package that you can load to the RPi, do a setup.sh too get the files where they should be and then run it from a command line or the GUI, or possibly an editor that would allow you to run bash script files. It would be nice to cover both areas, command line and GUI. Any ideas?
Ray
Comments
dgately
Ray
Now that I have the whole thing installed, any suggestions as to how you would use a PuTTY session to program the attached Propeller, or at least the best solution for the session?
Ray
I'm sure a quick google around will tell you how to set up a desktop icon for whatever desktop you are running.
But, hey, if you want to use via ssh you don't need an icon right?
If you can log into your pi via Putty or other ssh client then the propeller tools are under /opt/parallax/bin
So you can compile stuff with commands like: And load the Propeller with: Of course you will need to consult the prop-gcc documentation to get all the right options and params for those.
nano is barely functional as an editor on the other hand there is no editor more powerful than VIM
For example, this is also vim: http://cream.sourceforge.net/features.html
Ray
I'm not insisting that you take up usage of VIM. Only pointing out that it is far removed from the world of nano. Given that vim has a Turing complete scripting language built in then it is as powerful as any other editor. Vim is still better than the alternatives sometimes, for example when you log into your Rasperry Pi over ssh and want to do some editing of config files or even serious work on source code.
And now for my dirty little secret: For some months now I have been using Sublime Text: http://www.sublimetext.com/ it's the first editor I have liked for years and works equally well on Linux, Mac and Windows. It's also the first piece of software I have paid money for since the late 1980's !!
The "dirty" part of all this is that Sublime is closed source thus breaking all my rules about that.
Of course Sublime does not work on ARM processors so it's back to vim again there:)
I will leave the topic of using PropGCC via an ssh mode session for another time. Maybe something like an old DOS edit program will appear, and then...
Ray
You can easily create an icon on the desktop to to start SimpleIDE. There are instructions all over the place to do that, for example:
http://www.raspberry-projects.com/pi/pi-operating-systems/raspbian/gui/desktop-shortcuts
If you watch what SimpleIDE does as it builds and loads your program then you will have all the commands needed to build the program manually over a Putty session.
You could just put those commands into a BASH script.
Of course the usual thing with C projects is to use a Make file but SimpleIDE does not use them and perhaps it's overkill of little propeller projects where the recompile time is pretty short anyway.
Ray
Well, Windows 3.1 was the best version of Windows ever made
The problem here is that there are dozens of different desktop environments you can use on top of Linux/Unix/BSD whatever. I believe some efforts have been made to standardize desktop configurations, icons, menus etc but I've never really looked into it and I'm sure it's a mess that only half works half the time anyway
Then we have the issue that such GUI conveniences are normally installed by the package system of what ever Linux distro you are using. of course there are many of those as well, all different. SimpleIDE is not distributed as an package for any distro.
Ray
However, if you have SimpleIDE installed and working then all of propgcc is there in /opt/parallax
All you have to do is make a tar ball out of that and you have something that can be unpacked into any Raspbian machine.
Ray
So, I just have to ask...
Why is it so important that you install propgcc separately from SimpleIDE? It's not like the SimpleIDE portion of the install takes up a lot of disk space, right? I guess you could delete SimpleIDE itself after the install, leaving just the propgcc binaries and example code. Dos the SImpleIDE install also place "Propeller GCC Demos" into a SimpleIDE folder? Those demos include make files that you can use and learn from to create your own.
Just curious.
dgately
Ray
If I remember correctly if you unpack the SimpleIDE package you will find that you have a directory "parallax" which contains the propgcc that will be installed to /opt/parallax if you run the setup.
So all you need to do is mv that directory to /opt/ and perhaps change ownership recusively on it, sudo chown -R yourname:yourname /opt/parallax
Then add /opt/parallax/bin to your PATH.
There you have a propgcc install with no SimpleIDE all done from the command line. You can delete the unpacked SimpleIDE if you like.
Ray
$ export PATH=$PATH:/opt/parallax/bin
Will add /opt/parallax/bin to you PATH temporarily, for as long as the current login session.
To get it set automatically at every log in just add that command to the hidden file .bashrc in your home directory.
So, at this point I had to pull the SD card, re-format, and re-install the image, then start the whole procedure again, but this time it seemed that install of SimpleIDE was successful. I am not sure what to make of this whole situation, is the OS version for the RPi still at BETA level, meaning it still has issues that have to be worked out, or because it is on an ARM processor, it is having internal processor difficulties on how it works? This is not the first occurrence of having the OS misbehave, I had it misbehave before, unrelated to SimpleIDE.
One other note, somewhere in the installation instructions, a note about the user having "dialout" privileges should be noted, that got me a few times all ready.
Ray
I had many similar sounding problems on my two Pis a year or so ago. Then I got a different power supply. And all has been fine. So I don't know if the more recent OS images or the new PS made the difference.
Never had such problems with building or installing propgcc and SimpleIDE though.
Make yourself a member of the "dialout" group and you should be good to go.
Had same prob here with corrupting the os, most self inflicted but when I switched to a 1.5 amp power and Noobs the problems went away. Never had any problems installing SimpleIDE. Just followed the instructions posted here. Dont know enough Linux yet to go rogue!
I've had the SD-based OS go "wonky" a few times on my RPi's. So, I added a 1TB USB hard drive after partitioning it to 2 500GB drives. I copied an installed system from the SD card to one partition (instructions can be found on the RPi forums. you'll need to re-size the OS to the USB drive partition). As the RPi starts to boot up from the SD, a config file forces the boot up to the USB drive. This gives me lots of space for the RPi. Of course, the Pi is not real portable now, but it's a development system, anyway.
On the RPi, the SD card seems more prone to corruption than a USB-powered-hub based hard drive.
dgately
Now that I think about it I do get some suspicious behaviour from time to time. An "apt-get install..." or "apt-get upgrade..." that has to do a lot of work has been known to freeze the Pi. All has been fine after a reboot and the install could be completed.
On the other hand, I have used an old 80GB USB hard drive to hold working files whilst rebuilding Qt5 from source. That build takes three or four days! No problems.
Ray
Ray
What's the new direction?
I just installed the SimpleIDE from Jeff's article at learn.parallax.com
Is there a newer propeller-load, or should I overwrite the supplied one with the old rev3 you made?
The last loader that was known to work over ttyAM0, the UART pins, is very old now and I get the feeling enough has changed in propgcc/SimpleIDE that it may not work any more.
The latest loader code in the default branch of propgcc on google code contains my changes for using ttyAMA0. However it does not use them when compiled out of the box as they have never been tested.
I'll try and find some time to get this going.