First contact with propgcc < great >
Reinhard
Posts: 489
Hello,
today I download the propgcc version 0.1.2 for windows and start the first test.
I used the toggle.c/toggle_cog.c programms, because many blinking LED are always very imposant ;-)
I set the environment with the addpath.bat and went into the toggle\cog_c_toggle directory.
I start the Makefile and get the errors: libcog.a and crt0_cog.o not found.
The reason was the Makefile in libpropeller is not executed and the objects don't exist.
After do this, the compile and link was successfull.
Now with a small batchfile in the source directory and the job is very easy.
rem --- setup the path for gcc environment
call C:\propgcc\addpath.bat
rem --- run the Makefile
make
rem --- load binary (elf) image into chip
propeller-load -p com3 toggle.elf -r -t
So I am very happy and learn more about propgcc.
Maybe this is the favorit tool for my propeller programming .
btw. a GUI is nice, but not essential.
Thanks for this project!
best regards,
Reinhard
today I download the propgcc version 0.1.2 for windows and start the first test.
I used the toggle.c/toggle_cog.c programms, because many blinking LED are always very imposant ;-)
I set the environment with the addpath.bat and went into the toggle\cog_c_toggle directory.
I start the Makefile and get the errors: libcog.a and crt0_cog.o not found.
The reason was the Makefile in libpropeller is not executed and the objects don't exist.
After do this, the compile and link was successfull.
Now with a small batchfile in the source directory and the job is very easy.
rem --- setup the path for gcc environment
call C:\propgcc\addpath.bat
rem --- run the Makefile
make
rem --- load binary (elf) image into chip
propeller-load -p com3 toggle.elf -r -t
So I am very happy and learn more about propgcc.
Maybe this is the favorit tool for my propeller programming .
btw. a GUI is nice, but not essential.
Thanks for this project!
best regards,
Reinhard
Comments
One major hurdle is that compiled C code is much bigger than the same functionality as Spin byte codes.
I'm hoping they can make up for that by placing all code that is to be loaded into COGs in the high end of 64k EEPROMs freeing up HUB space.
On the other hand, a compiled C++ class with only 2.392 bytes is not bad (toggle.cc) also if the only action is wait and toggle the ports.
I think if a program can disclaim to printf / scanf, thats a good deal, but not always possible.
However let's see what will be in future,
best regards,
Reinhard
Hello Reinhard. Welcome to the Propeller Forum.
I had planned to expose propgcc for the first time this Thursday night at the meet-up group. You beat me to it.
Yes, Propeller GCC is hosted on Google Code at http://code.google.com/p/propgcc/
We are almost ready to begin our Alpha test phase. As you may know Alpha test is an early test phase where testers hammer on the product. Since that has not begun yet, the expectation of finding bugs is very high.
There is much more work to do before "General Availability."
Now that we have been discovered, I'll be putting more effort into documentation and issue tracking. More documentation is coming. We can post the GCC .pdf in the downloads area. Other documents are evolving. Issue tracking becomes key now: I believe the problem you found has been fixed in the last few days, but we will need independent verification. This problem and any existing known issues will be tracked from here on out.
What you see on the propgcc wiki pages are the current public documents. Those pages and many others will be distilled into a manual at some point. Please understand that none of the documents have been written by Parallax staff. The Parallax standard is much, much higher and lots of the current information will be rewritten to that standard.
In several ways, your finding the propgcc google code pages is very good. Some things will be harder or just different - that's ok too.
Thanks for being curious enough to find propgcc.
Everyone is welcome to try Propeller-GCC - just remember it's not a finished product and will not be for a while.
Thanks to Parallax for it's support. Parallax has more plans for Propeller GCC. I'll leave those details to them.
However, I have an uncommitted change that allows using about 54KB of a 64KB EEPROM to run programs. It will leave about 24KB of HUB RAM free for user stack and data. It's slow as a old grey mare, but it will work on any Propeller board with a 64KB EEPROM. A 128KB EEPROM would allow you to run the xbasic interpreter demo. Other bigger programs are also practical with 128KB EEPROM on boards like the Hydra.
Most propgcc programs should be compiled with -Os optimization. The size reduction and performance increase is pretty dramatic relative to the default optimization.
There is much more to external memory code operations than EEPROM. Programs will also run on C3 and several other platforms. Some of the designs are quite fast, but no doubt slower than LMM model programs.
As you say not many existing drivers are written to be usable that way so there may have to be a lot of adapting going on.
Nice work guys.
Is there a Windows GUI yet ?
Bean
P.S. Is there anyway to see the generated PASM code ?
Best to watch the steps that make executes as it builds your program. Then copy the GCC command that compiles the module of interest replacing -c with -S and changing the output file extention from .o to .S
Glad things seem to have worked easily enough for you.
Follow Heater's suggestions -S when possible. Another way to see the full assembly is to use "propeller-elf-objdump -d program.elf" On a related note for program.elf, the file size of program.elf is not necessarily the image size. The linker will complain if you exceed the available size for a memory model (Edit: this is true mainly for COG and LMM mode where there are fixed sizes. XMM/XMMC models size overflow will only be detected for the size set in the linker script).
You can use Eclipse today if you like. It takes a little configuration though - without a plug-in. I have been working on instructions for setting up Eclipse for cross-compile and download, but have been distracted. I'm preparing my presentation for Thursday and am over-due so it won't be available for several days. Eclipse plug-ins could automate the task. Other options are being explored. Jeff Martin is doing the Parallax "front-end".
Thanks for answer,
I see on the propgcc website are several updates again yesterday.
You are really fast !
Of course I understand this project is in a very early phase, but everything begins with first step :-)
If you are interesst, I have a small demo, from Propeller Education Kit Labs, converted from SPIN to C.
is the DOREMI Demo, which deals with the FRQA Cog register.
If you want you are free to use it as further demo.
cheers
Reinhard
It is great so far!
Where would be the official place to post questions or issues for the Alpha release? Is it the "issues" area of the Google Code project page, or are you planning on starting a thread on the forums?
Thanks,
--trodoss
Yes! Of course we're interested in any ports. Especially ports from PE-LABs!
We can add new demo sections in Propeller-GCC for PE-LABS and other projects.
We are also interested in OBEX code ports - some things are ported for ICC now, but need to be more generic.
MIT licensing is preferred for demos, but I know that some people prefer other licenses.
Hi @trodoss,
Glad things are working out.
If you register for a Google account, you can post bug reports on the "issues" page. This is preferred so issues are not lost and so others can search for problems in the database. I will end up adding some issues as I've done already, but it really is best for the person discovering the problem to submit the bug report.
Meanwhile you are welcome to start your own thread if necessary with propgcc or Propeller-GCC in the title. Apparently it is easier to move threads than individual posts. A public Propeller GCC Alpha "presence" (possibly a forum which already exists) is being considered. We'll let you know if/when it's available.