Shop Learn
New to C on Propeller and have questions — Parallax Forums

New to C on Propeller and have questions

I have previously used the propeller on a few projects and absolutely love it in comparison to other MCUs. I'm now in a position where I can specify what MCU we use at work and I feel that the Propeller is a good fit for our projects but I'm going to get a lot of pushback if I try to get people to work in assembly or Spin. Because of that, I am evaluating the current state of C on the Propeller. It seems like it has come a long way since the last time I played around with it. I've settled on SimpleIDE to work in (though am open to change) and so far things are going smoothly. One thing that I would like to do to evaluate how well it is doing is to see what the assembly code looks like that it is generating. I see that the -S option in Propeller GCC should generate a file with the assembly code in it. I've tried putting -S into the Other Compiler Options box in simpleIDE but that causes compilation to fail. So question #1 is:

How do I see the assembly code generated when using SimpleIDE?

My second question regards the memory model being used. I see in the project options that there is a drop down box for memory model but a blanket option like that isn't going to work for me. While I would like most of my COGs to run code that uses the COG memory model, that won't work for the main program that ties everything together since it will be too big. This makes my second question:

How do I mix memory models?


  • I just figured out question #1. If anyone else is reading this and looking for the same thing, right click on the .c file within SimpleIDE and select 'Show Assembly'.

  • @Raefsel Be sure to look at ERSmith's FlexC as well. It may suit your needs as well, or better.

  • Welcome @Raefsel. If the filename ends in .cogc or .ecogc, it will be compiled to native C and can be loaded into COG memory for native execution, regardless of what memory model is select at a project level.

    FlexC is another great option that is still under active development. Eric is quite the powerhouse and just keeps churning out advancements like a machine. But it is all homegrown - no standard tooling like GCC in that mix.

    PropWare combines CMake and PropGCC to give you a high-level build system that you can tie into your own IDE (and a few different options for HALs) if that's more your jam. PropWare works best on Linux, but there have been a couple success stories from Windows users.
    Disclaimer: I'm biased towards PropWare ;)

  • iseriesiseries Posts: 1,004

    I have been using the simpleIDE for years now and it works very well. I also use FlexProp but only on the P2. Trying to get my libraries and other libraries to work with it is a pain.

    I have built several custom Libraries that I use in SimpleIDE. You will need to know how to do that so you can integrate your devices into SimpleIDE along with documentation that will explain the interfaces you create through those libraries.

    I try to use LMM memory model when timing is critical to the application as the CMM model generates small code but the code runs much slower. While it is possible to mix the two this can be problematic.


Sign In or Register to comment.