Forum Update - Announcement about May 10th, 2018 update and your password.

Can't Wait for PropGCC on the P2?

1234568»

Comments

  • Here's the latest release of p2gcc. This release contains the fixes for running under MacOS and the SD SPI driver fix that allows using the latest version of PropGCC. There are also several changes in p2asm that fixes problems with assembling ROM_137PBJ.spin2 and SD2_test_121a.spin2.

    Finally, I fixed the -s option in loadp2 that enables loading a program at a different address than address 0. This feature is used with the shell program that runs at location $8000. the shell program is similar to filetest, but also contains a "run" command to execute binaries located on an SD card.
  • Dave,

    One small request...

    Adding a port (-p "") option in p2gcc that would just pass the P2's port name as-is to p2load would make for a smooth one-command build-load-run for all OS's. Right now, I think the p2gcc-p2load process (when runs as: "p2gcc -r -T ... filename.spin2) assumes a Linux-style port name and searches for a currently accessible P2 that way. If we can just include the name of a known port (i.e. on macOS, something like: "-p /dev/cu.usbseriaXXXNNNXX", on Linux "-p /dev/tty01...") to p2gcc and it can just pass that text along to p2load as a "-p" option, it would help.

    As it is now, I have to NOT use the -r, -t and/or -T options for p2gcc and then need to run p2load as a separate command.

    dgately

    Livermore, CA (50 miles SE of San Francisco)
  • I'll add the port option to p2gcc when I have a chance. At some point I need to look at the loader in the P1 PropGCC to see how it finds the port.
  • David BetzDavid Betz Posts: 12,078
    edited May 21 Vote Up0Vote Down
    Dave Hein wrote: »
    I'll add the port option to p2gcc when I have a chance. At some point I need to look at the loader in the P1 PropGCC to see how it finds the port.
    It uses a rather kludgy method. I'd be happy to extract it from propeller-load if you'd like. As you might guess, there is a different method used for Windows, Mac, and Linux. All you really need is a function that iterates over all of the serial ports on the system. Then you have to try the identify sequence on each one until you find one that responds like a Propeller chip.
  • David Betz wrote: »
    Dave Hein wrote: »
    I'll add the port option to p2gcc when I have a chance. At some point I need to look at the loader in the P1 PropGCC to see how it finds the port.
    It uses a rather kludgy method. I'd be happy to extract it from propeller-load if you'd like. As you might guess, there is a different method used for Windows, Mac, and Linux. All you really need is a function that iterates over all of the serial ports on the system. Then you have to try the identify sequence on each one until you find one that responds like a Propeller chip.
    One method (for macOS & Linux) is to look at all the content of /dev and filter known USB serial port names (yeah, kludgy!). I'm not sure what method is used in SimpleIDE & PropellerIDE. I know, both used custom routines for WIN, macOS & Linux.

    dgately
    Livermore, CA (50 miles SE of San Francisco)
  • I added the -p option to the p2gcc script, and checked it into GitHub.
Sign In or Register to comment.