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

Spin Tools IDE

1262728293032»

Comments

  • Outline view is a handy improvement!

    I used to have a CON for version, and always had to duplicate the date into { } tags beside the CON block for it to show up.
    Now it works more efficiently! Cool !!

    And I guess, thanks JM for the idea!

  • RaymanRayman Posts: 16,038

    @macca This is a little strange... It seems SpinTools IDE will let you include the file extension in a object.

    But, if you do so, it seems to create broken archives... At least, I think that's what I'm seeing...

    The "Scanner" top file attached demonstrates this I think...

  • RaymanRayman Posts: 16,038
    edited 2026-02-07 12:51

    BTW: I've just found that your debug windows work with P1 (Spin2, when compiled with external tool, flexprop).
    I think you just added some graphical type debug windows, will be interesting to see if that works too!

  • maccamacca Posts: 991

    @Rayman said:
    @macca This is a little strange... It seems SpinTools IDE will let you include the file extension in a object.

    But, if you do so, it seems to create broken archives... At least, I think that's what I'm seeing...

    Yes, it is the bug reported few posts early, it is fixed in GitHub but not yet released.
    For now avoid the extension in the object file name (or archive manually if that prevents to compile for P1).

    BTW: I've just found that your debug windows work with P1 (Spin2, when compiled with external tool, flexprop).
    I think you just added some graphical type debug windows, will be interesting to see if that works too!

    Should work, the external tool output is captured even after the upload is done and processed as if it was receive through the serial port, if flexprop output follows the P2 debug tags it should work.

  • RaymanRayman Posts: 16,038

    Just noticed the "Case Sensitive Symbols" option...
    Guess that would mean it would treat all variables and things like C does, right?

    I really like the idea of that option. Think it would break all existing code though...

  • maccamacca Posts: 991

    @Rayman said:
    Just noticed the "Case Sensitive Symbols" option...
    Guess that would mean it would treat all variables and things like C does, right?

    Right.

    I really like the idea of that option. Think it would break all existing code though...

    Not all existing code, when I tested the libraries and examples I found some files with mixed case identifiers, like variable, Variable and VARIAble, but most code works.
    The fixes are also easy because the code suggestion prompts you with the declared identifier (CTRL-SPACE at end of the variable name).

  • JonnyMacJonnyMac Posts: 9,655

    The fixes are also easy because the code suggestion prompts you with the declared identifier (CTRL-SPACE at end of the variable name).

    @macca Do you have a cheat sheet of hot-key combinations likes like CTRL-Space? Did I miss it? Could it be added to the Help menu?

  • maccamacca Posts: 991

    @JonnyMac said:

    The fixes are also easy because the code suggestion prompts you with the declared identifier (CTRL-SPACE at end of the variable name).

    @macca Do you have a cheat sheet of hot-key combinations likes like CTRL-Space? Did I miss it? Could it be added to the Help menu?

    No, I'll try to put something to the help menu.

  • JonnyMacJonnyMac Posts: 9,655
    edited 2026-02-10 16:14

    Thank you, Marco.

    This is probably an idea that only I care about... but I'll toss it into the ether, anyway. In the File menu I would love to have New (From P1/Object template) with a similar item for the P2. I have templates for applications, and templates for objects. Of course, the Preferences dialog would need updating to add paths to the object template files.

    Can I actually program in C from Spin Tools? Not that I will, but I'd like to experiment. I clicked on New (From P1/C template) and tried to run (without saving). I got stuck on the downloading dialog (it would not close manually), so I had to force a shutdown with Task Manager. It did work when I tried again and saved the file, so maybe adding an error dialog to prevent unsaved files from sticking things.

    I tried this, but no joy -- it doesn't like the use of time.pause().

    #pragma target P1
    
    #define _XINFREQ 5_000_000
    #define _CLKMODE XTAL1 + PLL16X
    
    #include "jm_time_80"
    
    void main()
    {
        // initialization
    
        dira[26] = 1;
    
        for(;;) {
            outa[26] = 1;
            time.pause(500);
            outa[26] = 0;
            time.pause(500);      
        }
    }
    

    Again, I'm not going to be coding any of my work projects in C, but I'd like to get better at it.

  • maccamacca Posts: 991

    @JonnyMac said:
    This is probably an idea that only I care about... but I'll toss it into the ether, anyway. In the File menu I would love to have New (From P1/Object template) with a similar item for the P2. I have templates for applications, and templates for objects. Of course, the Preferences dialog would need updating to add paths to the object template files.

    Could be added, maybe with a bit redesigned menu, it is getting crowded.

    Can I actually program in C from Spin Tools? Not that I will, but I'd like to experiment. I clicked on New (From P1/C template) and tried to run (without saving). I got stuck on the downloading dialog (it would not close manually), so I had to force a shutdown with Task Manager. It did work when I tried again and saved the file, so maybe adding an error dialog to prevent unsaved files from sticking things.

    I tried this, but no joy -- it doesn't like the use of time.pause().

    The C compiler is still very incomplete, I can't find the time to work on it, but works to some extents.
    In your case, you haven't defined the jm_time_80 object instance, unlike other implementations (AFAIK) the include works as in C, it just includes the definitions, then you need to declare the object:

    #pragma target P1
    
    #define _XINFREQ 5_000_000
    #define _CLKMODE XTAL1 + PLL16X
    
    #include "jm_time_80"
    
    jm_time_80 time; // object instance
    
    void main()
    {
        // initialization
    
        dira[26] = 1;
    
        for(;;) {
            outa[26] = 1;
            time.pause(500);
            outa[26] = 0;
            time.pause(500);      
        }
    }
    
  • JonnyMacJonnyMac Posts: 9,655

    That did it, thanks. See, I need to practice C. ;)

  • JonnyMacJonnyMac Posts: 9,655
    edited 2026-02-15 23:29

    Is it possible to use spinc.exe as a loader for a pre-compiled .binary file? I was hoping it would be as simple as this:

    spinc -f program.binary
    

    In another thread a user is looking for a "Clear EEPROM" tool for a compiler. I was hoping to add this as a custom tool, but maybe it's just easier to open the EEPROM clearing program and press F11 (which is what I do now).

  • @JonnyMac said:
    Is it possible to use spinc.exe as a loader for a pre-compiled .binary file? I was hoping it would be as simple as this:

    spinc -f program.binary
    

    In another thread a user is looking for a "Clear EEPROM" tool for a compiler. I was hoping to add this as a custom tool, but maybe it's just easier to open the EEPROM clearing program and press F11 (which is what I do now).

    No, it is not possible to upload a binary file.
    I have to review the command line compiler code, I'll add that option.

  • Released version 0.53.0

    This release changes the QUIT/NEXT level count to match the latest PNut v52a.

    Added a dialog with the keyboard shortcuts to the help menu and the option to create a new non top-level object from a template (configurable in the Preferences for Spin1 and Spin2).

    Reviewed the tab and backtab behaviour when there is a selection, it should work better now.

    The debug windows are optimized a bit with some fixes (the FFT calculation was not fully correct), and while I was at it, I noticed that the input from the windows was not sent to the external tools so I have also fixed that. Using an external loader with the debug windows should work correctly for mouse and keyboard inputs.

    The menu was rearranged a bit to be more compact:

    The New file menu was moved to a sub-menu with the items better grouped. There isn't anymore the New item alone which created an empty source (which caused an error for P1 since it doesn't have any Spin method), I think it is better to always start from a template.

    The recent files list was moved to a sub-menu below the Open item.

    Tthe Bookmarks menu was renamed to Go To and added the missing navigation items.

    Other changes:

    • Reviewed tab/backtab behaviour to handle line selection
    • Added keyboard shortcuts window to Help menu
    • Menu rearrange

      • Recent files list moved to cascade menu
      • New file list moved to cascade menu
      • Bookmarks menu renamed to Go To and added missing navigation items
    • Added Spin object template

    • Changed QUIT/NEXT level count to match PNut v52a
    • Fixed input from debug windows for external tools
    • Some debug windows optimizations and fixes
    • Fixed broken archive creation in some circumstances
  • Thank you, Marco! I like the cleaner File menu, the addition of object templates, and I can confirm that the Tab fix works. Again, thank you!

Sign In or Register to comment.