Shop OBEX P1 Docs P2 Docs Learn Events
New version of PropGCC for P2 posted on Google Code — Parallax Forums

New version of PropGCC for P2 posted on Google Code

David BetzDavid Betz Posts: 14,516
edited 2013-05-14 06:03 in Propeller 2
I've posted a new Windows build of PropGCC for P1 and P2 on Google Code. This version merges in some performance improvements that Eric has been working on in another branch and also adds support for using gdb to debug LMM and XMM programs on P1 and LMM programs on P2. This is a build of the "p2test" branch of the PropGCC repository at tag "p2test-2013-02-26" in case anyone wants to download the sources and build them for either Linux or Mac OS X. Please let me know if you'd like to run this on Linux or the Mac and don't have the ability to build from sources.

Here is a link to the Windows download:

http://code.google.com/p/propgcc/downloads/detail?name=prop2gcc-2013-02-26.zip&can=2&q=

We would very much appreciate any help any of you can give in testing this on P1 especially. We'd like to verify that we haven't broken any of the P1 features while adding support for P2.

Thanks in advance for your help in testing!!
«13

Comments

  • Bill HenningBill Henning Posts: 6,445
    edited 2013-02-26 19:36
    Nice work David & Eric.
  • David BetzDavid Betz Posts: 14,516
    edited 2013-02-26 19:45
    Nice work David & Eric.
    Thanks but most of the work in this release was done by Eric. He merged in the performance changes and also added the gdb support. Thanks Eric!
  • SRLMSRLM Posts: 5,045
    edited 2013-02-26 20:19
    David Betz wrote: »
    We would very much appreciate any help any of you can give in testing this on P1 especially. We'd like to verify that we haven't broken any of the P1 features while adding support for P2.

    That made me cringe :) I'd hate for some subtle bug to creep into my project. Still, I have a suite of unit tests for most of the basic functionality so I'll make sure that those run with my current PropGCC code (from November?), and then try it with the new code. And PropGCC has been very solid so far.
  • SRLMSRLM Posts: 5,045
    edited 2013-02-26 20:26
    So, to update I should pull and build the "p2test" branch? I always assumed that branch had just P2 stuff, and didn't have any P1 support.

    And it looks like spin2cpp is now part of the PropGCC project, and it's source is included there as well?

    I'm excited to try out GDB. So far, I haven't really had a need to use it, but it should be fun and it's nice to have. I wonder if I can get it to work with Code::Blocks?
  • Ken GraceyKen Gracey Posts: 7,392
    edited 2013-02-26 20:40
    SRLM wrote: »
    So, to update I should pull and build the "p2test" branch? I always assumed that branch had just P2 stuff, and didn't have any P1 support.

    And it looks like spin2cpp is now part of the PropGCC project, and it's source is included there as well?

    I'm excited to try out GDB. So far, I haven't really had a need to use it, but it should be fun and it's nice to have. I wonder if I can get it to work with Code::Blocks?

    Cody, we need you on March 15th for a beta test of our PropGCC efforts in education. There's so much cool stuff that I saw today in a demo from Andy, and I know you'd really like to use his work. I can't wait to let you in on his work!
  • David BetzDavid Betz Posts: 14,516
    edited 2013-02-27 04:08
    SRLM wrote: »
    So, to update I should pull and build the "p2test" branch? I always assumed that branch had just P2 stuff, and didn't have any P1 support.

    And it looks like spin2cpp is now part of the PropGCC project, and it's source is included there as well?

    I'm excited to try out GDB. So far, I haven't really had a need to use it, but it should be fun and it's nice to have. I wonder if I can get it to work with Code::Blocks?
    The p2test branch supports both P1 and P2. You get P2 support by using the -mp2 compiler option. If you don't specify that option, you get P1 support. If you have PropGCC checked out I think all you really need to do to switch to p2test is make sure your local repository is current and then checkout the p2test branch;
    hg pull
    hg update
    hg checkout p2test
    
  • David BetzDavid Betz Posts: 14,516
    edited 2013-02-27 06:35
    SRLM wrote: »
    And it looks like spin2cpp is now part of the PropGCC project, and it's source is included there as well?
    Yes, that is true. We may start using spin2cpp to build some of the pieces of the loader so we moved it into the propgcc project and it gets built with every propgcc build. Eric did a very nice job with spin2cpp and it was a project he did on his own, not part of the official propgcc project.
  • David BetzDavid Betz Posts: 14,516
    edited 2013-02-28 15:27
    I guess I forgot to mention this when I first posted the message about the new build of PropGCC for P2. We would really appreciate any feedback you can give us on this new version. We're particularly interested in any problems you might run into building P1 programs that worked with the previous release but don't work now. If you try any of the demo programs please post your results here. I also heard a rumor that Ken Gracey might be willing to offer a little incentive to people who help us out with this testing. :-)
  • ctwardellctwardell Posts: 1,716
    edited 2013-02-28 17:16
    I have to admit that make files and such things make me break out in hives.

    If I install the this version can I use it with SimpleIDE by just adding the appropriate -mp2 option?

    C.W.
  • David BetzDavid Betz Posts: 14,516
    edited 2013-02-28 18:13
    ctwardell wrote: »
    I have to admit that make files and such things make me break out in hives.

    If I install the this version can I use it with SimpleIDE by just adding the appropriate -mp2 option?

    C.W.
    I imagine that the current version of SimpleIDE will work to build P1 applications. You won't be able to use it for P2 though until Steve adds that support.
  • jac_goudsmitjac_goudsmit Posts: 418
    edited 2013-03-01 08:58
    ctwardell wrote: »
    If I install the this version can I use it with SimpleIDE by just adding the appropriate -mp2 option?

    I've been working on some bug fixes in Binutils (the Assembler seems to botch up any instruction with an immediate parameter that's a cog address), and I use SimpleIDE to do my testing on, so yes it can be done.

    To build PropGCC under Windows, you need MinGW (there are build instructions at http://code.google.com/p/propgcc/wiki/PropGccBuild). When you follow the instructions, the programs get built in /opt/parallax as seen from the MinGW prompt, and you can copy that entire directory to /c/PropGCC to make SimpleIDE work with it too (make a backup first, obviously).

    I'll try to update the build instructions later today to clarify things.

    [Edit: Now I see you're asking if -mp2 can be added from SimpleIDE: Yes it can.]

    ===Jac

    PS I use P1 only at this time
  • David BetzDavid Betz Posts: 14,516
    edited 2013-03-01 09:04
    To build PropGCC under Windows, you need MinGW (there are build instructions at http://code.google.com/p/propgcc/wiki/PropGccBuild).
    While you are certainly welcome to build PropGCC on your own for Windows, there is an already built version on Google Code in the "downloads" section. It take a *very* long time to build PropGCC on my Windows 7 laptop so you might find it easier to just use the version I uploaded. The link is in the first message of this thread.
    PS I use P1 only at this time
    That is perfectly fine! We're looking for regressions at this point and would welcome as much P1 testing as you'd like to do! Thanks!
  • Heater.Heater. Posts: 21,230
    edited 2013-03-01 11:47
    Compilation fails on Debian wheezy on my laptop.

    Well, the only compter I have for the weekend is an old Acer Travelmate that gets very hot after a few minutes of serious compiling work and then goes into thermal shutdown.

    Ha ha, had you going there for a minute. But seriously anyone know of a way to get this thing to throttle back and give my old laptop a chance to finish?
  • CircuitsoftCircuitsoft Posts: 1,166
    edited 2013-03-01 16:13
    Let it run a bit. When the CPU gets hot, hit Ctrl-Z and wait for it to cool down. Type "fg" when you're ready to continue.
  • David BetzDavid Betz Posts: 14,516
    edited 2013-03-01 18:24
    I've been working on some bug fixes in Binutils (the Assembler seems to botch up any instruction with an immediate parameter that's a cog address)
    Can you give an example of this? Have you posted an issue for it on Google Code? I hadn't heard about this until you posted this message. I also didn't realize you were working on binutils. We should probably coordinate our efforts.
  • jac_goudsmitjac_goudsmit Posts: 418
    edited 2013-03-02 07:28
    David Betz wrote: »
    Can you give an example of this?

    I'll post a message in the PropGCC forum, otherwise this will go off-topic in a bad way.

    ===Jac
  • David BetzDavid Betz Posts: 14,516
    edited 2013-03-12 06:21
    Has anyone had a chance to try the new version of PropGCC that I uploaded at the end of last month? As I said in my original post in this topic, we are very interested in any testing any of you might be able to do. We'd like to merge the P2 branch into the default branch so we particularly want to have a high degree of confidence that we haven't broken anything on the P1 side. We would greatly appreciate any testing you can do to verify either P1 or P2 programs. Also, I think Ken Gracey may have an incentive to offer those who are willing to help with the testing. Ken?
  • ctwardellctwardell Posts: 1,716
    edited 2013-03-12 07:35
    David,

    I'll give it a go without the SimpleIDE "safety net" this evening...

    C.W.
  • David BetzDavid Betz Posts: 14,516
    edited 2013-03-12 07:48
    ctwardell wrote: »
    David,

    I'll give it a go without the SimpleIDE "safety net" this evening...

    C.W.
    You should be able to use SimpleIDE to test for P1. There is no P2 support in SimpleIDE yet that I know of.
  • Bill HenningBill Henning Posts: 6,445
    edited 2013-03-12 07:57
    David,

    I downloaded it yesterday, and will try it today.

    Is there a demo with a makefile in the zip?

    Also, how do I embed something I assemble with PNut so I can launch it as a cog?
  • David BetzDavid Betz Posts: 14,516
    edited 2013-03-12 08:37
    All of the demos in propgcc/demos should work on the P1. There is a demo in demos/multi-cog that runs on the P2 but, unfortunately, the version in the zip file was written for the configuration file that supported 6 COGs. I'll modify it to support the 5 COG version and push the changes but I'll have to build a new zip file for Windows if you don't have access to Google Code.

    You should be able to use PNut code through PropGCC by just using the image file that PNut creates. I haven't tried that yet though. At this point, I'm mostly concerned to verify the functioning of P1 code using these new tools. Of course, P2 testing is also welcome though. I'll try to put together an example of using PNut files with PropGCC soon but it may not be until the weekend.

    Thanks for offering to help test!
  • Bill HenningBill Henning Posts: 6,445
    edited 2013-03-12 10:10
    Hi David,

    As far as I know, I still have access to Google Code - have not checked for quite a while.

    I'll be happy to take a peek at your next Windows zip file :-) and will greatly appreciate your example of using PNut files with PropGCC for p2.

    Since Spin2 is not usable yet, I was hoping I might be able to use the early p2 support in PropGCC to be the "glue" between the cog code I am building for some P2 projects I am working on for some future products.
    David Betz wrote: »
    All of the demos in propgcc/demos should work on the P1. There is a demo in demos/multi-cog that runs on the P2 but, unfortunately, the version in the zip file was written for the configuration file that supported 6 COGs. I'll modify it to support the 5 COG version and push the changes but I'll have to build a new zip file for Windows if you don't have access to Google Code.

    You should be able to use PNut code through PropGCC by just using the image file that PNut creates. I haven't tried that yet though. At this point, I'm mostly concerned to verify the functioning of P1 code using these new tools. Of course, P2 testing is also welcome though. I'll try to put together an example of using PNut files with PropGCC soon but it may not be until the weekend.

    Thanks for offering to help test!
  • David BetzDavid Betz Posts: 14,516
    edited 2013-03-12 10:13
    Hi David,

    As far as I know, I still have access to Google Code - have not checked for quite a while.
    Anyone can pull code from the PropGCC project on Google Code. You only need special permission to push code back ot the repository. But that said, you still have push access as well from when you did your work on the debug kernel.
    I'll be happy to take a peek at your next Windows zip file :-) and will greatly appreciate your example of using PNut files with PropGCC for p2.

    Since Spin2 is not usable yet, I was hoping I might be able to use the early p2 support in PropGCC to be the "glue" between the cog code I am building for some P2 projects I am working on for some future products.
    I guess PNut support is probably pretty important. It is actually pretty much as easy to do as what we do for P1 with extracting .dat files with COG images. I'll try to work up an example over the weekend.
  • Bill HenningBill Henning Posts: 6,445
    edited 2013-03-12 10:18
    Much appreciated. I will of course report any difficulties I run into :-)

    Right now, for my experiments, I just run Chip's monitor in another cog, and coding everything in PASM - including test code for cog drivers. Quite feasible, but a bit slower to do than I like. The extra features of the DE2-115 are awesome!
    David Betz wrote: »
    Anyone can pull code from the PropGCC project on Google Code. You only need special permission to push code back ot the repository. But that said, you still have push access as well from when you did your work on the debug kernel.


    I guess PNut support is probably pretty important. It is actually pretty much as easy to do as what we do for P1 with extracting .dat files with COG images. I'll try to work up an example over the weekend.
  • potatoheadpotatohead Posts: 10,261
    edited 2013-03-12 12:16
    Having that extra port open really helps. I've found uploading data, images, etc... works nicely too.
  • SRLMSRLM Posts: 5,045
    edited 2013-03-12 17:38
    I built, and got this at the very end:
    mkdir -p ../../build/spin2cpp/obj/linux
    bison -t -b ../../build/spin2cpp/obj/linux/spin -d spin.y
    make: bison: Command not found
    make: *** [../../build/spin2cpp/obj/linux/spin.tab.h] Error 127
    make: Leaving directory `/home/clewis/Downloads/propgcc/propgcc/spin2cpp'
    spin2cpp make failed
    

    I think the rebuild.sh script should have a check at the beginning for bison.

    Anyway, I upgraded from v0_3_5_1758 to v0_3_5_1920. This is correct? It still says GCC 4.6.1

    The first time I compile, I get this error:
    ...
    ...
    propeller-elf-g++ -mlmm -I/home/propgcc/unity/ -I/home/propgcc/gccutilities/ -I../ -dM   -Os -m32bit-doubles -mfcache -fno-exceptions -fno-rtti -fpermissive -ffunction-sections -fno-strict-aliasing -std=gnu++0x -Wl,--script=/home/propgcc/gccutilities/main.ld -Wl,--gc-sections -Wl,--print-gc-sections -o main.elf -D UNIT_TEST gpsparser.cpp gpsparser.generate.cpp gpsparser.test.cpp numbers.cpp serial.cpp  /home/propgcc/unity/unity.cpp
    ...
    ...
    /opt/parallax/lib/gcc/propeller-elf/4.6.1/../../../../propeller-elf/bin/ld:/home/user/propgcc/gccutilities/main.ld:198: warning: memory region `kerextmem' not declared
    /opt/parallax/lib/gcc/propeller-elf/4.6.1/cmm/short-doubles/_crt0.o: In function `__mem_kernel_ptr':
    (.kernel+0x5c8): undefined reference to `__load_start_memory_kerext'
    collect2: ld returned 1 exit status
    make: *** [Unit] Error 1
    
    (note: the single line compile command is above, and the relevant bit of it's output below).

    main.ld is a custom linker script used to help facilitate garbage collection (as started, but not finished for all code, here). I also updated the script to the newest version (via the default). Unfortunately, this is the dreaded error that occurs when there is cog assembly code assembled with GCC, and the magic __load_start_* label is created. I haven't figured out how to overcome this yet in garbage collection (essential for the Propeller), so for me this new version of PropGCC is broken.

    The other features of PropGCC seem to be working, however: I ran 230 unit tests over a variety of problems in both CMM mode and LMM mode, and they all passed (if they fit in memory without garbage collection).

    So, that's my conclusion: the new build breaks current garbage collection, but works otherwise.
  • SRLMSRLM Posts: 5,045
    edited 2013-03-12 18:02
    This isn't really a PropGCC problem, but I noticed that Google Code no longer has a code search function?!?!?
  • David BetzDavid Betz Posts: 14,516
    edited 2013-03-12 19:39
    SRLM wrote: »
    I built, and got this at the very end:
    mkdir -p ../../build/spin2cpp/obj/linux
    bison -t -b ../../build/spin2cpp/obj/linux/spin -d spin.y
    make: bison: Command not found
    make: *** [../../build/spin2cpp/obj/linux/spin.tab.h] Error 127
    make: Leaving directory `/home/clewis/Downloads/propgcc/propgcc/spin2cpp'
    spin2cpp make failed
    

    I think the rebuild.sh script should have a check at the beginning for bison.
    Yeah, I guess we should write a configure script for this whole build but I've never done that before. Do you know how to do that? Would you like to work on it?
    Anyway, I upgraded from v0_3_5_1758 to v0_3_5_1920. This is correct? It still says GCC 4.6.1
    We haven't changed the base GCC version with this update. Only the Propeller code generation has been changed to produce P2 code.
    The first time I compile, I get this error:
    ...
    ...
    propeller-elf-g++ -mlmm -I/home/propgcc/unity/ -I/home/propgcc/gccutilities/ -I../ -dM   -Os -m32bit-doubles -mfcache -fno-exceptions -fno-rtti -fpermissive -ffunction-sections -fno-strict-aliasing -std=gnu++0x -Wl,--script=/home/propgcc/gccutilities/main.ld -Wl,--gc-sections -Wl,--print-gc-sections -o main.elf -D UNIT_TEST gpsparser.cpp gpsparser.generate.cpp gpsparser.test.cpp numbers.cpp serial.cpp  /home/propgcc/unity/unity.cpp
    ...
    ...
    /opt/parallax/lib/gcc/propeller-elf/4.6.1/../../../../propeller-elf/bin/ld:/home/user/propgcc/gccutilities/main.ld:198: warning: memory region `kerextmem' not declared
    /opt/parallax/lib/gcc/propeller-elf/4.6.1/cmm/short-doubles/_crt0.o: In function `__mem_kernel_ptr':
    (.kernel+0x5c8): undefined reference to `__load_start_memory_kerext'
    collect2: ld returned 1 exit status
    make: *** [Unit] Error 1
    
    (note: the single line compile command is above, and the relevant bit of it's output below).

    main.ld is a custom linker script used to help facilitate garbage collection (as started, but not finished for all code, here). I also updated the script to the newest version (via the default). Unfortunately, this is the dreaded error that occurs when there is cog assembly code assembled with GCC, and the magic __load_start_* label is created. I haven't figured out how to overcome this yet in garbage collection (essential for the Propeller), so for me this new version of PropGCC is broken.
    Ummm... I'm not sure what could have happened here. I'll try to take a look later or maybe Eric will jump in and give an opinion.
    The other features of PropGCC seem to be working, however: I ran 230 unit tests over a variety of problems in both CMM mode and LMM mode, and they all passed (if they fit in memory without garbage collection).

    So, that's my conclusion: the new build breaks current garbage collection, but works otherwise.

    Thanks very much for all of your help in testing!!!! If Ken does offer and incentive to help, you will certainly qualify!!
  • David BetzDavid Betz Posts: 14,516
    edited 2013-03-12 19:40
    SRLM wrote: »
    This isn't really a PropGCC problem, but I noticed that Google Code no longer has a code search function?!?!?
    I've never tried using the search function so I hadn't noticed that. Maybe post a message to one of their forums asking about it?
  • SRLMSRLM Posts: 5,045
    edited 2013-03-12 20:00
    David Betz wrote: »
    Ummm... I'm not sure what could have happened here. I'll try to take a look later or maybe Eric will jump in and give an opinion.

    Just to clarify: the garbage collection of __load_start_* labels is not new: it's been doing that since I started looking into the subject. The new part is that label __load_start_memory_kerext: this did not exist in the previous versions. So as long as no user code (in previous versions) had any __load_start_* labels garbage collection worked fine.
Sign In or Register to comment.