Functional PropGCC demo project?
localroger
Posts: 3,451
Last year I bought a C3 specifically to have something to try PropGCC on, but so far haven't done anything with it. The tutorials that are up are far too simple for my needs; I know how write basic C code, but not how larger projects are organized. Is there something like the VGA demo object which shows how practical resources are included and organized in a project with more scope than blinking lights and reading switch sensors, like the TV and VGA demo objects in the obex? I have tried googling for example propgcc+vga but all I can find are links to the googlecode repository and I can't figure out how to assemble a working application in SimpleIDE from the individual files that exist there.
Comments
There was a thread, around the time of this one, that had a great discussion about taking OBEX items and converting them to use with PropGCC, how to set up mailboxes (like Steve did with the keyboard object) and how to get the moons, the stars and the COGs in alignment. I'm still looking for it....you'd think I would bookmark it by now!
Parallax is really more focused on not needing external memory for Propeller-GCC, so we collaborated on microcontroller sized input/output functions.
The existing simpletext library which is included in simpletools allows using a single interface with multiple devices. It would be worth testing the libsimpletext.side project to get a feel of how it works.
Also, I demo'd some of the new examples with Andy some time ago, but we haven't had a chance to roll them into the library set yet.
I am of course mostly interested in PropGCC to avoid writing my own XMM development system. Is there a way to get SimpleIDE to report on the usage of individual resources (e.g. how much Hub RAM is library, app data, app code, and how much XMM is being used)?
It's all listed in the map file.
Choose Tools -> Set Project View, right click a Project Manager file entry, and choose Show Map File.
It may be necessary to build the libraries in XMM_SINGLE and XMM_SPLIT modes. The libraries are distributed with CMM/LMM/XMMC built by default.
I'm attaching some libraries for you. Unzip them to your SimpleIDE\Learn\Simple Libraries\Text Devices folder.
The old memory model specs mention using high EEPROM as XMM but I don't see a selection for that in SimpleIDE. Most of what I want large XMM code for is human interacting business logic which doesn't need to be very fast; is there a driver for this or was it dropped or put aside to do later?
I suggest doing some of the http://learn.parallax.com/propeller-c tutorials just to get acquainted with the system. Also, reviewing the SimpleIDE User-Guide will help to understand more of what is going on. There are some library help links in the main Help menu. A good resource for the standard C library is here: http://www.cplusplus.com/reference/ The Propeller-GCC site has lots of good information: https://sites.google.com/site/propellergcc/
Also, it is not necessary to use SimpleIDE with Propeller-GCC, but the most recent release_1_0 build is only available with a SimpleIDE package. The entire SimpleIDE package with Propeller-GCC is smaller than a package having just Propeller-GCC, and the installer automates things. I'm still working on Linux packaging.
There will be a new package very soon that contains some important SimpleIDE and Propeller-GCC updates.
XMM modes are implemented for many board types including C3 (Dave Hein's very good vgademo is written in XMMC C3F mode). You can start SPIN/PASM, GAS, or COGC code in a new COG with cognew. The one thing missing from XMM modes that you get with CMM/LMM modes is the ability to start a function running in a separate COG (it can be done via cooperative multitasking using pthreads, but that is an advanced subject requiring yields like other single core code).