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

Spin Tools IDE

1141516171820»

Comments

  • KaioKaio Posts: 265

    Hi @macca,

    @macca said:

    @Kaio said:
    With the Windows version the replace all function is working. Looks like an issue only on Mac.

    Could be a notification from the UI that is fired on the Mac but not on other OS. Do you get a stack trace with the OutOfBounds exception ? May help to find the exact error location.

    The issue with the replace all function occurred again. Here is the stack trace.

    java.lang.IllegalArgumentException: Index out of bounds
    at org.eclipse.swt.SWT.error(SWT.java:4903)
    at org.eclipse.swt.SWT.error(SWT.java:4837)
    at org.eclipse.swt.SWT.error(SWT.java:4808)
    at org.eclipse.swt.custom.StyledText.getOffsetAtLine(StyledText.java:4062)
    at com.maccasoft.propeller.EditorTab.revealCaret(EditorTab.java:1045)
    at com.maccasoft.propeller.EditorTab.findAndSelect(EditorTab.java:988)
    at com.maccasoft.propeller.FindReplaceDialog.performReplaceAll(FindReplaceDialog.java:604)
    at com.maccasoft.propeller.FindReplaceDialog$12.widgetSelected(FindReplaceDialog.java:455)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:265)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:91)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4660)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1622)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1645)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1630)
    at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1392)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4427)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4003)
    at com.maccasoft.propeller.SpinTools$118.run(SpinTools.java:3828)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
    at com.maccasoft.propeller.SpinTools.main(SpinTools.java:3792)

  • maccamacca Posts: 806
    edited 2024-12-07 16:06

    Released version 0.41.0

    A lot of changes in this release.
    The Spin2 interpreter and debugger was updated to PNut 46 2024.11.24 and the new keywords implemented.
    The structures handling was updated to use the new bytecodes.
    The pointer variables are implemented.
    Both the structures and pointers may still show some issues, pointers in particular are a bit difficult to implement because the "unusual" syntax makes them perfectly valid variables with obvious consequences, I think it needs a couple more releases to get them right.

    Thanks to @VonSzarvas I have added the support to connect and upload programs to P1 networked with the Parallax WX WiFi module.
    The F7 - Devices Dialog now shows the remote devices:

    Once selected it works like any other device, programs can be uploaded directly and the terminal connects to them as usual.
    There is also a new preference page to add the remote devices, even if not currently reachable, with some settings.

    Devices added to the preferences list also appear in the Tools -> Port menu, unlisted devices can still be discovered and used with the F7 dialog.
    The command line compiler was updated to upload to remote devices by using the -p option with either an IP address or a MAC address.

    Other fixes:

    • Added external tools editor action preference (auto-save, warn or ignore)
    • Fixed context reference on expanded PAsm lines (asmclk)
    • Set default clock mode for debug
    • Fixed child object constants underscore
    • Added spinc (command line compiler) to MacOS builds
    • Prevent mouse-drag selection to trigger code navigation
    • Fixed code navigation outline
    • Added remove unused methods preferences
    • Fixed top and bottom lines range check (replace text issue)

    I see there is a new PNut version, so expect a new release soon.

  • Thanks plus plus for the outline and mouse drag fixes. Nice surprise!

  • @"Greg LaPolla" said:
    Is anyone having issues on the latest MACOS version 15.1.1 ? I have uninstalled re-installed and I always get this message: JavaAppLauncher quit unexpectedly.

    However If I open terminal and run JavaAppLauncher, it runs just fine.

    I was able to fix this. MacOS 15.1 now requires all code to be signed. There is 2 ways to fix this. Disable it all together (Not Safe) or self sign the app. I was able to self sign the app and now it runs perfect.

    @macca Move the license file inside the Content folder. You cant sign the app if anything is outside the Content folder.

  • maccamacca Posts: 806

    @"Greg LaPolla" said:

    @"Greg LaPolla" said:
    Is anyone having issues on the latest MACOS version 15.1.1 ? I have uninstalled re-installed and I always get this message: JavaAppLauncher quit unexpectedly.

    However If I open terminal and run JavaAppLauncher, it runs just fine.

    I was able to fix this. MacOS 15.1 now requires all code to be signed. There is 2 ways to fix this. Disable it all together (Not Safe) or self sign the app. I was able to self sign the app and now it runs perfect.

    @macca Move the license file inside the Content folder. You cant sign the app if anything is outside the Content folder.

    Yes.
    Do you have a tutorial for self-signing an app for MacOS ? Better if integrated with Github actions ?

  • JonnyMacJonnyMac Posts: 9,155
    edited 2024-12-08 04:39

    Thank you for the update, Marco.

    I wonder, would you consider adding bookmarks in the same way they're implemented in Propeller Tool? I still use Propeller Tool as a coarse editor because I like the bookmarks at the Alt-drag-select-and-paste of code. I could live with out the latter in Spin Tools, but I'd really like to have specifically-defined bookmarks for my long files. I just haven't been able to make the Next/Previous Annotation and Next/Previous Edit Location work for me.

    Another ask: Would you also consider adding buttons for external tools in the toolbar? The could be as simple as just having a number, and when one hovers over it the name of the tool could be displayed.

    Off topic: Shame what happened to Charles in quali today. I hope that Ferrari does everything they can with the car & setup so that he can start from the pit lane and blast through the field. I really want Charles to beat Lando for P2 in the WDC. It would be really nice if both Ferraris could finish ahead of the McLarens (as you can probably tell, I'm not a fan of that team).

  • Greg LaPollaGreg LaPolla Posts: 323
    edited 2024-12-08 06:04

    @macca said:

    Yes.
    Do you have a tutorial for self-signing an app for MacOS ? Better if integrated with Github actions ?

    @macca

    Open Searchlight and type Keychain Access
    Click on My Certificates
    On the tool bar at the top. click Keychain Access
    Certificate Assistant -> Create a certificate
    Name: "any name here"
    Identity type: Self Signed Root
    Certificate Type: Code Signing
    Click Create

    codesign --force --deep --sign "" /path/to/Spin\ Tools\ IDE.app

    I don't think you can add this to github actions as it would have to be done after the application is installed.

  • maccamacca Posts: 806

    @JonnyMac said:
    I wonder, would you consider adding bookmarks in the same way they're implemented in Propeller Tool? I still use Propeller Tool as a coarse editor because I like the bookmarks at the Alt-drag-select-and-paste of code. I could live with out the latter in Spin Tools, but I'd really like to have specifically-defined bookmarks for my long files. I just haven't been able to make the Next/Previous Annotation and Next/Previous Edit Location work for me.

    I wasn't aware of that feature (had to search in the settings to enable it), yes I think I can add it, using the next/previous annotation to navigate through it, in addition to the hotkeys (that luckily doesn't overlap the external tools hotkeys).

    Another ask: Would you also consider adding buttons for external tools in the toolbar? The could be as simple as just having a number, and when one hovers over it the name of the tool could be displayed.

    Yes, the toolbar is starting to get crowded... maybe it is time to add some configuration flags to hide/show items or group of items.

    Off topic: Shame what happened to Charles in quali today. I hope that Ferrari does everything they can with the car & setup so that he can start from the pit lane and blast through the field. I really want Charles to beat Lando for P2 in the WDC. It would be really nice if both Ferraris could finish ahead of the McLarens (as you can probably tell, I'm not a fan of that team).

    It couldn't have ended worse for Ferrari (perhaps... I'll watch the race late this evening).

  • maccamacca Posts: 806

    @"Greg LaPolla" said:

    @macca said:

    Yes.
    Do you have a tutorial for self-signing an app for MacOS ? Better if integrated with Github actions ?

    @macca

    Open Searchlight and type Keychain Access
    Click on My Certificates
    On the tool bar at the top. click Keychain Access
    Certificate Assistant -> Create a certificate
    Name: "any name here"
    Identity type: Self Signed Root
    Certificate Type: Code Signing
    Click Create

    codesign --force --deep --sign "" /path/to/Spin\ Tools\ IDE.app

    I don't think you can add this to github actions as it would have to be done after the application is installed.

    Well, I don't have a Mac so I can't do that, however the build runs on a Mac in the Github workflow, anything that can be called from the command line can be used (there are a lot of tools already installed) before che application folder is packed in the tar.gz archive.
    I have done some searches and seems it is possible to self sign with a certificate that doesn't require an Apple ID, need to understand how to generate it without a Mac... like I haven't had enough headaches with the secure boot certificates in the past weeks...

  • KaioKaio Posts: 265

    @macca said:

    @"Greg LaPolla" said:
    codesign --force --deep --sign "" /path/to/Spin\ Tools\ IDE.app

    I don't think you can add this to github actions as it would have to be done after the application is installed.

    Well, I don't have a Mac so I can't do that, however the build runs on a Mac in the Github workflow, anything that can be called from the command line can be used (there are a lot of tools already installed) before che application folder is packed in the tar.gz archive.
    I have done some searches and seems it is possible to self sign with a certificate that doesn't require an Apple ID, need to understand how to generate it without a Mac... like I haven't had enough headaches with the secure boot certificates in the past weeks...

    I think you need to sign only the file JavaAppLauncher. You can create a certificate from command line using openssl and can use it with the codesign command. Please scroll down on the linked issue on stackoverflow until you see "spaghetti.software.extensions".
    description on stackoverflow

  • JonnyMacJonnyMac Posts: 9,155

    I think I can add it, using the next/previous annotation to navigate through it, in addition to the hotkeys

    Excellent. I usually only have a few bookmarked lines so being about to cycle between them without hotkeys would be great, too.

    It couldn't have ended worse for Ferrari (perhaps... I'll watch the race late this evening).

    Well, it turns out commentator James Hinchcliffe was correct and starting Charles on the grid was the right decision. Great drive by both Ferraris, but with Lando keeping it on the road there was nothing they could do.

  • KaioKaio Posts: 265

    Thank you for the update, Marco.

    I have found a problem with the upload using spinc which is not working anymore with the new version.

    There is a problem with showing not used private methods in the editor, which was already in the version before. It seems that the use of private methods is not working. I have the same problem with the Windows version.

    See screen shots for details of both problems.

    Then I have a question regarding the handling of the Spin namespace depending on the default or needed Spin version (e.g. {Spin2_v41}). I didn't see any change in the editor or on compile if I provide a specific Spin version in my code. By default the compiler should use known keywords until Spin version 41. But it is always compiled with the newest compiler version.

    1055 x 391 - 134K
    1540 x 1309 - 323K
  • KaioKaio Posts: 265

    Found an issue with code suggestion which can result in unexpected closing of the IDE. Here are the steps to reproduce.

    1. start the IDE from command line (mostly there is no error window shown)
    2. create new editor from Spin2 template (also possible to use any existing spin file)
    3. locate cursor into any method code and type @ (code suggestion is popping up)
    4. click on the right panel of code suggestion

    Then the IDE closes unexpected and the following stack trace is printed.
    org.eclipse.swt.SWTException: Widget is disposed
    at org.eclipse.swt.SWT.error(SWT.java:4922)
    at org.eclipse.swt.SWT.error(SWT.java:4837)
    at org.eclipse.swt.SWT.error(SWT.java:4808)
    at org.eclipse.swt.widgets.Widget.error(Widget.java:853)
    at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:632)
    at org.eclipse.swt.widgets.Widget.isListening(Widget.java:1177)
    at org.eclipse.swt.custom.StyledText.checkDragDetect(StyledText.java:1476)
    at org.eclipse.swt.custom.StyledText.handleMouseDown(StyledText.java:5794)
    at org.eclipse.swt.custom.StyledText.lambda$28(StyledText.java:5427)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:91)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4660)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1622)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1645)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1630)
    at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1392)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4427)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4003)
    at com.maccasoft.propeller.SpinTools$117.run(SpinTools.java:3835)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
    at com.maccasoft.propeller.SpinTools.main(SpinTools.java:3799)

    1571 x 1074 - 138K
  • maccamacca Posts: 806
    edited 2024-12-09 07:48

    @Kaio said:
    I have found a problem with the upload using spinc which is not working anymore with the new version.

    Ha... that's an oversight on my part, the Mac serial port name is being interpreted as an IP address because I (optimistically) tought that a single dot in the name means an IP address. Have to use a proper regular expression to check this and the mac address.
    It should affect only the command line compiler, the IDE upload should still work, and you don't have to call the command line compiler to include the unused methods, I have added a preference for that.

    There is a problem with showing not used private methods in the editor, which was already in the version before. It seems that the use of private methods is not working. I have the same problem with the Windows version.

    What about the method that calls the private method ? It is flagged as unused ? If true, then it is expected, is unused because also the calling method is unused.

    Then I have a question regarding the handling of the Spin namespace depending on the default or needed Spin version (e.g. {Spin2_v41}). I didn't see any change in the editor or on compile if I provide a specific Spin version in my code. By default the compiler should use known keywords until Spin version 41. But it is always compiled with the newest compiler version.

    The Spin version is ignored, my compiler doesn't have the keyword gating as in PNut, it attempts to always be compatible with the existing sources.
    And anyway, I think new keywords should be enabled by default.

    Found an issue with code suggestion which can result in unexpected closing of the IDE. Here are the steps to reproduce.

    1. start the IDE from command line (mostly there is no error window shown)
    2. create new editor from Spin2 template (also possible to use any existing spin file)
    3. locate cursor into any method code and type @ (code suggestion is popping up)
    4. click on the right panel of code suggestion

    The right panel should not be clickable... but clicking on it closes both panels so the error is "correct". Seems i can't reproduce on Linux, I'll see if I can prevent the error somehow.

  • KaioKaio Posts: 265
    edited 2024-12-09 19:11

    @macca said:
    Ha... that's an oversight on my part, the Mac serial port name is being interpreted as an IP address because I (optimistically) tought that a single dot in the name means an IP address. Have to use a proper regular expression to check this and the mac address.

    It's like on Linux, devices start always with /dev. Otherwise it should be an IP address, maybe to be checked before.

    It should affect only the command line compiler, the IDE upload should still work, and you don't have to call the command line compiler to include the unused methods, I have added a preference for that.

    Yes, it's working with the internal compiler. Thank you for the switch.

    What about the method that calls the private method ? It is flagged as unused ? If true, then it is expected, is unused because also the calling method is unused.

    Ok, then it is working as expected. But I find this behavior not helpfully. If I write a new object all public methods are not used from anywhere. Therefore the hint is confusing me if a private method is already in use in this object.

    The right panel should not be clickable... but clicking on it closes both panels so the error is "correct". Seems i can't reproduce on Linux, I'll see if I can prevent the error somehow.

    The problem is not the error, it's that the IDE itself is closed without save current changes in the editor!
    I was able to reproduce this problem with the Windows 0.40 version but there is an error window shown with the stack trace. The IDE doesn't close as it is always the case on the Mac Silicon version.

  • JonnyMacJonnyMac Posts: 9,155

    I ran into my first problem with Spin Tools IDE today.

    This error was raised when I tried to invoke PST via the external tools mechanism. My setup is based on a suggestion in this thread from @macca. I was able to clear the error by restarting Spin Tools IDE, but though I'd share it in case it helps Marco improve the program.

  • maccamacca Posts: 806

    @JonnyMac said:
    This error was raised when I tried to invoke PST via the external tools mechanism. My setup is based on a suggestion in this thread from @macca. I was able to clear the error by restarting Spin Tools IDE, but though I'd share it in case it helps Marco improve the program.

    Does it happens with a new unsaved source file ? Such as loading the template with New P1 (or P2) Template ?
    The external tools handler is missing a couple of checks in that case.
    The workaround is to save new files (only new files are affected).

  • JonnyMacJonnyMac Posts: 9,155
    edited 2024-12-11 19:21

    I don't think that happened because I was using the Spin Tools IDE compiler (which always saves, right?), and just invoking PST (which has Check Editor State set to None). I will be careful to manually save in the future.

  • maccamacca Posts: 806

    @JonnyMac said:
    I don't think that happened because I was using the Spin Tools IDE compiler (which always saves, right?), and just invoking PST (which has Check Editor State set to None). I will be careful to manually save in the future.

    No, the internal compiler doesn't save the file to compile, it is all in memory.

    It should happen only with a new file that was never saved before, in effect doesn't make sense to force a save when the tool doesn't require a file, I'll see how to fix that.

  • maccamacca Posts: 806

    Release version 0.42.0

    Spin2 interpreter updated to 2024.12.08 and implemented the new cooperative multitasking functions.

    Some changes to the terminal window, removed the line control buttons as seems not useful as I tought and added a reset button that seems more appropriate. The reset toggles both DTR and RTS lines for local/usb serial ports and uses the reset device function of the remote WX modules. Also removed the TTY emulation (merged with ANSI / VT-100). Changed some defaults to enable the PST-like line input control.

    Implemened the P2 upload to remote WiFi devices with the WX module. Remote debug should work for normal debug windows, however the PAsm debugger hangs, may be some timeouts due to the packets latency, need to do more tests to get the right magic.

    Several other fixes, including the command line IP and MAC address detection using regular expressions (should not conflict with Mac serial ports), display of an error dialog if an external tool can't run, run external tools with new unsaved sources, PAsm long literals on some instructions, source code navigation that was partially broken in the previous release, and others.

  • maccamacca Posts: 806

    Released version 0.42.1

    Just realized I haven't updated some locations that were relocated in the new Spin interpreter.
    Please discard the previous release if already downloaded, and download this one instead.

  • JonnyMacJonnyMac Posts: 9,155
    edited 2024-12-14 18:53

    Thank you, Marco. I found a small gotcha with a P2 constant alias.

    Even after fixing that and no errors identified by Spin Tools, it doesn't seem to run. I put a program into flash with a simple "Hello, World!" message after reboot and key input to the terminal. When I run my multitasking demo through PNut, everything works. When I try to run it with Spin Tools, the board gets reset, but it doesn't seem like the new program gets loaded because the terminal shows "Hello, World!" when I press a key.

    My simple multitask demo is attached.

  • maccamacca Posts: 806

    @JonnyMac said:
    Thank you, Marco. I found a small gotcha with a P2 constant alias.

    Ah, I forgot the include the "short" variants...

    Evan after fixing that and no errors identified by Spin Tools, it doesn't seem to run. I put a program into flash with a simple "Hello, World!" message after reboot and key input to the terminal. When I run my multitasking demo through PNut, everything works. When I try to run it with Spin Tools, the board gets reset, but it doesn't seem like the new program gets loaded because the terminal shows "Hello, World!" when I press a key.

    Tried here with Windows 11 and seems to work correctly. The only reset I see is when the terminal is closed.

    For reference, I tried:

    Terminal close, upload, open terminal, hit key, the program starts
    Terminal open, upload, switch to terminal, hit key, the program starts

    Hmm... maybe I see what you mean, just tried with the external PST and indeed the propeller is reset but when I hit the enable button on PST. Is that what you see ? Was it working in the previous version ?

  • JonnyMacJonnyMac Posts: 9,155

    I'm on Windows 10 Pro. I'm wanting to compile and run in RAM. Here are my results.

    Compiler    Terminal    Works?
    --------    --------    ------
    Internal    Internal    No
    Internal    PST         No
    PNut_v47    Internal    No
    PNut_v47    PST         Yes
    

    Was it working in the previous version ?

    I have only been able to make this work with PNut & PST. If clicking Enable on PST is required it doesn't hurt the program.

  • JonnyMacJonnyMac Posts: 9,155
    edited 2024-12-15 19:43

    Found a little gotcha today. This code -- which has since been simplified and works -- should have raised an error. Note the highlighted line defines two return values, but the use line (red arrow) only takes one.

  • maccamacca Posts: 806

    @JonnyMac said:
    I'm on Windows 10 Pro. I'm wanting to compile and run in RAM. Here are my results.

    Compiler    Terminal    Works?
    --------    --------    ------
    Internal    Internal    No
    Internal    PST         No
    PNut_v47    Internal    No
    PNut_v47    PST         Yes
    

    Was it working in the previous version ?

    I have only been able to make this work with PNut & PST. If clicking Enable on PST is required it doesn't hurt the program.

    Tested a bit more, seems that the previous version 0.41 worked better with PST (doesn't reset), however the internal terminal must work, it was designed for that.

    Found a little gotcha today. This code -- which has since been simplified and works -- should have raised an error. Note the highlighted line defines two return values, but the use line (red arrow) only takes one.

    Will check.

  • JonnyMacJonnyMac Posts: 9,155
    edited 2024-12-16 16:18

    I'm using 0.42.1, and now I can't get the internal terminal to work for anything -- even a very simple program that starts up and prints a simple message.

    I'm on Windows 10 Pro.

    I have the last few versions on my machine

    • 0.41.0 kind of works, but only when I have my wait_for_terminal() line -- if I remove that and start with the terminal, the message doesn't show
    • 0.40.0 works under both conditions (with or without my wait line)
Sign In or Register to comment.