Shop OBEX P1 Docs P2 Docs Learn Events
SpinEdit - Editor for Spin, Spin2 and FastBasic — Parallax Forums

SpinEdit - Editor for Spin, Spin2 and FastBasic

RaymanRayman Posts: 14,768
edited 2021-08-29 18:05 in General Discussion
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.

699 x 690 - 45K
861 x 795 - 41K
«1345

Comments

  • RaymanRayman Posts: 14,768
    edited 2018-11-12 16:49
    To install, hopefully you just need to extract the .exe and put in a folder along with:
    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...
  • I tried and it does run under Wine on Linux. The colors look really nice, as does the overall GUI. The font's a bit messed up on Linux, though. Is there an option to change the font? I couldn't seem to find it. I also couldn't find the option to switch to P2, although perhaps that's done automatically?

    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!
  • Rayman wrote: »
    SpinEdit is a work in progress, but so far can work with Spin, Spin2 and FastBasic files...
    Not everything (or actually anything) has been rigorously tested, so there may be flaws...
    Note: This is for Windows, but may work in part under Wine on Mac or Linux

    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).
    Screen%20Shot%202018-11-12%20at%209.39.09%20AM.png

    dgately
  • RaymanRayman Posts: 14,768
    Thanks, forgot about adding that... Need to fix way comments are handled too...
  • Had a chance to try and load compiled results to an Activity Board, on macOS...

    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).
    Screen%20Shot%202018-11-12%20at%2011.07.47%20AM.png

    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.
    Screen%20Shot%202018-11-12%20at%2011.10.21%20AM.png

    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
  • RaymanRayman Posts: 14,768
    edited 2018-11-12 20:07
    I'm amazed you actually got it to load on a Mac!

    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...
  • Test setup: Propeller Board Of Education, Windows 7. FastSpin version 3.9.9
    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
  • RaymanRayman Posts: 14,768
    Thanks. There’s a lot left to do... Might take months to finish...
  • RaymanRayman Posts: 14,768
    Btw, the intent was to seperate build from load. But, obviously some tool can do both in one step...

    Still thinking about best way...
  • Rayman wrote: »
    Btw, the intent was to seperate build from load. But, obviously some tool can do both in one step...

    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
  • RaymanRayman Posts: 14,768
    edited 2018-11-12 22:19
    Can the Parallax.ttf font be used on a mac? I think maybe it doesn't work work...

    Wonder if something like this can convert it:
    https://www.fontlab.com/font-converter/transtype/
  • Rayman wrote: »
    Can the Parallax.ttf font be used on a mac? I think maybe it doesn't work work...

    Parallax.ttf works fine on macOS!

    dgately

  • Rayman wrote: »
    I'm amazed you actually got it to load on a Mac!

    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...

    Allowing the user to choose proploader or at least propeller-load, might be better, no?


    dgately

  • RaymanRayman Posts: 14,768
    Ok, I’ll work on that.
  • RaymanRayman Posts: 14,768
    dgately wrote: »
    Rayman wrote: »
    Can the Parallax.ttf font be used on a mac? I think maybe it doesn't work work...

    Parallax.ttf works fine on macOS!

    dgately

    That’s really good news!
  • RaymanRayman Posts: 14,768
    Wonder if we can get that font to work in Linux too...

    I just read this that implies that ttf fonts can work in Linux:
    https://itsfoss.com/install-fonts-ubuntu-1404-1410/
  • Interesting info on TrueType fonts: https://en.wikipedia.org/wiki/TrueType

    dgately
  • How are you making this IDE?
  • RaymanRayman Posts: 14,768
    Pure MFC in Visual Studio...
  • RaymanRayman Posts: 14,768
    edited 2019-01-04 18:56
    I've made a lot of improvements (see top post for some details).
    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.
  • Nice work Ray!
  • RaymanRayman Posts: 14,768
    edited 2019-01-04 21:36
    One of the new features is "Find". Very basic now, can be improved.
    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...
    1061 x 1021 - 94K
  • Looks very nice, Ray!
  • Thanks Ray, I have SpinEdit working with my P2-ES board. :cool:
  • I'd like to give this a try with wine, but I'm running into an issue. I downloaded the new version, just released today, and extracted the zip to ~/reusable/software/SpinEdit. Then I changed into a directory where I had previously copied multest.spin2 from spin2gui. I opened the file with "wine ~/reusable/software/SpinEdit/SpinEdit.exe multest.spin2". So far so good. Fonts seem to be rendering perfectly (I already have the Parallax font installed, from ages ago). I clicked "Compile" and was presented with what I can only assume is an error:

    spin2edit_broken.png

    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.
    912 x 727 - 97K
  • jmgjmg Posts: 15,175
    DavidZemon wrote: »
    ..
    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?
    Looks like fastspin should really be showing the actual whole file name it is trying to open here - no such file is less helpful.


  • jmg wrote: »
    DavidZemon wrote: »
    ..
    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?
    Looks like fastspin should really be showing the actual whole file name it is trying to open here - no such file is less helpful.

    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:
    ParseFile: XXXX: No such file or directory
    
    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?
  • RaymanRayman Posts: 14,768
    edited 2019-01-05 14:37
    Ok, I'll add in an option to show the command line so we can figure out how to make this work under Wine...
    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...
  • RaymanRayman Posts: 14,768
    edited 2019-01-05 20:19
    Ok, here's a version that can optionally show you the compile and load command lines via the options button. Also, I've made the library path an option and also the crystal setting for loading an option.

    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...
  • RaymanRayman Posts: 14,768
    btw: I see a "Simple_Serial" in the Parallax Library. It probably won't work so well with P2 Eval because uses DIRA, which only goes to P31 and the Eval serial port is on P62,P63
Sign In or Register to comment.