Shop OBEX P1 Docs P2 Docs Learn Events
Functional PropGCC demo project? — Parallax Forums

Functional PropGCC demo project?

localrogerlocalroger Posts: 3,451
edited 2013-11-04 18:53 in Propeller 1
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

  • mindrobotsmindrobots Posts: 6,506
    edited 2013-11-04 06:43
  • localrogerlocalroger Posts: 3,451
    edited 2013-11-04 07:23
    Looks like exactly what I wanted, mindrobots -- downloading now, thanks
  • mindrobotsmindrobots Posts: 6,506
    edited 2013-11-04 07:29
    Glad it will help!

    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!
  • jazzedjazzed Posts: 11,803
    edited 2013-11-04 10:50
    I have some new library examples if you would like to try them.

    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.
  • localrogerlocalroger Posts: 3,451
    edited 2013-11-04 11:28
    Thanks Jazzed, I'll check simpletext out too.

    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)?
  • jazzedjazzed Posts: 11,803
    edited 2013-11-04 12:40
    localroger wrote: »
    Thanks Jazzed, I'll check simpletext out too.

    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.
  • localrogerlocalroger Posts: 3,451
    edited 2013-11-04 16:56
    Cool, I'll check out those libs tomorrow morning. I am starting to get my bearings a little but there's a huge amount of history to absorb as to how projects are arranged, where resources are drawn from, and so on, if you're not a "C person." I can write C code and have done so in a relatively controlled embedded dev system, but had to google my way to the GCC docs to figure out what the difference between <file> and "file" was in an $include statement, for example.

    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?
  • jazzedjazzed Posts: 11,803
    edited 2013-11-04 18:53
    localroger wrote: »
    Cool, I'll check out those libs tomorrow morning. I am starting to get my bearings a little but there's a huge amount of history to absorb as to how projects are arranged, where resources are drawn from, and so on, if you're not a "C person." I can write C code and have done so in a relatively controlled embedded dev system, but had to google my way to the GCC docs to figure out what the difference between <file> and "file" was in an $include statement, for example.

    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.

    localroger wrote: »
    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?

    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).
Sign In or Register to comment.