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

Spin Tools IDE

13468920

Comments

  • Found an issue I don't believe found. A constant referencing another constant from a child object can't find the symbol in that child object. Example below.

    TestA.spin2

    CON
      _xtlfreq                      = 20_000_000
      _clkfreq                      = 20_000_000
    
      ' works
      #0
        ENUM1_VAL_A
        ENUM1_VAL_B
        ENUM1_VAL_NEXT
    
      #ENUM1_VAL_NEXT ' <- technical
        ENUM2_VAL_C
        ENUM2_VAL_D
    
      ' doesn't work
      '#child.ENUM_VAL_NEXT ' <----- "symbol 'child.ENUM_VAL_NEXT' not found!"
      '      ENUM2C_VAL_A
    
    OBJ
      child:         "TestB"
    
    PUB Main()
      debug(udec(child.ENUM_VAL_A))
      debug(udec(child.ENUM_VAL_B))
      debug(udec(ENUM2C_VAL_A))
    

    TestB.spin2

    CON
      #0
            ENUM_VAL_A
            ENUM_VAL_B
            ENUM_VAL_NEXT
    
    PUB TLO()
      ABORT
    

    It isn't completely crazy to do something like this. I have low-level general abort codes (timeout, argument invalid, etc.) but a library can extend them for library-specific codes. e.g., my I2C library would extend the codes for I2C-y things like early NACK. Verified in Propeller Tool can pull from child objects.

  • @"Greg LaPolla" said:

    @macca said:
    A link to the source ?

    Forum link : https://forums.parallax.com/discussion/175121/p2gui-framework
    Source link: https://github.com/jrullan/P2GUI

    Downloaded your source, there are a number of object file names with mixed cases, after fixing that, there are still some syntax errors where you use the object method pointers. They are caused by a little mistake in the compiler and can be worked-around by adding the round parentheses like a method call, @button[MODE_BTN].set_enable -> @button[MODE_BTN].set_enable(), will be fixed in the next release.

    After that I don't see other errors, of course I can't check the functionality.

  • @JonnyMac said:
    The only thing missing for me is the "blob/block select" (Alt + drag-select) in Propeller Tool. I have found this in other editors, too, and make use of it. Not a deal-breaker at all, but a really nice-to-have.

    The widget I'm using as text editor supports the block selection, however it is a toggle so it needs a button somewhere and/or a keyboard shortcut to enable/disable it.
    Using Alt+drag, or something like that to detect the action, doesn't seems possible.

  • @macca said:

    Downloaded your source, there are a number of object file names with mixed cases, after fixing that, there are still some syntax errors where you use the object method pointers. They are caused by a little mistake in the compiler and can be worked-around by adding the round parentheses like a method call, @button[MODE_BTN].set_enable -> @button[MODE_BTN].set_enable(), will be fixed in the next release.

    After that I don't see other errors, of course I can't check the functionality.

    Not my code. I am just using it. I will let the code owner know. Kinda weird that it compiles on propeller tool missing the parens.

  • Released version 0.24.

    I have finally managed to update the Spin2 interpreter. This was a bit more difficult than expected because new bytecodes were added in the middle of existing bytecodes causing a partial renumber so I needed to update all my references. The libraries and examples binaries matches those produced by PNut so I hope to have updated all locations.

    The new interpreter allowed me to add a startup delay using the locations used to write the clock frequency to the debug rx pin. These locations are used only when the debug is enabled, without the debugger they should be filled with NOPs, instead I'm injecting a waitx instruction to delay the startup by 100ms. This will work-around the serial startup issue with the terminal.

    • Interpreter and debugger updated to 2022.11.19 (PNut v38)
    • Implemented ^@ and FIELD operators
    • Optional use of clock setter code for PASM-only programs (instead of asmclk)
    • MacOS system menu should now work for Preferences and About dialogs
    • Updated content assist and method documentation hover to handle pointers
    • Added block selection toggle to Edit menu
    • Preferences moved to Edit menu (from File)
    • PTRx registers can now be used in expressions
    • A number of fixes for the reported issues

    Last but not least, the code is now published on GitHub, along with a Ko-Fi link for those who want to help the development with some contributions.

  • Macca, I love you tool!

    Fails on automatic update .23 to .24

    And Work on manual update :) Menu's are as expected on osx.

  • @Ltech said:
    Macca, I love you tool!

    Thank you!

    Fails on automatic update .23 to .24

    That's weird, it worked with Linux and Windows, hope it was just a glitch with the download.

    And Work on manual update :) Menu's are as expected on osx.

    Good!

  • Greg LaPollaGreg LaPolla Posts: 323
    edited 2023-03-06 17:23

    I get the same error on my mac.

    Here is the error:

    /Applications/Spin Tools IDE.app/Contents/Java/lib/spin-tools-0.23.0.jar: Archive entry cannot be linked to a file in the configuration

  • @"Greg LaPolla" said:
    I get the same error on my mac.

    Here is the error:

    /Applications/Spin Tools IDE.app/Contents/Java/lib/spin-tools-0.23.0.jar: Archive entry cannot be linked to a file in the configuration

    I really don't know what I've changed to break the update, since it works on Linux and Windows.
    The weird thing is that it shows with the download, while the actual update is done at program startup (that's why it needs to be restarted).

    Now I wonder why it worked with the previous releases...

  • Here's the full Java error output on macOS:

    java.lang.IllegalStateException: /Applications/Spin Tools IDE.app/Contents/Java/lib/spin-tools-0.23.0.jar: Archive entry cannot be linked to a file in the configuration
        at org.update4j.Archive.lambda$load$2(Archive.java:88)
        at java.base/java.util.Optional.orElseThrow(Optional.java:403)
        at org.update4j.Archive.lambda$load$3(Archive.java:88)
        at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
        at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
        at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179)
        at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
        at java.base/java.util.Iterator.forEachRemaining(Iterator.java:133)
        at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1921)
        at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
        at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
        at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
        at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
        at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682)
        at org.update4j.Archive.load(Archive.java:90)
        at org.update4j.Archive.read(Archive.java:40)
        at classpath//com.maccasoft.propeller.SpinTools$68.run(SpinTools.java:2399)
        at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)
    

    dgately

  • Perhaps you make to big changes for OSX menu's ....

    I just install the experimental version manually, and all is fine.

    The update from .22 to .23 go fine on OSX.

  • While waiting for the next Eclipse/SWT release that should fix the file dialog last accessed path issue, I started to experiment with additional languages integration:

    Still at the early stages and don't know how far it will get but it is something...

  • Just mention: update to Spin Tools IDE 0.24.1 working on OSX

  • Macca, this give error on spin tools, but compile on others.

  • Upgrade worked for me. The app doesn't restart though. It shut down but did not start back up.

  • @Ltech said:
    Macca, this give error on spin tools, but compile on others.

    NR in that specific case can be avoided since it is the default, nevertheless effects were not handled for the hub instructions. Will be fixed in the next release.

  • I'm a little slow to the game here, but I was able to install Spin Tools IDE 0.24.1 easily on MacOS 10.15.7 and get it up and running just fine after updating to JDK 19.0.2.

    Thank you, @macca for the effort you're putting into this IDE.
    Paul

  • Ran into an error that I don't get in Prop Tool:

    debug("Leg ", sdec_(n), fcolor[n], tcolor[n], ccolor[n])

    It runs if I change it to this:

    debug("Leg ", sdec_(n), sdec(fcolor[n]), sdec(tcolor[n]), sdec(ccolor[n]))

    Then the program starts, I get some debugging info and this error that it stops on:

    cog1 8S: Invalid Port Handle portHandle = 44

    I don't know what this means so I can correct it. The program does run normally under PropTool with no errors

  • @DiverBob said:
    Ran into an error that I don't get in Prop Tool:

    debug("Leg ", sdec_(n), fcolor[n], tcolor[n], ccolor[n])

    The debug support is a bit limited but, AFAIK, that isn't a valid syntax, but if it works in PNut I'll add it to the oddities list.

    It runs if I change it to this:

    debug("Leg ", sdec_(n), sdec(fcolor[n]), sdec(tcolor[n]), sdec(ccolor[n]))

    That's correct, you can also write sdec(fcolor[n], tcolor[n], ccolor[n])

    Then the program starts, I get some debugging info and this error that it stops on:

    cog1 8S: Invalid Port Handle portHandle = 44

    I don't know what this means so I can correct it. The program does run normally under PropTool with no errors

    Not sure to understand. Do you see that message in the terminal window ?
    Because Invalid Port Handle looks like an error from the serial interface, but I don't expect to see it in the terminal window, and cog1 8S looks like an output from the Propeller.
    Maybe the serial adapter has some glitches and gets disconnected ?

  • maccamacca Posts: 806
    edited 2023-03-27 07:09

    Release version 0.25.

    Updated the Eclipse/SWT libraries to the latest release (4.27 or 2023-03), which includes the fixes for the Windows last path bug, now the Open from... menu should work correctly.

    It is suggested to download the full package to update, because the self-update feature updates the main code jar but not the libraries. It should work but you'll miss the SWT update (not a problem with MacOS or Linux but will not fix the Windows issue).

    The most notable update in this release is the preview of the C source files support announced few days ago. There is still a lot of work do to and the compatibility with "standard" C files is far from complete, many missing things (structures, pointers, etc.) and it targets only P2. The current implementation can be described as "Spin with C-like syntax". Despite that, it supports linking with spin2 object files and a rudimentary preprocessor. There is an example file i2c_scanner.c, a straight porting of jm_i2c_scanner.spin2 that demonstrate the implementation.

    The code is under a heavy refactoring due to the mess involved in implementing support for other languages, all tests are passing so I hope to not have broken something in the process.

  • @macca

    Just upgraded to .25 on my mac. My code now compiles! and the issue that exists when compiled with flexprop doesn't happen with Spin Tools. I am going to let eric know about it now as it may very well be a compiler issue with flexprop.

    Thanks for all your efforts on this!

  • About SpinTools not loading on macOS, it appears to be a problem related to the new M1 processor I have in my macbookAir.
    On my old macbookAir based on i5 processor, I am able to work fine!!!
    I hope it will be solved.

    Thanks again for your piece of software, it's fantastic!!!

    carlo

  • I just noticed that the parsed does not like :=+ operator, instead he likes :=-! Not a problem, I'll change to conventional syntax.

    carlo

  • @dossic said:
    About SpinTools not loading on macOS, it appears to be a problem related to the new M1 processor I have in my macbookAir.
    On my old macbookAir based on i5 processor, I am able to work fine!!!
    I hope it will be solved.

    I can try to build a package for it, I see there is an aarch64 version of SWT that should work for M1, but I'm not sure if the executable stub is already working for both architectures.

    Thanks again for your piece of software, it's fantastic!!!

    Thank you.

    I just noticed that the parsed does not like :=+ operator, instead he likes :=-! Not a problem, I'll change to conventional syntax.

    The expression parser is a bit weak but should support all documented operators, sometimes it is a matter of spacing the operators or enclose expressions between parenthesis.
    Not sure what you mean with that operators, AFAIK, they don't exists as shown. Please post an example, no need to post the whole source, just the expression line and specify if it is a CONstant or a Spin expression.

  • Dear Macca, it was great starting using your software.
    It is not a bug in your parser, it was Propeller Tool that allowed the syntax
    Pulse1:=+Pulse
    Pulse2:=-Pulse
    I personally thought was clearer to me.

    Your parser probably consider "+" operator unnecessary. No problem, I will change to
    Pulse1:=Pulse
    Pulse2:=-Pulse

    Thanks again

    carlo

  • @dossic said:
    Dear Macca, it was great starting using your software.
    It is not a bug in your parser, it was Propeller Tool that allowed the syntax
    Pulse1:=+Pulse
    Pulse2:=-Pulse
    I personally thought was clearer to me.

    Your parser probably consider "+" operator unnecessary. No problem, I will change to
    Pulse1:=Pulse
    Pulse2:=-Pulse

    Yes, right, I tought that nobody will use the + unary because it has no effect on the result, but I can add it for compatibility.

    I have published a build for MacOS aarch64 that should work for M1 processors, I'm not sure about the stub executable so, please try it.

  • Thanks!

    I'll try and I'll keep you informed.

    Ciao. Carlo

  • Info.
    The automatic update to .25 did not work on my mac.
    Manually install works.

    Thanks macca.

  • Dear Macca, I tried aarch64 version on my M1 MacBook Air, but again did not recognise Java, and shows the error preventing the app to work.

    On the old, i5-based MacBook Air, SpinTools works beautifully.

    Have an happy Easter!

    Carlo

Sign In or Register to comment.