Shop OBEX P1 Docs P2 Docs Learn Events
Spin Tools IDE - Page 28 — Parallax Forums

Spin Tools IDE

12324252628

Comments

  • RaymanRayman Posts: 15,721

    Was contemplating writing P1 code in Spin2 and using the external tools feature in Spin Tools to invoke FlexProp to compile it...

    Spin2 is way better that Spin1 IMHO and if can program Prop1 with it, want to try...

    Imagining that the main issue is going to be that Spin Tools won't compile when an error is detected. Any way around that?

  • @Rayman said:
    Was contemplating writing P1 code in Spin2 and using the external tools feature in Spin Tools to invoke FlexProp to compile it...

    Spin2 is way better that Spin1 IMHO and if can program Prop1 with it, want to try...

    Mind that it's only fully-ish supported on the ASM backend (which has the usual problem of running out of RAM regardless of what language).
    The Bytecode backend has trouble supporting all of the features because the bytecodes are essentially a 1:1 translation of a Spin1 AST into RPN, so any extra features need to be emulated using Spin1. We did some clever stuff to implement method pointers, multi-return, etc.
    But feel free to try it.

  • RaymanRayman Posts: 15,721

    Yeah, it's the ASM part that think Spin Tools will flag as errors and rightly so.

  • JonnyMacJonnyMac Posts: 9,469

    Imagining that the main issue is going to be that Spin Tools won't compile when an error is detected. Any way around that?

    The internal compiler will flag errors but the external compiler will still work -- that is my experience with PNut.

  • maccamacca Posts: 935

    @Rayman said:
    Was contemplating writing P1 code in Spin2 and using the external tools feature in Spin Tools to invoke FlexProp to compile it...

    Spin2 is way better that Spin1 IMHO and if can program Prop1 with it, want to try...

    Imagining that the main issue is going to be that Spin Tools won't compile when an error is detected. Any way around that?

    The internal compiler doesn't generate any binary when there are errors, but you can always launch an external compiler.

    However, honestly, what's the point of using Spin Tools to write a source that won't compile and delegate to an external tool ?
    You may be better with using Flexprop or VS Code for that, it can edit the source and launch flexspin to compile and run.

    Yeah, it's the ASM part that think Spin Tools will flag as errors and rightly so.

    PASM is PASM, the p1asm (or p2asm) produced by flexspin is compatible with Spin Tools, I have also added the extensions to load these files in the editor, just in case.

  • dMajodMajo Posts: 862

    Marco,
    just a reminder: in the help/about of the latest version (0.49.1) the shown version number is 0.37.0 while it is correct in the file properties
    Regards

  • JonnyMacJonnyMac Posts: 9,469
    edited 2025-09-28 15:27

    You may need to do a clean install. I'm on Windows so installing is a simple unzip process, and I always do this into a separate folder for each version (which only take about 85MB of disc space). I keep one or two earlier versions in case something big pops up (though it usually doesn't).

    After my morning walk I used ChatGPT to find the answer Marco provided to someone else. You can find it in post 256 of this thread.

  • dMajodMajo Posts: 862

    Thanks @JonnyMac

    That was the case ... I unzipped the files in the same folder (because I have many links pointing to the folder structure of my R&D tools)
    It was easy to delete the files from the lib folder because Marco timestamps them all with the same value.

    ... and YES this is happening on Win11 only, because on my other machines I didn't noticed this behavior before.

    Regards
    Dario

  • JonnyMacJonnyMac Posts: 9,469

    @Macca Does Spin Tools archive the state of the current editor, or the last saved version on disc?

  • maccamacca Posts: 935

    @JonnyMac said:
    @Macca Does Spin Tools archive the state of the current editor, or the last saved version on disc?

    It archives the state of the current editor, as well as any dependency that is open in other tabs.

  • JonnyMacJonnyMac Posts: 9,469
    edited 2025-10-03 19:21

    Thank you. BTW, I was speaking with Chip yesterday about features in the Debug Terminal window. He has agreed to implement

      color fgcolor bgcolor
      backcolor color [level]
      textcolor color [level]
    

    ...in the active phase of the window (you already have color working). I also asked him to consider a scrollable region like this:

      scroll x1 y1 x2 y2 direction units bgcolor [level]
    

    Direction would be 0..3 for up, down, right, left, and units would be lines for vertical scrolling and columns for horizontal scrolling. The actual size of a line or column is dependent on the font size. It's a lot of parameters but I think it could be useful in many ways.

  • RaymanRayman Posts: 15,721

    Had a strange version problem like the above...
    Copied new version on top of old. It complained about IDE being open, so closed it and then did "Try Again".

    That worked but actual version didn't update...
    Not sure how that can be...

    Guess need to delete the old version to make sure it copies over correctly...

  • RaymanRayman Posts: 15,721

    Just a minor note... Have had issue where if SpinIDE is run in debug mode, it can capture the serial port and not let go...

    Solution is just to run again in non-debug mode from inside IDE before trying to use the port with anything else.

  • maccamacca Posts: 935

    @Rayman said:
    Had a strange version problem like the above...
    Copied new version on top of old. It complained about IDE being open, so closed it and then did "Try Again".

    That worked but actual version didn't update...
    Not sure how that can be...

    The problem here is that the jar files that compose the runtime are read in "directory order", this means that depends on the OS and how it reads the directory list, Linux should always read in alphabetical order so, since jar files are versioned, a file named spin-tools-0.49.0.jar comes before the updated file named spin-tools-0.49.1.jar and takes precedence. Other OSes may read the directory in different order, not sure how NTFS works these days.

    Guess need to delete the old version to make sure it copies over correctly...

    Yes, I'll try to set a fixed list of jar files to read to avoid the version mismatch, but for now I suggest to always delete the old spin-tools directory and unpack the new version (make sure to not have any work files in there). Configuration files are not affected since they are stored in the user's home directory.

    Just a minor note... Have had issue where if SpinIDE is run in debug mode, it can capture the serial port and not let go...

    That's because there is no way to know when it finishes to use the debug output.

    Solution is just to run again in non-debug mode from inside IDE before trying to use the port with anything else.

    The serial port is closed when running an external program, you may try to add your tools and run them from with the IDE.

    I think I can close the port when the console window is closed, as a more generic fix.

  • JonnyMacJonnyMac Posts: 9,469

    That's because there is no way to know when it finishes to use the debug output.

    I don't know if this will help, but Chip made a note about a new DEBUG feature that allows the detection of DEBUG being finished.

  • maccamacca Posts: 935

    @JonnyMac said:
    I don't know if this will help, but Chip made a note about a new DEBUG feature that allows the detection of DEBUG being finished.

    Yes, that will certainly help.

  • RaymanRayman Posts: 15,721

    There's another (possible related?) think that happens occasionally..
    Somehow it gets into a state where it won't load the P2...

    Starts to and then says P2 not found or something.
    Even after it can be identified by Prop Tool.

    Solution is to close and reopen the program.
    Then, all better again.

    Will keep an eye out and see what might be triggering this...

  • JonnyMacJonnyMac Posts: 9,469

    Starts to and then says P2 not found or something.
    Even after it can be identified by Prop Tool.

    Solution is to close and reopen the program.
    Then, all better again.

    I ran into that recently.

  • ke4pjwke4pjw Posts: 1,230

    @JonnyMac said:

    Starts to and then says P2 not found or something.
    Even after it can be identified by Prop Tool.

    Solution is to close and reopen the program.
    Then, all better again.

    I ran into that recently.

    Same. I am on Windows and found it most likely has something to do with the Serial port being busy.

  • RaymanRayman Posts: 15,721

    Think what may be triggering this here is turning off the monitor but leaving PC on. The USB port is built into the monitor.
    Maybe SpinTools IDE was also in debug mode. Maybe that gets the port flagged as bad or something...

  • RaymanRayman Posts: 15,721

    Just noticed something else...

    Getting a yellow warning sign about a method not being used.
    But it is used by the main file...

    in raycast5b_SpinGraphics_4a1.spin2 the method key() is flagged as unused.
    But, is used in raycast5b_SpinMain5a.spin2

  • RaymanRayman Posts: 15,721
    edited 2025-10-05 20:41

    Ok, if one just unplugs and replugs USB to P2 board when IDE was in debug mode, it goes into that state where won't upload. Have to restart IDE...
    Says "No propeller chip found"...

  • RaymanRayman Posts: 15,721

    Prop Tool has similar issue but can recover after some error messages…

  • maccamacca Posts: 935

    @Rayman said:
    Ok, if one just unplugs and replugs USB to P2 board when IDE was in debug mode, it goes into that state where won't upload. Have to restart IDE...
    Says "No propeller chip found"...

    In this case the USB device is assigned a new serial port name/number because the old name is still in use by the IDE.

    There is a setting to automatically discover the appropriate serial port, Automatic device discovery:

    This should probe the old serial first, then search all available ports until it finds the device.
    It should be enabled by default but maybe it was disabled.

    Or, you need to manually select the new serial port from the Tools -> Port menu.

  • maccamacca Posts: 935

    @Rayman said:
    Just noticed something else...

    Getting a yellow warning sign about a method not being used.
    But it is used by the main file...

    in raycast5b_SpinGraphics_4a1.spin2 the method key() is flagged as unused.
    But, is used in raycast5b_SpinMain5a.spin2

    That seems correct.

    The problem is that there isn't the concept of a project as a whole, each source in the editor is compiled as if it is the main object and the unused method warnings are generated if they are not directly used. In other words I don't know if a method is called by a parent object.

    Maybe I could arrange something if the parent is opened in another tab, have to think about that.

  • evanhevanh Posts: 16,778
    edited 2025-10-06 08:57

    @macca said:

    @Rayman said:
    Ok, if one just unplugs and replugs USB to P2 board when IDE was in debug mode, it goes into that state where won't upload. Have to restart IDE...
    Says "No propeller chip found"...

    In this case the USB device is assigned a new serial port name/number because the old name is still in use by the IDE.

    I use the "by-id" reference for opening the comport. This isn't prone to the above issue.

    But the real reason I use it is because I often have multiple Propellers connected at once. So I never know which order they've registered in. The port ID is a sure way to know which board I'm talking to.

    Of course, this approach is opposite to automatically connecting with first found Prop.

  • RaymanRayman Posts: 15,721

    @macca Just tested the serial port issue on another computer and it acts the same way...
    Have to close IDE if was in debug mode and serial cable unplugged and replugged.

    That auto device discovery option is selected.

  • Hi @macca
    I have been noticing for a while that certain ASCII characters seemed to be missing when using the SPIN Tools terminal, specifically most of the RIGHT brackets i.e. ") > }" as well as "\"
    It may be something in my setup but the characters are there using spin Tools with PST, as shown on the screen prints, I have combined, below.

    I also copied that line from spin tools into a text file and the characters also show up there:-
    <Repeated twice because the forum doesn't like some of these characters either, probably Markdown>

    !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_abcdefghijklmnopqrstuvwxyz{|}~`

    !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~

    So the encoding exists in the file but Spin Tool Terminal doesn't show it!
    I have searched the forum but can't see this mentioned anywhere else, so perhaps it is just me?
    Please advise

  • JonnyMacJonnyMac Posts: 9,469
    edited 2025-10-08 15:42

    I've seen a few oddities with the Spin Tools internal terminal, too, so I tend to open and use PST. I tried your string in both. In my case all characters seem to print, but there is some extra cruft at the end of the string using the Spin Tools terminal.

    @macca If you do any updates to the Spin Tools terminal would you consider adding the ability to turn off the flashing cursor?

  • maccamacca Posts: 935

    @lab_ges said:
    Hi @macca
    I have been noticing for a while that certain ASCII characters seemed to be missing when using the SPIN Tools terminal, specifically most of the RIGHT brackets i.e. ") > }" as well as "\"
    It may be something in my setup but the characters are there using spin Tools with PST, as shown on the screen prints, I have combined, below.

    Had these rendering issues in the past and I have changed the terminal rendering code to prevent that, in version 0.47 if I remember correctly. Are you using the latest version ?

Sign In or Register to comment.