Brads Spin Tool - BST Solved
installed BST on Linux Mint 17.2 and it ran fine but would not connect to the Proto Board I had attached. Ran this and it seems to see the serial converter on my USB. $ dmesg | tail[ 9889.989238] usb 2-1: Product: FT232R USB UART[ 9889.989249] usb 2-1: Manufacturer: FTDI[ 9889.989260] usb 2-1: SerialNumber: AE00BT6C[ 9889.997390] ftdi_sio 2-1:1.0: FTDI USB Serial Device converter detected[ 9889.997732] usb 2-1: Detected FT232RL[ 9889.997754] usb 2-1: Number of endpoints 2[ 9889.997773] usb 2-1: Endpoint 1 MaxPacketSize 64[ 9889.997791] usb 2-1: Endpoint 2 MaxPacketSize 64[ 9889.997810] usb 2-1: Setting MaxPacketSize 64[ 9889.999582] usb 2-1: FTDI USB Serial Device converter now attached to ttyUSB0
This is my first time to try and use BST so I don't know if I am missing something or not. Tried 2 different computers with the same results. Plugged in my Prop Scope to see if Linux saw that and got this:
$ dmesg | tail[ 9889.999582] usb 2-1: FTDI USB Serial Device converter now attached to ttyUSB0[10691.200413] usb 2-1: USB disconnect, device number 17[10691.201151] ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from ttyUSB0[10691.201282] ftdi_sio 2-1:1.0: device disconnected[10730.128197] usb 2-1: new full-speed USB device number 18 using uhci_hcd[10730.324356] usb 2-1: New USB device found, idVendor=13e2, idProduct=0080[10730.324372] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3[10730.324383] usb 2-1: Product: PropScope[10730.324391] usb 2-1: Manufacturer: Parallax Inc[10730.324400] usb 2-1: SerialNumber: A601FC7H
BST does not see the Prop Scope either and sees no other ports. The "configure ports" screen is blank. Any ideas?
This is my first time to try and use BST so I don't know if I am missing something or not. Tried 2 different computers with the same results. Plugged in my Prop Scope to see if Linux saw that and got this:
$ dmesg | tail[ 9889.999582] usb 2-1: FTDI USB Serial Device converter now attached to ttyUSB0[10691.200413] usb 2-1: USB disconnect, device number 17[10691.201151] ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from ttyUSB0[10691.201282] ftdi_sio 2-1:1.0: device disconnected[10730.128197] usb 2-1: new full-speed USB device number 18 using uhci_hcd[10730.324356] usb 2-1: New USB device found, idVendor=13e2, idProduct=0080[10730.324372] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3[10730.324383] usb 2-1: Product: PropScope[10730.324391] usb 2-1: Manufacturer: Parallax Inc[10730.324400] usb 2-1: SerialNumber: A601FC7H
BST does not see the Prop Scope either and sees no other ports. The "configure ports" screen is blank. Any ideas?
Comments
Type groups in the terminal. This got me one time.
Where, oh where would we be without BST
Thank you Brad, wherever you are!
BST does not see the Prop Scope either and sees no other ports. The "configure ports" screen is blank. Any ideas?
Diito what Roger said, go to "users and groups" and make sure you are part of the dialout group and I even have the tty group too.
will tell you the access requirements of the device, this will usually (depending on distro) have read/write access for owner and group, and the group will often be 'dialout' as has been mentioned. But on some distros it may be something else, e.g. tty. Add yourself to whatever group it is.
And then on a few distros the group may be root, for those unfortunate systems you may have to do 'chmod a+rw /dev/ttyUSB0'. Or change its group, possibly having to fiddle with udev. Hopefully your distro is not among those.
-Tor
Now I have : $ ls -l /dev/ttyUSB0crw-rw---- 1 root dialout 188, 0 Jul 23 12:56 /dev/ttyUSB0
$ chmod a+rw /dev/ttyUSB0chmod: changing permissions of ‘/dev/ttyUSB0’: Operation not permitted
Thanks for the help so far, any more ideas ?
what is the actual message from bst?
Does F7 actually detect your Propeller?
What kind of Propeller board are you using?
sudo chmod a+rw /dev/ttyUSB0[sudo] password for jackson: jackson@jackson-AOA150 ~ $ ls -l /dev/ttyUSB0crw-rw-rw- 1 root dialout 188, 0 Jul 23 15:05 /dev/ttyUSB0Just for giggles, check to see if you are in the dialout group.
Type groups in the terminal. This got me one time.
Where, oh where would we be without BST
Thank you Brad, wherever you are!
Where I am now, without BST !
How are you starting bst?
Can you show us the output of the "groups" command, just to confirm 100% that you are in fact in the dialout group.
My guess is that you have the terminal using that port while you are trying to communicate with it from BST, you can't have both, this is not a Linux issue. You must either close the terminal or close the port which in minicom is as simply as going into the menu with ^A ^P which then releases the port while it sits in the menu. Once I do my F11 from BST I just hit the ESC in minicom so I can use the port again.
@dnalor - I guess you prefer running constant anti-virus scans with Windows instead
-Tor
I will mark this as solved if I can find where to do that.
Glad you solved it!
so i’m a dummy I have bstc.linux located in its own dir. But I cannot get it to install. I did install the 32 bit libs ia32-libs, but my efforts keep failing. I am running Mint 19.3. From the BSTC dir I have tried install get missing output file error or no such source. Any ideas?
Jim
(yeti@kumari:2)/opt/bst/bin$ lsb_release -sir Debian 10 (yeti@kumari:2)/opt/bst/bin$ uname -a Linux kumari 4.19.0-6-amd64 #1 SMP Debian 4.19.67-2+deb10u2 (2019-11-11) x86_64 GNU/Linux
...it just works:(yeti@kumari:2)/opt/bst/bin$ ./bstc-0.15.3 -v Brads Spin Tool Compiler v0.15.3 - Copyright 2008,2009 All rights reserved Compiled for i386 Linux at 08:17:46 on 2009/07/20 (yeti@kumari:2)/opt/bst/bin$ ./bstc-0.15.4-pre9 -v Brads Spin Tool Compiler v0.15.4-pre9 - Copyright 2008,2009,2010 All rights reserved Compiled for i386 Linux at 16:09:02 on 2010/04/21
It compiles an empty dummy program:
(and much longer stuff!)
$ echo pub main >xyzzy.spin $ /opt/bst/bin/bstc xyzzy.spin Brads Spin Tool Compiler v0.15.3 - Copyright 2008,2009 All rights reserved Compiled for i386 Linux at 08:17:46 on 2009/07/20 Loading Object xyzzy Program size is 24 longs Compiled 1 Lines of Code in 0.001 Seconds
What options do you use?
It only required the ia32 libraries and the correct group membership.
peter@peter-XPS-15-9550:~/Dropbox/Tachyon/V5/KERNEL$ ./bstc tachyon5v7.spin Found a USB Serial Device Brads Spin Tool Compiler v0.15.3 - Copyright 2008,2009 All rights reserved Compiled for i386 Linux at 08:17:46 on 2009/07/20 Loading Object tachyon5v7 Program size is 32400 longs Compiled 2831 Lines of Code in 0.052 Seconds peter@peter-XPS-15-9550:~/Dropbox/Tachyon/V5/KERNEL$ uname -a Linux peter-XPS-15-9550 5.3.0-40-generic #32~18.04.1-Ubuntu SMP Mon Feb 3 14:05:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
This is my bake recipe (make & burn it in).
peter@peter-XPS-15-9550:~/Dropbox/Tachyon/V5/KERNEL$ cat bake m4 -I includes ./includes/$1.m4 > $2.spin ./bstc -l -b -O x -d /dev/ttyUSB$4 -D $3 -p2 -f $2.spin
Jim
I am using the command line version bstc more these days since I broke up Tachyon into smaller files and use m4 to preprocess and merge the files before passing the merged spin file to bstc. If you want to execute bst or bstc from a terminal that is opened in the same folder, then you can type ./bst or ./bstc which is what you want to type to run a file in the current directory.
Using the terminal to launch it, at least initially is a good way to check that it is working properly and not complaining about some missing library etc.
Here is how I could run bstc
peter@peter-XPS-15-9550:~/Dropbox/Tachyon/V5/KERNEL$ ./bstc tachyon5v7.spin Found a USB Serial Device Brads Spin Tool Compiler v0.15.3 - Copyright 2008,2009 All rights reserved Compiled for i386 Linux at 08:17:46 on 2009/07/20 Loading Object tachyon5v7 Program size is 32400 longs Compiled 2831 Lines of Code in 0.406 Seconds peter@peter-XPS-15-9550:~/Dropbox/Tachyon/V5/KERNEL$
The GUI always complains (but runs) though.
peter@peter-XPS-15-9550:~/Desktop$ ./bst Gtk-Message: 01:07:35.213: Failed to load module "atk-bridge" (bst:27525): Gtk-WARNING **: 01:07:35.260: Unable to locate theme engine in module_path: "adwaita", [WARNING] Out of OEM specific VK codes, changing to unassigned [WARNING] Out of unassigned VK codes, assigning $FF
BSTC(-i386) even runs fine on PIs and siblings using qemu. Sure not a turbo in this context, but sometimes having this option may save the day.
Time Computer RAM OS ====================================================== --<bstc qemulated>------------------------------------ 4m31s PI3-B 1024M Raspbian/Jessie(-Pixel) 7m30s Cubietruck 2048M Cubieez/Wheezy 7m31s PI2-B 1024M Raspbian/Jessie(-Lite) 8m13s PI3-B 1024M Devuan/Jessie-64bit 23m18s PI1-B+ 512M Raspbian/Jessie(-Pixel) --<bstc native>--------------------------------------- 0m22s T30@2GHz 1024M Debian/Jessie-32bit 0m05s T510@2.4GHz 8192M Debian/Jessie-64bit ======================================================
IIRC it always was a 1 thread build even if the hardware could have done better because the build was done with a purely sequential script which is a direct translation to BASH from the batch file for builds on Windows.A large project like TriOS can easily benefit from "make" and friends, so after changing some parts only will need a rebuild of all subtargets depending on the changed files. So don't "make clean" too often and you'll save a lot of time! Only rebuilding the changed parts even benefits less from multiple CPUs or threads. So I think, with a bit of hung well technology ("make" and friends) which every child should learn in pre school even a BSTC on QEMU on Pi1 can be a useful development environment for a P1. Well, due to the fossilised nature of BST(C) it's use should fade out. But TriOS being only buildable with BST/BSTC is a good example for such a locked-in-syndrome and sure will not be the only one. So such hacks like BSTC on QEMU will even have a future.
...and don't forget the newer tools that run natively or thanks to Mono in ARM systems too. But that's a topic for an own thread.
As Peter said it will whine about a module. Just ignore it. Once BST is working you can tell it where to find all of your project pieces. The user manual is still downloadable. To see the prop, I added my user to the groups dialout and tty since I was not sure which originally worked. Can't miss with both. BST loads and compiles all my stuff, well at least until i start fooling around with it and then , well, iterate, iterate, iterate.... or RTPropM to find my goof.
If I was doing stuff at Peters level using make files and the like, I would have copied his or a similar make entry, but I like the way the GUI operates and don't have the time to figure out how to make GVIM do all the syntax highlighting and other features of Bst, I will leave well enough alone for now (likely always).
so I tried starting bst from the terminal(using ./bst) with the bst put in the Desktop folder and the following is what I get on the screen in terminal:
hpath (may be used multiple times) -o <filename> - Output [.list/.eeprom/.binary/.zip] Filename (Defaults to input Filename without .spin) -O <options> - Optimise Binary (HIGHLY EXPERIMENTAL!!!!!) a - Enable all optmisations (Be careful! No, really) b - Bigger constants (should be slightly faster at the expense of code size) c - Fold Constants g - Generic "safe" size optimisations for smaller/faster code, however not what the Parallax compiler will generate r - Remove unused Spin Methods u - Fold Unary "-" Operations on Constants if it will make the code smaller x - Non-Parallax compatible extensions -p[012] - Program Chip on device (-d) 0 - Load Ram and run 1 - Load EEProm and shutdown 2 - Load EEProm and run -s - Intersperse source in listfile (use with -l) -w[012] - Error/Warning level - 0 - Errors only / 1 - Error/Warning / 2 - Error/Warning/Information (Default 0) -v - Get program version information
but when I double click on the bst logo on the desktop, I get nothiing.Jim
peter:V5$ ./bstc Brads Spin Tool Compiler v0.15.4-pre10 - Copyright 2008,2009,2010 All rights reserved Compiled for i386 Linux at 22:00:43 on 2010/04/21 Program Usage :- bstc (Options) Filename[.spin] -a - Create Propeller object archive zipfile -b - Write .binary file -c - Write .dat file for C-Compiler (Drops a <filename.dat> file) -d <device> - Device to load to (Default : ) -D <define> - Define a pre-processor symbol (may be used multiple times) -e - Write .eeprom file -f - Double download baud rate -h - Display this help information -l[sma] - Generate listfile (s) For source code / (m) for Machine readable - Debugger style listing / (a) standard boring listfile -L <Lib Path> - Add a library path or file holding library path(s) to the searchpath (may be used multiple times) -o <filename> - Output [.list/.eeprom/.binary/.zip] Filename (Defaults to input Filename without .spin) -O <options> - Optimise Binary (HIGHLY EXPERIMENTAL!!!!!) a - Enable all optmisations (Be careful! No, really) b - Bigger constants (should be slightly faster at the expense of code size) c - Fold Constants g - Generic "safe" size optimisations for smaller/faster code, however not what the Parallax compiler will generate r - Remove unused Spin Methods u - Fold Unary "-" Operations on Constants if it will make the code smaller x - Non-Parallax compatible extensions -p[012] - Program Chip on device (-d) 0 - Load Ram and run 1 - Load EEProm and shutdown 2 - Load EEProm and run -w[012] - Error/Warning level - 0 - Errors only / 1 - Error/Warning / 2 - Error/Warning/Information (Default 0) -q - Be silent except for GCC style errors and warnings -v - Get program version information peter:V5$
vs bst the GUI
peter:V5$ ./bst Gtk-Message: 00:44:57.642: Failed to load module "atk-bridge" [WARNING] Out of OEM specific VK codes, changing to unassigned [WARNING] Out of unassigned VK codes, assigning $FF
I finally got bst up and running. I unzipped it and copied it to the desktop. Then from the terminal I changed the directory to Desktop and ran install. That finally worked! Thanks everyone for all the help.
Jim
Jim
Don't forget too that most Linux installs are 64-bit these days and you have to install the 32-bit compatibility libraries "ia32-libs" and of course put the Prop font into your .fonts folder.
btw, the version I use on Linux Mint 20 is this: