Shop OBEX P1 Docs P2 Docs Learn Events
First contact with propgcc < great > — Parallax Forums

First contact with propgcc < great >

ReinhardReinhard Posts: 489
edited 2011-10-26 10:00 in Propeller 1
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

Comments

  • Heater.Heater. Posts: 21,230
    edited 2011-10-25 12:18
    Welcome to the club. It's amazing what they have done in a short time.
    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.
  • ReinhardReinhard Posts: 489
    edited 2011-10-25 13:18
    Heater. wrote: »
    Welcome to the club. It's amazing what they have done in a short time.
    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.
    That's true.
    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
  • jazzedjazzed Posts: 11,803
    edited 2011-10-25 13:36
    Reinhard wrote: »
    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 ;-)
    ...

    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.
    Reinhard wrote: »
    ...
    Thanks for this project!

    best regards,
    Reinhard

    Thanks to Parallax for it's support. Parallax has more plans for Propeller GCC. I'll leave those details to them.
  • jazzedjazzed Posts: 11,803
    edited 2011-10-25 13:54
    Heater. wrote: »
    Welcome to the club. It's amazing what they have done in a short time.
    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.
    Actually, Propeller GCC won't work that way. There is more to do in describing this.

    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.
  • photomankcphotomankc Posts: 943
    edited 2011-10-25 13:57
    Jazzed, I'm very excited to see where this goes. C++ is my comfortable home and I'm thrilled to see it coming to the propeller along with a speed for me between SPIN slow, and PASM just doesn't work at all cause I'm slow. :)
  • David BetzDavid Betz Posts: 14,516
    edited 2011-10-25 14:22
    Heater. wrote: »
    Welcome to the club. It's amazing what they have done in a short time.
    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.
    While we haven't written any code to load COGs from high EEPROM yet there is no reason it can't be written by a user. We have the ability to link COG code and load it at runtime with coginit or cognew. All you'd have to do is load an EEPROM driver and use it to load COG images you place in high EEPROM with some offline utility. I guess a two stage loader would be better so the COGs could be loaded before your code is started but that would require that any drivers loaded by the loader be able to wait idle until your program wakes up to initialize them. I don't think many existing COG drivers work that way.
  • Heater.Heater. Posts: 21,230
    edited 2011-10-25 14:58
    That's just what I was thinking. Users can do it even if the supplied tool chain does not. It can't be that hard to fetch a binary blob from high EEPROM or SD card or whatever and get it started in a COG. When all your "firmwares" are loaded start the main C program.
    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.
  • BeanBean Posts: 8,129
    edited 2011-10-25 15:22
    I just downloaded it and got the C++ Toggle working in a matter of minutes.
    Nice work guys.

    Is there a Windows GUI yet ?

    Bean

    P.S. Is there anyway to see the generated PASM code ?
  • Heater.Heater. Posts: 21,230
    edited 2011-10-25 15:34
    To get PASM code you want to just compile to assembly language by using the -S option to the compiler.
    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
  • jazzedjazzed Posts: 11,803
    edited 2011-10-25 16:08
    Hi Bean.

    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".
  • ReinhardReinhard Posts: 489
    edited 2011-10-26 02:48
    jazzed wrote: »
    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.

    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
    c
    c
    900B
  • trodosstrodoss Posts: 577
    edited 2011-10-26 07:17
    @Jazzed,
    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
  • jazzedjazzed Posts: 11,803
    edited 2011-10-26 09:59
    Reinhard wrote: »
    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

    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.
  • jazzedjazzed Posts: 11,803
    edited 2011-10-26 10:00
    trodoss wrote: »
    @Jazzed,
    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

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