Anyone seen what the GCC guys have done lately?
Dr_Acula
Posts: 5,484
Ok, there is this thread at the top of the propeller forum talking about an C alpha test forum. Rather than read what they are doing, I thought I would test it out on a propeller board. Any propeller board, really. I just grabbed the nearest one.
It is amazingly easy to get something working! You don't even need to read a manual (who reads manuals, anyway?)
Step 1: Download GCC for your computer from this page http://code.google.com/p/propgcc/downloads/list For windows, put it in a directory called c:\propgcc The windows version is the 6th one down on the list. *** addit - see posts further down, it appears you can skip step 1 and just get the package in step 2. Even better! ***
Step 2: Download an IDE from http://code.google.com/p/propside/downloads/detail?name=Simple-IDE_0-6-7_setup.zip&can=2&q= (thanks to Leon post #2 for the updated link)
wait a bit. A few hundred megabytes there...
Step 3: Install and run the IDE. It defaults to a simple test program. Hit F10 to run it.
Step 4: On the top right of the IDE screen is a little computer screen picture. Open it and it displays a terminal so you can see "Hello World" coming back.
It shouldn't be this easy, but it is.
Top marks to all those in the GCC team.
It is amazingly easy to get something working! You don't even need to read a manual (who reads manuals, anyway?)
Step 1: Download GCC for your computer from this page http://code.google.com/p/propgcc/downloads/list For windows, put it in a directory called c:\propgcc The windows version is the 6th one down on the list. *** addit - see posts further down, it appears you can skip step 1 and just get the package in step 2. Even better! ***
Step 2: Download an IDE from http://code.google.com/p/propside/downloads/detail?name=Simple-IDE_0-6-7_setup.zip&can=2&q= (thanks to Leon post #2 for the updated link)
wait a bit. A few hundred megabytes there...
Step 3: Install and run the IDE. It defaults to a simple test program. Hit F10 to run it.
Step 4: On the top right of the IDE screen is a little computer screen picture. Open it and it displays a terminal so you can see "Hello World" coming back.
It shouldn't be this easy, but it is.
Top marks to all those in the GCC team.
Comments
http://code.google.com/p/propside/downloads/detail?name=Simple-IDE_0-6-7_setup.zip&can=2&q=
That is the latest version, uploaded this morning.
I'd previously tried out gcc using the command line, and it's a bit awkward. I just tried the IDE, and I agree with Drac that it does make things very easy. It's actually easier than using the Propeller Tool, especially if terminal I/O is required, as one doesn't have to run a separate program.
I agree, command line is awkward, to the point I gave up a few times over the last few months. Which is why the IDE is such a huge step forward for this project.
Very exciting. GCC can run big programs, much bigger than the propeller memory.
This team should get a big round of applause, especially Steve with SimpleIDE!
I think I downloaded it in a different order. So are you saying that the simple IDE contains all the files in c:\propgcc as well?
Its ease of use and comfort level is right up there with that Arduino environment. When the libraries get finalized, it will be a very simple, very complete C development environment.
> NED rewriting of drivers already existing in PASM.
First Hole in theirs SHIP !
Yes. Oddly enough the Windows SimpleIDE package includes everything you need to be productive and is smaller than the standalone GCC package.
However, I have been struggling ever since getting a project to run. Someone fetch me a child of 5 so I can get this compiled.
I get the same bunch of errors whether I use GCC or catalina. I guess that there are things one "just has to know" about using a C compiler that are omitted from the instructions. For example, Adding main to a project doesn't add all the include files, and doesn't find the .c files in the same directory. Also, there are livraries that are included automatically, but there is no list that describe what these are or what they contain. At least not via the Help option in the IDE. I get the impression that the IDE is used to install the packages, but "real" users work from the command line and "just know" where all the parts are and how they work; while the IDE does most functions but leaves the new guy hanging at key points.
So my issues stem from not using C for 20 years. I'll have to give it more concentration when there are fewer distractions.
Version 0-6-7 is the latest. It labels those boxes you asked about.
Both Ross and I have followed up with you on this in your threads. Can we finish that?
GCC offers GAS with PASM-like syntax (required for the tool-chain) and can use PASM via tools like BSTC.
Simple IDE allows you to add Spin/PASM programs to the project and this integrates very smoothly.
Not quite. It is possible to compile PASM to binary blobs with BST (Or HomeSpun I think) and then link those blobs into a propgcc program. So no rewriting is necessary from that point of view.
If I remember correctly there are examples of doing this in the propgcc demos.
Of course you will run into problems if the PASM code has linkage to Spin code. Say relying on Spin to set up parameters in DAT before loading the DAT into COG. In that case C code does not know where to "POKE" those values. It's best to modify the PASM to get all it's setup info via PAR at start up.
Then there is the new opensource Spin/PASM compiler coming along which I'm sure will be able to produce propgcc object files from PASM at some point.
I've been taking some steps at "looking under the hood" of PropGCC and it is amazing how much work the entire team has put into this project.
C.W.
But is it possible to simple copy PASM code as IN-LINE to be compiled by PropGCC.
Yes. It is possible to use Propeller GCC GAS in-line ASM which has PASM-like syntax.
The standard GNU GAS compiler can share symbols with C programs.
Roy's compiler can produce blobs already - I want to cut in his compiler within a few months.
PASM-like syntax else PASM compatible.
Can I simply paste it from existing PASM programs to be compiled ?
Not for GAS. There are GCC related requirements.
As mentioned, if you want PASM you can include it in a Spin/PASM file.
Everyone else is very happy with this arrangement.
My first post in this thread was correct!
When porting existing PASM drivers, it's probably best to use BSTC to produce a binary blob rather than port it to GAS.
Code written to take advantage of spin features will need to be changed.
Why do you think this is a problem?
Dave,
Can you expand on this or point to some documentation?
I haven't ran into any issues yet, but I can see this being the cause of a great deal of head banging if not properly understood.
Thanks,
C.W.
The other instructions do not compensate for byte addresses. As I said, "mov test, #loop" deosn't give you the result you would expect from a PASM program. There is a psuedo-op defined for mov that does compensate for byte addresses. I believe it's called "mova". So instead of "mov test, #loop" you would do "mova test, #loop". However, there are no other psuedo-ops like that for the other instructions, such as movs, movd, add, etc.
That's going to be a source of constant, no pun intended, pain.
C.W.