Shop OBEX P1 Docs P2 Docs Learn Events
Good IDE for Spin+PASM, maybe PropC - Page 2 — Parallax Forums

Good IDE for Spin+PASM, maybe PropC

2»

Comments

  • yetiyeti Posts: 818
    edited 2020-05-05 03:56
    IDEs...
    Hmmm...
    I still can't get excited about these.

    For ages I've used simple editors and and thought of them like just different coloured screwdrivers which can be used interchangeably. A file is a thing and I use whatever editor is at hand. The steps of compiling, downloading and executing the stuff I'm working on just have their own tools. Sometimes OpenSpin is needed because code density is more important than speed, sometimes the opposite is important and FastSpin can show its strengths. And downloaders are diverse too. Sometimes I just use them (edit, compile, download) sequentially in the shell, sometimes in a script and on bigger projects Makefiles come in handy. I like this stoneage way because it gives me the least locked in effect.

    Currently I'm experimenting with Emacs' Org/Babel. I'm writing my stuff in Emacs, code goes into special blocks e.g. tagged like
    #+BEGIN_SRC spin :tangle hello-world.spin
    obj
      stdio: "stdio.h"
    
    pub main
      puts(string("Hello there!"))
    #+END_SRC
    
    and when I type ctrl-c ctrl-v ctrl-t, all such blocks get written to the files named in their BEGIN line. Other blocks like
    #+BEGIN_SRC sh
    fastspin -O2 hello-world.spin
    #+END_SRC
    
    get executed by hitting ctrl-c ctrl-c in them, so they do the compiles. A block like
    #+BEGIN_SRC sh
    spinsim -b hello-world.binary
    #+END_SRC
    
    finally will run the result. This might be done using a propeller loader too.

    Adding some more directives to the header controls what will be exported when stuff is converted to PDF, HTML, LibreOffice, ... and lots of other formats. So this is not only a high level way to script stuff, it produces documentation on the fly. Or is it the other way round? While documenting you are coding, compiling, running, ... your stuff?

    Locked in syndrome?

    All that stuff Emacs processes is plain text. It is kind of readable in its source form propeller-cauldron.org (tell your browser that this is UTF8 text) and maybe this looks a bit scary for some minutes but one really can get used to it. It definitely can be split into files again without Emacs and the text can be understood as is. So being locked in is not a realistic danger of this source format.

    The HTML export of this one is propeller-cauldron.html and already looking nicer. I've not tested other export formats intensively because HTML is (good enough)™ for my needs and fairly portable.

    I'm still exploring what's possible with this environment but I'm fairly certain, that I like it for documenting code while keeping all needed parts together.

    Is it scripting?
    Is it documentation?
    Is it archiving?
    Some call this way of doing stuff "reproducible research".

    I'm still scratching only the surface of the possibilities and I'm happy about finding out more stuff. E.g. today I finally found a way how to tell Org/Babel not to see a_b as a with subscript b. Before finding how to switch this off, filenames like VGA_512x384_Bitmap.spin were an unsolvable problem for me.
    Edit@20200505 - Updated the '.org' and '.html' files.
  • @AwesomeCronk : I confess I hadn't really considered the use case of opening a file directly from the desktop; I had always just opened the FlexGUI.exe program directly. But it is a nice feature, so I've added it to the 4.0.0-preview release, which is available from:

    https://github.com/totalspectrum/flexgui/releases

    Note that you still have to set up the Library directory if you want to use a different IDE's library (like the PropTool library) but there's a least a warning about that now if you forget.
  • @ersmith
    Thank you for fixing this!
    What do you use to make FlexGUI?
  • @ersmith
    Thank you for fixing this!
    What do you use to make FlexGUI?

    For the user interface I use Tcl/Tk. It's an interpreted scripting language, so pretty much the whole GUI source code is in the src/ directory (the main file is src/gui.tcl) and can be tweaked without having to recompile anything.
  • Cool!
Sign In or Register to comment.