SpinEdit - Editor for Spin, Spin2 and FastBasic
Rayman
Posts: 14,768
SpinEdit is a work in progress, but so far can work with Spin, Spin2 and FastBasic files...
In Spin1 mode, there are 4 compiler options (see screenshot pic): Propellent, OpenSpin, FastSpin, and BSTC (AKA Brad's spin tool)
FastBasic can compile to P1 or P2 via options. See screenshot to see how currently colorized.
Not everything (or actually anything) has been rigorously tested, so there may be flaws...
Note: This is for Windows, but does work on Mac under Wine (except loading).
To install: Just unzip into some folder and run SpinEdit.exe
Updates:
29Aug21: Can now flash P2 in FlexC mode
25Apr20: Added PNut support and streamlined P2 loading options
14Feb20: Added Flow Indicators, font size control and brightness slider
05Dec19: Fixed load flash for Rev.B (should work for Rev.A too).
24Nov19: Posted version for Rev.B silicon
17Feb19: Made "find" better, fixed a couple other things.
21Jan19: Spin2 mode can now program Flash.
20Jan19: Added support for Flex C
12Jan19: Added latest version of loadp2 and fastspin. Loading works on Mac under Wine for small files, but not for large files. Hopefully, this can be fixed soon.
Loadp2 and fastspin are being updated often. See first post in this thread for link to latest versions of loadp2 (in Spin2gui) and fastspin: http://forums.parallax.com/discussion/168913/new-basic-compiler-for-prop1-and-prop2/p1
If you don't have the Propeller Tool installed, you might want to install the Parallax.ttf font to make the text look right.
In Spin1 mode, there are 4 compiler options (see screenshot pic): Propellent, OpenSpin, FastSpin, and BSTC (AKA Brad's spin tool)
FastBasic can compile to P1 or P2 via options. See screenshot to see how currently colorized.
Not everything (or actually anything) has been rigorously tested, so there may be flaws...
Note: This is for Windows, but does work on Mac under Wine (except loading).
To install: Just unzip into some folder and run SpinEdit.exe
Updates:
29Aug21: Can now flash P2 in FlexC mode
25Apr20: Added PNut support and streamlined P2 loading options
14Feb20: Added Flow Indicators, font size control and brightness slider
05Dec19: Fixed load flash for Rev.B (should work for Rev.A too).
24Nov19: Posted version for Rev.B silicon
17Feb19: Made "find" better, fixed a couple other things.
21Jan19: Spin2 mode can now program Flash.
20Jan19: Added support for Flex C
12Jan19: Added latest version of loadp2 and fastspin. Loading works on Mac under Wine for small files, but not for large files. Hopefully, this can be fixed soon.
Loadp2 and fastspin are being updated often. See first post in this thread for link to latest versions of loadp2 (in Spin2gui) and fastspin: http://forums.parallax.com/discussion/168913/new-basic-compiler-for-prop1-and-prop2/p1
If you don't have the Propeller Tool installed, you might want to install the Parallax.ttf font to make the text look right.
Comments
Propellent.exe
fastspin.exe
bstc.exe
openspin.exe
loadp2.exe
This zip contains the these files.
Note: Fastspin is currently under development, so you might want to look for the latest version...
Another feature that would be kind of handy would be a way to switch the program used for loading. But I realize that may be a bit esoteric, and Propellent probably does the job for most people.
Anyway, this does look very nice. Thanks for creating it, @rayman!
The editor appears to work in Wine on macOS... Have not yet loaded to a prop board yet.
One issue: When editing a BASIC file, the Cut, Copy, Select All clipboard icons do not become clickable. Control-C & Control-V do work, but not Control-A (I assume for Select All). In this image you see that I have selected the word "direction", but the clipboard icons remain un-clickable. (one clue for debugging: this does not happen for .spin files).
dgately
Compiling with Brad's Spin Tool and adding additional compiler options, such as: "-d COM1 -p1" gets the compiled code onto the the Activity Board: (RAM & Run "-p0", EEPROM & Shutdown "-p1" & EEPROM & Run "-p2") & it will run...
Unfortunately, Compiling with the other selectable compilers (OpenSpin, FastSpin, Propellent), results in failed loading to RAM or EEPROM (all P1-based attempts).
The failure appears during the verification phase. For an EEPROM load, after resetting the Activity Board, the program does not appear to have been loaded to the EEPROM, as the program does not show up as working.
It appears that you are using Propellent as a loader in all of these other compile cases. What does bstc.exe do in loading that Propellent does not?
dgately
If this is actually viable, maybe I should have options to better support that...
bstc sounds like at least one option...
I'm also trying to decide if "load ram" should recompile every time like the Prop Tool does...
Maybe that's just easier... Then the compiler can also load...
Program was a simple toggle I/O program. Load RAM and Load EEPROM both worked.
File View only shows "Build to see files"
John Abshier
Still thinking about best way...
Separate allows integration of many different tools currently available,, like...
If you give PropLoader support, would allow WIFI loading a propeller chip through the parallax wx esp8266 board.
proploader has mac, linux, and windows releases available too.
https://github.com/parallaxinc/PropLoader/releases/tag/v1.0-37
Wonder if something like this can convert it:
https://www.fontlab.com/font-converter/transtype/
Parallax.ttf works fine on macOS!
dgately
Allowing the user to choose proploader or at least propeller-load, might be better, no?
dgately
That’s really good news!
I just read this that implies that ttf fonts can work in Linux:
https://itsfoss.com/install-fonts-ubuntu-1404-1410/
dgately
Works much better now with large files.
Works with P2 Eval board with latest Fastspin and loadp2.
Spin2 is now default, but you can alse edit Basic files for Fastspin.
Here's one that works (attached). You now need some clock setting and baud statements.
But, see screenshot, it gives a list of results in "Find" tab at bottom of screen.
If you double click on a result, it will jump to that line.
The "Build" tab does the same thing for errors. If you double-click on the error, it will jump to that line...
Any ideas? It looks like fastspin is complaining that it can't find the source file to compile, is that right? If so, how have other Wine users gotten this to work?
I tried repeating the process, but this time with multest.spin2 in the same directory as SpinEdit.exe. Same results.
fastspin does show the actual file name it is trying to open; in this case it seems to be the word "Files". The only weird thing is that the "ParseFile:" string is on the next line. Normally the error should read something like: where XXXX is the name of the file that it was trying to open. I admit this isn't as clear to users as it could be (the "ParseFile" part is to help me figure out exactly where the error is coming from, in this case the ParseFile() function).
As to why you're getting this error, it certainly could be a problem in fastspin, but my first guess is that the command line that SpinEdit is sending to fastspin is garbled somehow. Whether this is a Wine bug or a SpinEdit bug I don't know. @Rayman , is there an option to display the commands that SpinEdit is executing?
Thanks for testing this...
I just noticed the P2 library folder is hard coded to a value that probably won't work on a Mac (or a lot of PCs for that matter)...
I'll make this a variable...
Update: zip with e at the end shows line number properly in status bar for spin1 and bas files and lets you type in a serial port for P2 spin mode...