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.
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.
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.
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:
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.
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! 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?
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 :-)
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...
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:
Comments
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?
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.
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:
dgately
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.
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...
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
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...
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:
Creates a .binary file as advertised.
In terms of file sizes:
gives a binary file of 1232 bytes, and with the -u flag to remove unused methods:
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:
So eliminating the extra methods from Parallax Serial Terminal really makes a difference.
Thanks to everyone for your help!