Shop OBEX P1 Docs P2 Docs Learn Events
Serious PropellerIDE serial terminal problems on MacOS High Sierra - Page 2 — Parallax Forums

Serious PropellerIDE serial terminal problems on MacOS High Sierra

2»

Comments

  • If you open the PropellerIDE.app in finder, you will see that there is a separate openspin compiler inside it that is a Unix executable. Also inside is propelleride which is another Unix executable. So it looks like propelleride calls openspin. However, if you copy and try to run openspin from the command line, you get a

    dyld: Library not loaded: @rpath/QtGui.framework/Versions/5/QtGui

    error. So there seem to be some Qt dependencies missing. Shame - because I would like to be able to run openspin from the command line.

    I notice that you can also get Open Spin here:

    https://github.com/parallaxinc/OpenSpin

    Does anyone use this version?
  • Yep - I originally tried to use Applescript, but I guess I am just a Python hacker at heart. You can also just write a bash script and call that from Applescript - might be easier.
  • David, is there more documentation/links for the new PropLoader?
    Ummm... I'm afraid not. The source code is in the Parallax GitHub account though. I realize that is not an adequate substitute for real documentation but it might help track down a question if you're in a pinch.

  • Jim_Arlow wrote: »
    If you open the PropellerIDE.app in finder, you will see that there is a separate openspin compiler inside it that is a Unix executable. Also inside is propelleride which is another Unix executable. So it looks like propelleride calls openspin. However, if you copy and try to run openspin from the command line, you get a

    dyld: Library not loaded: @rpath/QtGui.framework/Versions/5/QtGui

    error. So there seem to be some Qt dependencies missing. Shame - because I would like to be able to run openspin from the command line.
    The files within: PropellerIDE.app/Contents/MacOS/ are all UNIX (actually Mach-O x86_64) executables and should run from within the Terminal app, within reason. Note: bstc will no longer run on recent macOS versions, running the propelleride executable outside of the app's package won't run correctly, etc...

    You can actually copy-out openspin to a common directory such as /opt/parallax/bin/ (you'll have to make that directory and add it to your PATH environment variable in order for Terminal to see it). And, run it without the PropellerIDE or SimpleIDE.

    openspin itself should have no dependencies on Qt libraries as it is merely just dropped into the PropellerDE package after the IDE is built in Qt.
    https://github.com/parallaxinc/OpenSpin
    ...
    Does anyone use this version?
    Yes, I generally run openspin and many other propeller tools from an /opt/parallax/bin directory (this is the usual directory for installing propeller-gcc and all its executables). Here's a quick list of all the standard propeller tools (and some for the upcoming P2) that I use:
    ls /opt/parallax/bin
    diffit p2load propeller-elf-gcov propeller-elf-strings
    dir-created propeller-elf-addr2line propeller-elf-gprof propeller-elf-strip
    fastspin propeller-elf-ar propeller-elf-image-size propeller-load
    gdbstub propeller-elf-as propeller-elf-ld proploader
    loadp2 propeller-elf-c++ propeller-elf-ld.bfd s2pasm
    openspin propeller-elf-c++filt propeller-elf-nm spin2cpp
    p2asm propeller-elf-cpp propeller-elf-objcopy spinsim
    p2dump propeller-elf-elfedit propeller-elf-objdump split
    p2dumpobj propeller-elf-g++ propeller-elf-ranlib stdio.a
    p2gcc propeller-elf-gcc propeller-elf-readelf stdlib.a
    p2link propeller-elf-gcc-4.6.1 propeller-elf-size string.a


    dgately
  • Thanks for the information!

    As I mentioned above, I did copy out openspin to a separate directory, but I get this error when I try to run it:

    >/Users/XXXX/XXXX/XXXX/openspin

    dyld: Library not loaded: @rpath/QtGui.framework/Versions/5/QtGui
    Referenced from: /Users/XXXX/XXXX/XXXX/openspin
    Reason: image not found
    Abort trap: 6

    (I replaced the actual directories with XXXX for privacy).

    I am very puzzled as to why the openspin compiler copied out of PropellerIDE package appears to reference QtGui.
  • Jim_Arlow wrote: »
    Thanks for the information!

    As I mentioned above, I did copy out openspin to a separate directory, but I get this error when I try to run it:

    >/Users/XXXX/XXXX/XXXX/openspin

    dyld: Library not loaded: @rpath/QtGui.framework/Versions/5/QtGui
    Referenced from: /Users/XXXX/XXXX/XXXX/openspin
    Reason: image not found
    Abort trap: 6

    (I replaced the actual directories with XXXX for privacy).

    I am very puzzled as to why the openspin compiler copied out of PropellerIDE package appears to reference QtGui.
    The normal Parallax version of OpenSpin does not need QT. Brett created his own version for PropellerIDE and used some of the QT libraries. I doubt it really uses the GUI functions. It is probably just using the lower level file I/O stuff and maybe command line argument parsing.

  • Thanks, David - that makes sense. Do you know where can I get a copy of OpenSpin for Mac? I can't find it on the Parallax website.
  • David BetzDavid Betz Posts: 14,511
    edited 2018-06-14 16:06
    (deleted)
  • Jim_Arlow wrote: »
    Thanks, David - that makes sense. Do you know where can I get a copy of OpenSpin for Mac? I can't find it on the Parallax website.
    Here is a Macintosh build of the current OpenSpin sources from the Parallax GitHub site.

  • Thanks David! It runs fine, but I get this error when I compile a file that uses one of the libraries (Terminal.spin):
    jimarlow$ /Users/XXX/XXX/XXX/openspin Blink01.spin
    Propeller Spin/PASM Compiler 'OpenSpin' (c)2012-2018 Parallax Inc. DBA Parallax Semiconductor.
    Version 1.00.81 Compiled on Jun 14 2018 12:05:14
    Compiling...
    Blink01.spin
    |-Parallax Serial Terminal.spin
    Parallax Serial Terminal.spin : error : Can not find/open file.
    

    Not surprising - it can't find the libraries.

    Is there an environment variable where the library path is set on the Mac? In fact, on my installation, all the libraries are embedded in the PropellerIDE package and are quite invisible, so how would that work? Do I need to pull them out somewhere?

    Thanks again for your help! I'm getting there...
  • From this usage message it looks like you can provide a library path using the -L or -I options. I don't know if openspin looks for an environment variable.
    Propeller Spin/PASM Compiler 'OpenSpin' (c)2012-2018 Parallax Inc. DBA Parallax Semiconductor.
    Version 1.00.81 Compiled on Jun 14 2018 12:05:14
    usage: openspin
             [ -h ]                 display this help
             [ -L or -I <path> ]    add a directory to the include path
             [ -o <path> ]          output filename
             [ -b ]                 output binary file format
             [ -e ]                 output eeprom file format
             [ -c ]                 output only DAT sections
             [ -d ]                 dump out doc mode
             [ -t ]                 output just the object file tree
             [ -f ]                 output a list of filenames for use in archiving
             [ -q ]                 quiet mode (suppress banner and non-error text)
             [ -v ]                 verbose output
             [ -p ]                 disable the preprocessor
             [ -a ]                 use alternative preprocessor rules
             [ -D <define> ]        add a define
             [ -M <size> ]          size of eeprom (up to 16777216 bytes)
             [ -s ]                 dump PUB & CON symbol information for top object
             [ -u ]                 enable unused method elimination
             <name.spin>            spin file to compile
    
  • It's odd that Brett used Qt libraries in his version of openspin, but alas it was done. I guess I had replaced it with my own built version of openspin on my system (I rebuilt PropellerIDE to run pbasic, using openspin rather than bstc to complete its build process. I must have replaced all of the tools in the IDE package).

    In order to keep my tools up-to-date as possible, I actually (as mentioned above) place them into a known directory and set my IDEs to look for them in that location, generally ignoring the built-in tools location in the app package :-)

    dgately
  • Yes - I will set a library path.
    In order to keep my tools up-to-date as possible, I actually (as mentioned above) place them into a known directory and set my IDEs to look for them in that location, generally ignoring the built-in tools location in the app package :-)

    OK - I see why you need to do that now. I will do the same.

    I notice that openspin has a -u flag that enables unused method elimination. In a previous post, Tracy mentioned that Propeller Tool doesn't use this, which is kind of odd. I get the impression that the openspin/proploader toolchain is a more robust and controllable option than any of the IDEs. If only we had Spin syntax highlighting in a decent editor like Atom...
  • Jim_ArlowJim_Arlow Posts: 37
    edited 2018-06-15 12:02
    OK - it all works.

    1. I placed proploader and openspin in usr/bin/local which is on my path.
    2. I copied the Resources folder from within the PropellerIDE app to ~/SpinLibraries, which is a directory I created to hold it.
    3. I call openspin as follows:
    openspin -L ~/SpinLibraries/Resources/library Blink01.spin
    

    Creates a .binary file as advertised.

    In terms of file sizes:
    openspin -L ~/SpinLibraries/Resources/library Blink01.spin
    

    gives a binary file of 1232 bytes, and with the -u flag to remove unused methods:
    openspin -L ~/SpinLibraries/Resources/library -u Blink01.spin
    

    we get a binary file of 564 bytes. I can see why Tracy is concerned that Propeller Tool does not seem to use the -u flag!

    Using the -t flag lists the object files:
    openspin -L ~/SpinLibraries/Resources/library -t Blink01.spin
    
    Blink01.spin
    |-Parallax Serial Terminal.spin
    

    So eliminating the extra methods from Parallax Serial Terminal really makes a difference.

    Thanks to everyone for your help!
Sign In or Register to comment.