Shop OBEX P1 Docs P2 Docs Learn Events
The WireWorld Computer - Page 6 — Parallax Forums

The WireWorld Computer

12346

Comments

  • potatoheadpotatohead Posts: 10,254
    edited 2013-05-21 10:20
    BTW MacHG is awesome. It displays everything, can compare, etc... Highly recommended. Doing this thrashing around command line would have taken much longer.
  • David BetzDavid Betz Posts: 14,511
    edited 2013-05-21 10:22
    potatohead wrote: »
    BTW MacHG is awesome. It displays everything, can compare, etc... Highly recommended. Doing this thrashing around command line would have taken much longer.
    I have MacHG installed. I'm just used to using the command line tools so I don't use it very often.
  • potatoheadpotatohead Posts: 10,254
    edited 2013-05-21 10:27
    I don't blame you. Last time I worked with a code body this big it was xmame on SGI Irix, and a lot is new, changed, or forgotten. :)

    Was command line then with gcc and mipspro.

    How are you guys making installation packages? When the current build finished, it was not obvious to me what to do from there.

    Mac environment is soooo nice. I got my XP machine back and will have 7 soon too, but now that I am going down this road, I may well continue. Nice to have a good UNIX and no BS GUI...
  • David BetzDavid Betz Posts: 14,511
    edited 2013-05-21 10:44
    I just finished building the default branch and it supports both P1 and P2. There is no need to build the p2test branch anymore.
  • jazzedjazzed Posts: 11,803
    edited 2013-05-21 10:44
    potatohead wrote: »
    So far, xcode is loaded, and I ran the rebuild.sh to just build it all from scratch. I'll check in on it this evening.

    On a 4 core Mac/Linux machine without SSD use " ./jbuild.sh 6 rm-all " and take a 15 minute coffee break. Windows folks must use rebuild.sh (only 1 job possible).
  • David BetzDavid Betz Posts: 14,511
    edited 2013-05-21 10:47
    jazzed wrote: »
    On a 4 core Mac/Linux machine without SSD use " ./jbuild.sh 6 rm-all " and take a 15 minute coffee break. Windows folks must use rebuild.sh (only 1 job possible).
    I have an SSD in my MacBook Pro now and I'm not sure it improves build times that much. As I recall, writing to an SSD might actually be slower than writing to a HD. Maybe I should have upgraded to a 7200 RPM HD instead of the SSD.
  • potatoheadpotatohead Posts: 10,254
    edited 2013-05-21 10:48
    Cool. :). Given that, I may be propping again this evening.
  • BaggersBaggers Posts: 3,019
    edited 2013-05-21 12:49
    David, did you upload the OSX 10.6 version yet?
  • David BetzDavid Betz Posts: 14,511
    edited 2013-05-21 12:51
    Baggers wrote: »
    David, did you upload the OSX 10.6 version yet?
    Not yet. I'll try to get to it tonight. The weekend was a total loss because of other commitments. Sorry!
  • BaggersBaggers Posts: 3,019
    edited 2013-05-21 13:45
    No worries! :D
  • David BetzDavid Betz Posts: 14,511
    edited 2013-05-21 14:46
    Baggers wrote: »
    I'm getting Illegal instruction 4 now! :(

    I've read when building it, if you add -mmacosx-version-min=10.6 then it should work on Lion also!
    Hmmm... It turns out that rebuilding adding ths option isn't as easy as it sounds. The jbuild.sh script builds PropGCC in lots of little pieces and I don't know of a way to make sure that option is passed into each of those builds without a lot of hacking of the build scripts and Makefiles. Does anyone have a Snow Leopard system who is willing to try building PropGCC?
  • BaggersBaggers Posts: 3,019
    edited 2013-05-21 15:31
    I'm currently downloading Mountain Lion, on my MBP at my neighbours, to get around the max 4GB download file size that BT have on their "unlimited business broadband" HUB that they gave me, go figure! haha

    Will hopefully install that tomorrow, and try the Mountain Lion version :)
  • potatoheadpotatohead Posts: 10,254
    edited 2013-05-21 15:44
    Snow Leopard is what I'm building on right now. One way or the other, we will get a C that runs on these various Mac OSes.
  • David BetzDavid Betz Posts: 14,511
    edited 2013-05-21 16:16
    potatohead wrote: »
    Snow Leopard is what I'm building on right now. One way or the other, we will get a C that runs on these various Mac OSes.
    I'm normally a Mac fan but it's pretty annoying that even a system as recent as Snow Leopard isn't compatible with Mountain Lion. I don't think Microsoft would ever do that.
  • David BetzDavid Betz Posts: 14,511
    edited 2013-05-21 16:30
    potatohead wrote: »
    Snow Leopard is what I'm building on right now. One way or the other, we will get a C that runs on these various Mac OSes.
    Could you somehow get your build to Baggers once you get it working?

    Thanks!
    David
  • potatoheadpotatohead Posts: 10,254
    edited 2013-05-21 16:46
    Yes, I plan to do just that. Can use dropbox or something.

    :)
  • potatoheadpotatohead Posts: 10,254
    edited 2013-05-21 20:09
    This makes me happy:
    spanky:bin ddingus$ ./propeller-elf-gcc -v
    Using built-in specs.
    COLLECT_GCC=./propeller-elf-gcc
    COLLECT_LTO_WRAPPER=/opt/parallax/libexec/gcc/propeller-elf/4.6.1/lto-wrapper
    Target: propeller-elf
    Configured with: ../../propgcc/gcc/configure --target=propeller-elf --prefix=/opt/parallax --disable-nls --disable-libssp --disable-lto --disable-shared --with-pkgversion=propellergcc_v0_3_5_ --with-bugurl=http://code.google.com/p/propgcc/issues
    Thread model: single
    gcc version 4.6.1 (propellergcc_v0_3_5_) 
    
    spanky:p2load ddingus$ p2load
    error: can't find a port with a propeller chip
    
    

    Now I need some direction / advice

    I just did this on the latest P2test branch. That had p2load in it, and P2load appears to require PropGCC. Both built and worked with the default scripts. Didn't have to do much of anything really.

    I see that the build script drops it all into /opt/parallax This is good. I can tar it up, compress it and I think that's a package. Am I right about that? I went ahead and copied the two files associated with P2load into /opt/parallax/bin, just so it's all in the PATH. Ran both on a quick test and they both executed.

    So I think I have a slightly out of date PropGCC + P2load package.

    I want to build the latest PropGCC and include the P2load I just made. Will that work, or should I build the latest PropGCC then go back and build P2load?

    Assuming that it doesn't make a difference, I'm going to update my clone of the repository and get the current PropGCC built. Let me know about P2load, and anything I need to do in order to make a valid distribution package.

    My best guess below.
  • potatoheadpotatohead Posts: 10,254
    edited 2013-05-21 20:40
    @Jazzed: Holy Smile! Yeah, thanks for that. This Mac is moving right along! Fan came on, and the text is screaming by in the terminal. Sweet! Started 8:27, ended 8:38. :) No SSD, 5400 RPM disk, 2.2 Ghz i7, 4GB RAM.
  • potatoheadpotatohead Posts: 10,254
    edited 2013-05-21 21:13
    I've tar compressed "tar -cxf" everything and it should work on Mac OS 10.6.8 or greater... This package has P2load in it, and the install instructions are:

    0. Get the package here: https://www.dropbox.com/sh/pf1uulr4bbuof5v/gCm6Xx0wYC?v=1mcis

    1. Uncompress this where you want it to reside. With root, you can use /opt/parallax ; otherwise, put it in your home directory. You can double click the package and Mac OS will just create the opt/parallax directory right where the archive is. Copy it to the desired location however you want to. Edit: If you are on command line, not Finder or some other utility, I would use cp -Rp so that the permissions carry over to the destination.

    2. Deal with MacOS Internet ACL permissions: xattr -r -d com.apple.quarantine [directory location] You might want to do ls -le to verify the com.apple.quarantine is the offending ACL. Repeat this until you do not see an "@" sign in your UNIX permissions seen with ls -l. Optionally, chmod -R 777 [directory location] to make everything executable, readable, writable. Admittedly, a bulk chmod is bad practice, but it's quick. Without a script to set permission defaults, it's a tedious exercise otherwise. Ideally, the tarball contains the right stuff and you can skip the chmod step. Try running and building with it before you decide to chmod the whole thing.

    3. Set your path. I need to learn how to do this on MAC OS properly. Maybe somebody can chime in. What I did was just set the path in the terminal I was using because it's not hard:

    Say you did put this in /opt/parallax ...

    PATH=/opt/parallax/bin:$PATH
    export PATH

    4. Dry run! Try Propgcc and P2load to verify they run.
    spanky:~ ddingus$ propeller-elf-gcc -v
    Using built-in specs.
    COLLECT_GCC=propeller-elf-gcc
    COLLECT_LTO_WRAPPER=/opt/parallax/libexec/gcc/propeller-elf/4.6.1/lto-wrapper
    Target: propeller-elf
    Configured with: ../../propgcc/gcc/configure --target=propeller-elf --prefix=/opt/parallax --disable-nls --disable-libssp --disable-lto --disable-shared --with-pkgversion=propellergcc_v1_0_0_ --with-bugurl=http://code.google.com/p/propgcc/issues
    Thread model: single
    gcc version 4.6.1 (propellergcc_v1_0_0_) 
    spanky:~ ddingus$ p2load
    error: can't find a port with a propeller chip
    spanky:~ ddingus$ 
    

    Now you are where I am. It runs, that's all I've checked. Now I need to get the USB, etc... all sorted out. :)

    You guys running on Mac OS have any hints? I've got an XP virtual machine on this Mac, so I can run Pnut. What I don't know is how to setup the Prop Plug.

    5. Get the Demos I just added to the folder link above. Put them in the parallax folder, where ever you put it. The default is /opt/parallax/demos

    6. Go and build one:
    spanky:toggle ddingus$ cd lmm_c_toggle
    spanky:lmm_c_toggle ddingus$ ls -l
    total 16
    -rw-r--r--  1 ddingus  admin   397 May 21 20:20 Makefile
    -rw-r--r--  1 ddingus  admin  3354 May 21 20:20 toggle.c
    spanky:lmm_c_toggle ddingus$ make
    propeller-elf-gcc -Os -mlmm -mlmm -o toggle.o -c toggle.c
    propeller-elf-gcc -mlmm -o toggle.elf toggle.o  -s
    spanky:lmm_c_toggle ddingus$ ls -l
    total 56
    -rw-r--r--  1 ddingus  admin    397 May 21 20:20 Makefile
    -rw-r--r--  1 ddingus  admin   3354 May 21 20:20 toggle.c
    -rwxr-xr-x  1 ddingus  admin  15076 May 21 21:26 toggle.elf
    -rw-r--r--  1 ddingus  admin   2972 May 21 21:26 toggle.o
    spanky:lmm_c_toggle ddingus$ 
    
    

    7. Ideally build one for P2, and that's all the time I had. We can discuss that tomorrow. :)
  • BaggersBaggers Posts: 3,019
    edited 2013-05-22 02:08
    Thanks Doug :D

    I can build, but don't seem to be able to use the -mp2 option for building sdramtest
    Does this mean it doesn't to P2Stuff?

    I also ran the toggle demo, but no leds are flashing on the P2, the code looks very P1-ish, which would probably explain why it doesn't run on P2.

    Any ideas on why -mp2 doesn't work?
  • potatoheadpotatohead Posts: 10,254
    edited 2013-05-22 07:01
    That's going to have to be answered by the guys that wrote it. Maybe the P2 options aren't there yet, or there is a build argument required, or they are changed...

    I also have the latest P2test branch build... I just dropped it in the dropbox folder. Maybe swap that one in and see if it builds P2 code. Let it upload for a few minutes, and it should be there.
  • David BetzDavid Betz Posts: 14,511
    edited 2013-05-22 07:02
    Baggers wrote: »
    Thanks Doug :D

    I can build, but don't seem to be able to use the -mp2 option for building sdramtest
    Does this mean it doesn't to P2Stuff?

    I also ran the toggle demo, but no leds are flashing on the P2, the code looks very P1-ish, which would probably explain why it doesn't run on P2.

    Any ideas on why -mp2 doesn't work?
    Hmmm... Maybe he pulled his copy just before Eric committed the merged version? As I said in a previous message, I checked yesterday morning and found no new changes in the repository but then checked an hour or so later and found Eric's merged version but it was dated 27 hours previous to that. Maybe it takes Google Code some time to commit changes? Anyway, try checking again. I know it's there now and I was able to build the default branch and compile and run P2 programs successfully with it on my Mac.
  • potatoheadpotatohead Posts: 10,254
    edited 2013-05-22 07:06
    Can you tell me the revision number? I find the branch thing confusing still. I need to make sure I build the right one.

    Edit: I see nothing dated 27 hours ago. I'm too far back in time! Well, getting good at building stuff. Now it's time to get good at this form of revision control. (which I really like, BTW)

    Does revision 2042 seem familiar? It's dated 20 hours ago.
  • David BetzDavid Betz Posts: 14,511
    edited 2013-05-22 07:11
    potatohead wrote: »
    Can you tell me the revision number? I find the branch thing confusing still. I need to make sure I build the right one.
    The correct branch is the default branch at this point. I'm not sure we've been good at updating the revision numbers consistently and also they only get used when we make a release. If you type 'hg incoming" in the propgcc directory you should be able to determine if there are any changes you need to pull. If you type "hg branch" it should let you verify that you're on the "default" branch. Just to be safe I'd try this:

    hg checkout default
    hg pull
    hg update
    ./jbuild.sh 5 rm-all

    This is assuming you haven't made any changes of your own.
  • potatoheadpotatohead Posts: 10,254
    edited 2013-05-22 07:18
    I've not touched it. Just building and packaging at the moment. How about this: 2042 : 8594f038e053 That's the change ID.

    Ran it command line, then fired up the GUI, no difference. I think I've got the right one. Building it now. I can cram this in for Jim to play with while I'm at work. :)

    I'm gonna mark it P2, with whatever alpha version GCC reports and leave the other package in case somebody wants a V1.0 GCC for their P1 and Mac. It's built, might as well not waste it. If this works, I'll remove the older P2test build.

    Then I think it will be all sorted out.
  • David BetzDavid Betz Posts: 14,511
    edited 2013-05-22 07:27
    potatohead wrote: »
    I've not touched it. Just building and packaging at the moment. How about this: 2042 : 8594f038e053 That's the change ID.

    Ran it command line, then fired up the GUI, no difference. I think I've got the right one. Building it now. I can cram this in for Jim to play with while I'm at work. :)

    I'm gonna mark it P2, with whatever alpha version GCC reports and leave the other package in case somebody wants a V1.0 GCC for their P1 and Mac. It's built, might as well not waste it. If this works, I'll remove the older P2test build.

    Then I think it will be all sorted out.
    If you type "propeller-elf-gcc --target-help" you should get a bunch of stuff that talks about "propeller2". That will tell you if you have a build that will work with the P2.
  • potatoheadpotatohead Posts: 10,254
    edited 2013-05-22 07:28
    Will do when it's done. About 5 mins...

    For reference and others who may do this, I'm pulling into a working directory in my home. Building with the ./jbuild.sh 5 rm-all command.

    Build P2load with make

    In /opt/parallax, I'm renaming older builds and leaving them there so they can be packaged, if need be.

    Copy build of P2load into /opt/parallax/bin

    Set path

    When it's done, test with a few quick runs on the command line and to get the version number GCC reports.

    Tar -cxf [archive name] /opt/parallax

    Copy to Dropbox.
  • David BetzDavid Betz Posts: 14,511
    edited 2013-05-22 07:30
    potatohead wrote: »
    Will do when it's done. About 5 mins...
    I think you must have a faster Mac than I do! My builds take a lot longer than that.
  • potatoheadpotatohead Posts: 10,254
    edited 2013-05-22 07:39
    This one is taking a little longer. Should have been done. I think that V1.0 build takes less time. Or the Mac was just running good last night. Oh, here's a difference!

    Today, I did what you did, which was supply 5 to jbuild. Last night I used 6 on Jazzed recommendation. Maybe add one to the job pool next time? Last night, I ran top to see the load average, which was 4.5 Today, it's about 2. Perhaps that makes a significant difference.
  • David BetzDavid Betz Posts: 14,511
    edited 2013-05-22 07:43
    potatohead wrote: »
    This one is taking a little longer. Should have been done. I think that V1.0 build takes less time. Or the Mac was just running good last night. Oh, here's a difference!

    Today, I did what you did, which was supply 5 to jbuild. Last night I used 6. Maybe add one to the job pool next time? Last night, I ran top to see the load average, which was 4.5 Today, it's about 2. Perhaps that makes a significant difference.
    Maybe but I only have a dual core processor. Maybe it's time to upgrade! :-)
Sign In or Register to comment.