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

Spin Tools IDE

145791014

Comments

  • Released version 0.26.0

    Not much new on the Spin side as most of the work has been done on the C language support.

    • Added unused variables warnings
    • Implemented an experimental serial port detection, with the default being the currently selected from Tools -> Port, if a Propeller is not detected then it searches all available ports
    • Some general fixes (including the + unary operator)

    I have dropped the version with the self-update feature. I tried to make it working for the whole distribution but it is too critical. I was already using a patched version to fix the MacOS UI thread issue, then I realized that it would be easier to make my own update framework instead of patching the existing to adapt to my needs, so for now no self updates. We will see when it is time to release the 1.0 version.

    On the C language side:

    • Implemented P1/Spin target
    • Implemented P2 floating point support (with float variable type)
    • Initial struct type implementation

    With the preprocessor it is now possible to compile the same source for P1 and P2, provided that the used objects are available for both and compatible.
    For example, this source compiles and runs on both P1 and P2, thanks to @JonnyMac libraries:

    #pragma target P2
    
    #if __P1__
    #define _XINFREQ 5_000_000
    #define _CLKMODE XTAL1 + PLL16X
    #else
    #define _CLKFREQ 160_000_000
    #endif
    
    #include "jm_fullduplexserial"
    
    jm_fullduplexserial term;
    
    void main()
    {
        term.start(PGM_RX, PGM_TX, %0000, 115_200);
        term.tx(CLS);
        term.str("Hello ");
    #if __P1__
        term.str("P1");
    #else
        term.str("P2");
    #endif
        term.str(" World!");
        term.tx(CR);
    
        for(;;);
    }
    

    The pragma directive defines the target processor (P1 or P2) with P2 being the default if no pragma is specified.

  • Automatic update failed on OSX from 25.0
    But manual works. Than-you

    I don't see the beta auto update on the download site.

    the error log of automatic update:
    java.io.FileNotFoundException: https://www.maccasoft.com/wp-content/updates/spin-tools/spinide.xml
    at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1920)
    at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1520)
    at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:250)
    at classpath//com.maccasoft.propeller.SpinTools$68.run(SpinTools.java:2388)
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)

  • I use a spin file from Terry's spinneret edge board.

    The main "SpinnerEdge_Top.spin2" give an error in spin tools, but no explanation why?
    On propeller tool it runs fine.

    https://griswoldfx.visualstudio.com/Spinner%20Edge/_git/Software?path=/SpinnerEdge_Top.spin2&version=GBmain

  • JonnyMacJonnyMac Posts: 8,918
    edited 2023-04-26 17:46

    Agreed. I've been wanting to look at Terry's project so I download to its own folder.

    In Propelller Tool

    In Spin Tools

    I opened all of the project files in Spin Tools and couldn't find any red marks. Zip is attached for others.

  • @Ltech said:
    I use a spin file from Terry's spinneret edge board.

    The main "SpinnerEdge_Top.spin2" give an error in spin tools, but no explanation why?
    On propeller tool it runs fine.

    That's really weird.
    I'll investigate.

  • If there is an obscure way to break things, I find it! LOL.

  • Well the "ghost" error was caused by a wrong variable scope when compiling the inline pasm code for W6100drv.spin2 (was picking the local spin variable instead of the register alias in some cases). Was a surprisingly easy fix but some changes recently made to the compiler prevents these kind of errors to be properly highlighted, need some refactorings.

    Some other things needed to be fixed: wrong encoding of the method call index (was not properly using the rfvar encoding) and the missing augd prefix for long literals in the DRV* instructions.

    Speaking of the DRV* instructions, I see that are all using the long literal when, AFAIK, is not needed. Is that intentional ?

    @ke4pjw said:
    If there is an obscure way to break things, I find it! LOL.

    And thanks for that! :)

  • Please consider adding "Close All Tabs" to the special menu and to the File menu.

  • DarkInsanePyroDarkInsanePyro Posts: 31
    edited 2023-05-01 01:19

    I actually have a branch of Spin Tools with the requested feature, @JonnyMac. I'll look into getting this into a PR for @macca. I've just been meaning to refactor it since I hacked the features in. It's been 15+ years since I've done Java so it is a bit of a rough start. Really, I have an aggerate of the following features:
    1. Right-Click Tab Context Menu
    2. Middle-Click Close
    3. Pinning as Top

    I didn't put any effort into the options, I just ... gleaned off of other code editors. But it has been absolutely nice to have though.

    Edit:
    Catching up from being out of town for a week, looks like macca has been putting some serious work into the main branch. I'm liking the updates. Looks like close-all is added. Though I'm PR'ing a middle mouse button support and if feasible (I don't see implementation support yet), "pinning" a top file.

  • maccamacca Posts: 718
    edited 2023-05-02 07:04

    Released version 0.27

    A number of changes in this release:

    • Implemented C-style preprocessor directives.

      (and you may notice the syntax highlight is not consistent... oh well...)
      As of now is not possible to add a define from preferences or command line (will add later).

    • Added a dialog to list the available Propeller devices.

    • Added toolbar

      The icons and tooltips should be self-explanatory.
      The bug icon allows to temporarily enable debug (P2-only), compile and upload the program, no need to toggle the debug mode.

    • Reviewed and fixed the command line compiler, added the option to run with PST enabled on the console.

    • New menu items to close editor (current or all), run with debug (like PNut), open files from configured library paths.
    • Editors can be closed with the middle mouse button click on the tab (thanks to @DarkInsanePyro ).
    • A number of other fixes (including those related to SpinnerEdge).
  • Macca, great again!

    Run nice on OSX with toolbar
    Spinner-edge runs also fine now

    I love this spin tool

    :)

  • JonnyMacJonnyMac Posts: 8,918
    edited 2023-05-02 21:50

    Yes, indeed. Thank you, Marco.

    It seems like you added F8, F10, and F11 hotkeys -- though they're not mentioned in the menus. Could you add F5 (Preferences), too? Almost all of my Propeller Tool habits seem to be working, and the toolbar looks great and is really convenient.

    On that... I could not find the files used as templates. Are you generating a blank project in code? Could you allow an external file (one for P1, one for P2) and if an external template file is not specified, generate the template as you are now? If yes, I suggest you add a template file field to the P1 and P2 sections inside Preferences (that was probably obvious, but I like to be clear).

    Again, thank you for your efforts on this. Spin Tools is really coming along nicely and I encourage @"Ken Gracey" and @"Jeff Martin" to have a look and provide support where they can. Having a x-platform tool with the look and feel of Propeller Tool (only nicer), is a very big positive for Parallax.

  • @macca After being away from my prop for over two months I came back and noticed all that you've done. Great job!

    However I have a SPIN 2 code that uses POLXY and I noticed that it is giving an incorrect result in Spin Tools. The same issue happened when @cgracey updated Pnut from v36 to v37 although he later fix it in v38. Documented here: https://forums.parallax.com/discussion/175133/pnut-proptool-2-9-2-bug-polxy

    I suppose your code is based on v37 because my sample code is producing similar results as v37 of Pnut.

    The expected result should be:

  • @jrullan said:
    @macca After being away from my prop for over two months I came back and noticed all that you've done. Great job!
    However I have a SPIN 2 code that uses POLXY and I noticed that it is giving an incorrect result in Spin Tools. The same issue happened when @cgracey updated Pnut from v36 to v37 although he later fix it in v38. Documented here: https://forums.parallax.com/discussion/175133/pnut-proptool-2-9-2-bug-polxy

    I suppose your code is based on v37 because my sample code is producing similar results as v37 of Pnut.

    The interpreter is based on PNut v38, however the source distributed with it (and v39 too) is still the old source with the immediate bug in the POLXY function, I was using that!
    The P2_PNut_Public Github repository has the fixed source so I'll update it.

    There is also another problem, discovered by reading the bug report, with the $80000000 constant which in my compiler is unsigned while it should be signed.

    I'll fix these issues and release a patch update shortly today.

  • @JonnyMac said:
    It seems like you added F8, F10, and F11 hotkeys -- though they're not mentioned in the menus. Could you add F5 (Preferences), too? Almost all of my Propeller Tool habits seem to be working, and the toolbar looks great and is really convenient.

    This has puzzled me a bit because the hokeys are in the menus... then I checked with Windows and... hotkeys are not displayed! Now I need to figure out why!
    I have used F5 to refresh the file browser as I believe it is mostly used for that also in other program (to refresh the contents).

    On that... I could not find the files used as templates. Are you generating a blank project in code? Could you allow an external file (one for P1, one for P2) and if an external template file is not specified, generate the template as you are now? If yes, I suggest you add a template file field to the P1 and P2 sections inside Preferences (that was probably obvious, but I like to be clear).

    The templates are internal, the source is packed with the binaries in the .jar file, I think I can add a preference to use a custom template.

    Again, thank you for your efforts on this. Spin Tools is really coming along nicely and I encourage @"Ken Gracey" and @"Jeff Martin" to have a look and provide support where they can. Having a x-platform tool with the look and feel of Propeller Tool (only nicer), is a very big positive for Parallax.

    Thank you!

  • New version 0.27.1 published.

    This should fix the POLXY issues and also correctly display the menu shortcut keys on Windows (hope hasn't break the MacOS menu).

  • @macca said:
    New version 0.27.1 published.

    This should fix the POLXY issues and also correctly display the menu shortcut keys on Windows (hope hasn't break the MacOS menu).

    Great! Thanks.

  • JonnyMacJonnyMac Posts: 8,918
    edited 2023-05-03 16:00

    Hot-keys are visible in menus under Windows 10 Pro.

    Thank you.

  • @macca

    I found an issue testing my code.

    This is a screenshot of the code running in Propeller Tool

    Notice the problem when the same code executes in Simple Tool:

    I'm not sure why this is happening.

  • @macca - Found an issue while compiling HUB75 driver code (specifically with: isp_hub75_hwGeometry.spin2)... The code compiles in flexprop.

    test code:

    '' enum test
    ''
    con
      #0[16], a, b, c, d
    #0[16], e, f, g, h       '' Spin Tools likes a space before enumeration... 
      #0, k, l
    
    pub main() | i, j, m
    
      i := a 
      j := e                 '' of course, con 'e' is not defined
      m := l
    

    dgately

  • JonnyMacJonnyMac Posts: 8,918
    edited 2023-05-03 19:06

    The byte[], word[], long[] syntax expects a pointer -- you're passing the first element of the arrays instead of their addresses.

  • LtechLtech Posts: 366
    edited 2023-05-03 18:59

    0,27,1 works on mac high sierra
    I see no cosmetic changes from 0,27

    And the function key's are working

  • @jrullan said:
    This is a screenshot of the code running in Propeller Tool
    Notice the problem when the same code executes in Simple Tool:
    I'm not sure why this is happening.

    Aside from JonnyMac's observation, I think the right-side bitfield is not setup correctly, need to do some more tests.

  • @dgately said:
    @macca - Found an issue while compiling HUB75 driver code (specifically with: isp_hub75_hwGeometry.spin2)... The code compiles in flexprop.
    test code:

    '' enum test
    ''
    con
      #0[16], a, b, c, d
    #0[16], e, f, g, h       '' Spin Tools likes a space before enumeration... 
      #0, k, l
    
    pub main() | i, j, m
      
      i := a 
      j := e                 '' of course, con 'e' is not defined
      m := l
    

    Yes, unfortunately the enum syntax conflicts with the C-style preprocessor directives (that starts with #).
    For now, the preprocessor must start at column 0 (in the CON section) and enum at column >= 1.

  • @Ltech said:
    Run nice on OSX with toolbar
    Spinner-edge runs also fine now

    0,27,1 works on mac high sierra
    I see no cosmetic changes from 0,27

    And the function key's are working

    Very good! Thanks.

  • @JonnyMac

    Oh, my bad you are absolutely right. I forgot the syntax while creating the example to show the difference between Propeller Tool and Spin Tools.

    Nonetheless Spin Tools is behaving differently:

    Propeller Tool

    Spin Tool

    It's weird that my wrong example from before gave the same result as the correct one in Propeller Tool.

  • JonnyMacJonnyMac Posts: 8,918
    edited 2023-05-03 19:12

    I was up very late last night and am a bit ragged, but I'm having a difficult time seeing what you're pointing to. I ran my version in Spin Tools and get the same results.

  • @JonnyMac

    Yes, that works, the problem is as @macca pointed out in the right hand side of the assignment in the second block when copying the first array values into the second array, see the following screenshot:

  • JonnyMacJonnyMac Posts: 8,918
    edited 2023-05-03 19:17

    When I opened my generic workspace program (work.spin2) in Spin Tools (0.27.1) I encountered a couple situations that are not a problem for Propeller Tool.

  • Published 0.27.2 with the fixes for the issues above.

    The right and left side bitfields should now operate correctly, aside from using the right variable/pointer.

    @JonnyMac said:
    When I opened my generic workspace program (work.spin2) in Spin Tools (0.27.1) I encountered a couple situations that are not a problem for Propeller Tool.

    Forgot some constant operators, this is fixed.

    Note: with Spin Tools, you don't need the floating point operators in constant expressions. The standard operators +, -, *, /, etc. can operate on both integer and floating point numbers, the result is automatically promoted to floating point. You need to use round/trunc only at the final assignment, if needed.

    For example:

    PUB start() | a, b
    
        a := 1.2345 * 2
        b := round(a)
        debug(fdec(a),udec(b))
    

    Results:

    Cog0  a = 2.469000e+00, b = 2
    
Sign In or Register to comment.