Shop OBEX P1 Docs P2 Docs Learn Events
Building PropGCC with Windows7, 64-bit — Parallax Forums

Building PropGCC with Windows7, 64-bit

RaymanRayman Posts: 14,665
edited 2013-04-09 09:14 in Propeller 1
Just to punish myself, I'm seeing if I can compile the latest version of propgcc on my Windows desktop...

Following the instructions on this page:
http://code.google.com/p/propgcc/wiki/PropGccBuild

One thing left off is that you need to install a mercurial thing, like TortoiseHg.
That was pretty easy to install, and I used it's GUI to download propgcc source, instead of from the command line.
I don't think it worked from the command line for me anyway...

After it downloaded (~5 minutes), I copied it to deep inside the MinGW folder, where the instructions had me make a "gccdev" folder from the command line.

The build script is running now. I'm interested to see how long it takes... Will seem like a miracle if it actually works!

Comments

  • RaymanRayman Posts: 14,665
    edited 2013-04-08 10:20
    Also, just a note, I meant to say that I found MSYS to be installed by the MinGW installer. So, that wasn't a seperate step.
    And, as a result, the MSYS folder is under the MinGW folder.
    So, the paths are different that what is shown in the instructions...
  • jazzedjazzed Posts: 11,803
    edited 2013-04-08 11:32
    Oh my. You are being adventrurous.

    I take it you have all the packages? It can be very frustrating to build without them.
    Unfortunately Mingw/msys doesn't support multiple jobs. It takes my PC hours to build that.

    Linux by comparison takes under 10 minutes using 6 jobs on a 4 core allocation.
    There is a way to cross-compile Linux to Windows, but we never bothered to add it.

    Good luck.
  • RaymanRayman Posts: 14,665
    edited 2013-04-08 11:38
    Well, it's done already. So, that was <2 hours. But, now I'm not sure where the output is...

    I think it's in ..\opt\parallax\

    There seems to be a lot of things missing though when I compare to my propgcc folder...
    For example, the \bin folder there are about six files missing, things like spin2cpp.exe and the libintl-8.dll file...

    Also the doc and demos folders aren't there...
    Is there another script that copies over these files?
  • jazzedjazzed Posts: 11,803
    edited 2013-04-08 11:53
    Less than 2 hours is pretty good. Congrats.

    Go to the release folder and type ./release.sh . It should make a release folder and a .zip package for you automatically.

    Not sure if the libintl, etc... files have been added to that yet. It's probably best to straighten that out soon. I can't do that at the moment though.
  • David BetzDavid Betz Posts: 14,516
    edited 2013-04-08 12:02
    jazzed wrote: »
    Less than 2 hours is pretty good. Congrats.

    Go to the release folder and type ./release.sh . It should make a release folder and a .zip package for you automatically.

    Not sure if the libintl, etc... files have been added to that yet. It's probably best to straighten that out soon. I can't do that at the moment though.
    I added those libraries this morning and I added the new one to release.sh so it gets copied into the directory that gets zipped.
  • RaymanRayman Posts: 14,665
    edited 2013-04-08 12:05
    Ok, that seems to have almost done it. Looks like almost everything is there, in the "release" folder now.
    Got an error on make.exe and remove.exe being "No such file". But, I don't thing that's too important for me.

    Besides those two, only thing I see missing in \bin is "spin2cpp.exe" and "propgcc-map-sizes.pl"
    Think I'll try it now and see if it works...


    The two lib dll files are there...
    Was hoping to see propeller-elf-image-size.exe, but guess David didn't get to that yet...
  • jazzedjazzed Posts: 11,803
    edited 2013-04-08 12:06
    David Betz wrote: »
    I added those libraries this morning and I added the new one to release.sh so it gets copied into the directory that gets zipped.

    Thanks David. Can you please double commit to the default branch?
  • RaymanRayman Posts: 14,665
    edited 2013-04-08 12:12
    Uh-Oh, my first test didn't go so well.... Got this:

    >cc1.exe : error : unrecognized command line option '-mp2'

    Maybe I downloaded a very old version?
  • jazzedjazzed Posts: 11,803
    edited 2013-04-08 12:13
    Rayman wrote: »
    Ok, that seems to have almost done it. Looks like almost everything is there, in the "release" folder now.
    Got an error on make.exe and remove.exe being "No such file". But, I don't thing that's too important for me.

    Besides those two, only thing I see missing in \bin is "spin2cpp.exe" and "propgcc-map-sizes.pl"
    Think I'll try it now and see if it works...


    The two lib dll files are there...
    Was hoping to see propeller-elf-image-size.exe, but guess David didn't get to that yet...


    @Rayman,

    Our upcomming release will only be from the default (with a maintenance branch when we're ready). The p2test branch is not fully functional yet.

    Several things from p2test like spin2cpp are not in the default branch. I never included the perl program because I don't think it's necessary to force users to have Perl installed.

    As you see, the default branch does not support -mp2 ...

    Best regards,
    --Steve
  • RaymanRayman Posts: 14,665
    edited 2013-04-08 12:43
    Ok, I think you're saying that the posted source code is old. So, I suppose I should leave that alone and just use the posted Windows binaries, which are newer.
  • ersmithersmith Posts: 6,054
    edited 2013-04-08 13:14
    Rayman wrote: »
    Ok, I think you're saying that the posted source code is old. So, I suppose I should leave that alone and just use the posted Windows binaries, which are newer.

    The default branch in Mercurial is the old (P1 only) compiler. The new one is on a branch called "p2test". On the command line you can switch over to the branch by saying "hg update p2test" (it's pretty quick, if you've downloaded the repository all the changes are already on your local machine). I'm sure TortoiseHg has some similar functionality.

    Eric
  • jazzedjazzed Posts: 11,803
    edited 2013-04-08 13:15
    @Rayman,

    The default branch is stable. The p2test branch is the development branch for P2.
    If you want the p2test branch use the command $ hg update p2test (or the tortoise equivalent). Postedit: I see Eric beat me to it.
    jazzed wrote: »
    Thanks David. Can you please double commit to the default branch?

    @David, I'm sorry, I realize that I don't need (or want) that double-commit now as the default does not have gdb support.
  • RaymanRayman Posts: 14,665
    edited 2013-04-08 13:51
    I think I need a full path to p2test.... This is what I used to download the default branch: https://code.google.com/p/propgcc/

    Is there a URL like that for p2test?
  • David BetzDavid Betz Posts: 14,516
    edited 2013-04-08 13:52
    Rayman wrote: »
    I think I need a full path to p2test.... This is what I used to download the default branch: https://code.google.com/p/propgcc/

    Is there a URL like that for p2test?
    I think that will download the entire repository. You should now be able to select the p2test branch using "hg update p2test" or maybe it's "hg checkout p2test".
  • RaymanRayman Posts: 14,665
    edited 2013-04-08 15:03
    Ok, I clicked on the latest p2test branch in a TortoiseHg window and I think it updated to that version, it was very fast though.
    I'm recompiling now...
  • David BetzDavid Betz Posts: 14,516
    edited 2013-04-08 15:21
    Rayman wrote: »
    Ok, I clicked on the latest p2test branch in a TortoiseHg window and I think it updated to that version, it was very fast though.
    I'm recompiling now...
    It does tend to be pretty fast to switch branches.
  • RaymanRayman Posts: 14,665
    edited 2013-04-09 06:25
    Build seems to work now. Can run the "fft" demo on P2 (DE0 emulator).

    But, the Dhrystone demo doesn't run. I guess this is a seperate issue though...
    Gives a lot of warnings that look like this: "propeller architecture mismatch: old = 0x00000001, new = 0x00000002, filename = dry1.o
  • ersmithersmith Posts: 6,054
    edited 2013-04-09 07:04
    Rayman wrote: »
    But, the Dhrystone demo doesn't run. I guess this is a seperate issue though...
    Gives a lot of warnings that look like this: "propeller architecture mismatch: old = 0x00000001, new = 0x00000002, filename = dry1.o

    Looks like you have some object files left over from a P1 build, and are now trying to build for P2. Doing a "make clean" (or just removing all the .o files manually) should get rid of the old files and let it make new ones.
  • RaymanRayman Posts: 14,665
    edited 2013-04-09 07:10
    I see what I did wrong now...
    That demo first makes dry1.o and dry2.o before combining to a.out. I left off the -mp2 option on that last step...

    It loads now, but shows no output in the text window, so I must has something else wrong too...
  • RaymanRayman Posts: 14,665
    edited 2013-04-09 09:14
    Got a few of the demos working in P2 mode (fft, fibo, calc, hello).

    Dhrystone still won't run though. I think I see why now... The propeller-elf-image-size reports as 34676 bytes when compiled for P2...
    This is 5kB more than when compiled for P1 for some reason... It's too big for my DE0, I think...

    I'll try size optimize and see if that helps it go...
    It runs with size optimize.
Sign In or Register to comment.