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

Spin Tools IDE

1235714

Comments

  • @dgately said:
    I downloaded, extracted and tried to run both versions (no-update & self-update) on latest macOS (Ventura 13.2.1)... The no-update version runs, but the self-update version fails to launch. To test the difference in outcomes I launched them from the command line. The no-update versions runs without any errors, but does display a few errors on quit (has always done this, but the app runs fine). The self-update version quickly displays the following (see below) and fails. The Spin Tools IDE quickly shows its icon in the dock before disappearing...

    % ./JavaAppLauncher 
    ***WARNING: Display must be created on main thread due to Cocoa restrictions. Use vmarg -XstartOnFirstThread
    Exception in thread "Thread-2" java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
      at org.update4j.service.DefaultLauncher.run(DefaultLauncher.java:123)
      at org.update4j.ConfigImpl.lambda$25(ConfigImpl.java:693)
      at java.base/java.lang.Thread.run(Thread.java:1589)
    Caused by: java.lang.reflect.InvocationTargetException
      at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:119)
      at java.base/java.lang.reflect.Method.invoke(Method.java:578)
      at org.update4j.service.DefaultLauncher.run(DefaultLauncher.java:118)
      ... 2 more
    Caused by: org.eclipse.swt.SWTException: Invalid thread access
      at org.eclipse.swt.SWT.error(SWT.java:4918)
      at org.eclipse.swt.SWT.error(SWT.java:4833)
      at org.eclipse.swt.SWT.error(SWT.java:4804)
      at org.eclipse.swt.widgets.Display.error(Display.java:1209)
      at org.eclipse.swt.widgets.Display.createDisplay(Display.java:960)
      at org.eclipse.swt.widgets.Display.create(Display.java:944)
      at org.eclipse.swt.graphics.Device.<init>(Device.java:132)
      at org.eclipse.swt.widgets.Display.<init>(Display.java:798)
      at org.eclipse.swt.widgets.Display.<init>(Display.java:789)
      at classpath//com.maccasoft.propeller.SpinTools.main(SpinTools.java:2430)
      at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
      ... 4 more
    

    I should have remembered this Mac issue about the UI thread.
    This must be fixed in the update framework library, so until then, the Mac version can't have a self-updating release.

  • @macca

    Latest upgrade solved all issues I have found... well one other popped up but this isn't a show stopper:

    another example

    It seems it is not parsing correctly the E number and the operand, but with spaces it works

  • @dgately said:
    I downloaded, extracted and tried to run both versions (no-update & self-update) on latest macOS (Ventura 13.2.1)... The no-update version runs, but the self-update version fails to launch. To test the difference in outcomes I launched them from the command line. The no-update versions runs without any errors, but does display a few errors on quit (has always done this, but the app runs fine). The self-update version quickly displays the following (see below) and fails. The Spin Tools IDE quickly shows its icon in the dock before disappearing...

    Uploaded a second attempt to get the update launcher right. I have hacked some fixes to the update4j library to run in a single thread, this hopefully fixes the MacOS issue. Please download the package again.

    Also fixed the recent issues with the objects array method references and the hex numbers parsing.

  • LtechLtech Posts: 366
    edited 2023-02-22 17:56

    On mac osx 10.13.6 i can run the updater , but no updates yet.

    And on line 613 bytemove( @byte give a warning but not in other flash tools.

  • I get the same result as LTech, so we'll happily see the next version as an update!

    Thanks,
    Dennis

  • Greg LaPollaGreg LaPolla Posts: 319
    edited 2023-02-22 18:50

    Just started looking at this as I am having an issue with flexprop.

    I get an error on this line

    LONG[ptr][DRAW_LINE](xt+i,yt+i,xt+i,yb-i,l_color)
    

    The code I am using compiles fine on flexprop and propeller tool.

  • @Ltech said:
    On mac osx 10.13.6 i can run the updater , but no updates yet.

    Awesome, so the update4j fix works. Good!
    Yes, there are no updates (yet).

  • Thanks for you tool.

    Find a issue using numbers.spin

    not is used some lines up with no error.
    Try to use brackets don't help.

  • @macca

    Found this issue with FILE:

  • Thanks for you tool.

    Find a issue using numbers.spin

    not is used some lines up with no error.
    Try to use brackets don't help.

    This is one of those ambiguous expressions that my parser has some difficulty with.
    The parentheses should help but after the not (in other words put the expression you want to negate in parentheses)::
    if not (Val := IChar) and (Char == IChar)
    should work as expected.

  • @jrullan said:
    Found this issue with FILE:

    That's very strange, file works, I'm pretty sure about it since I'm using it extensively in my projects.
    Maybe the errors check was stuck in an inconsistent state. What if you close and reopen the source ? Does it still display the error ?

  • @macca said:

    @jrullan said:
    Found this issue with FILE:

    That's very strange, file works, I'm pretty sure about it since I'm using it extensively in my projects.
    Maybe the errors check was stuck in an inconsistent state. What if you close and reopen the source ? Does it still display the error ?

    Hmm... you were right. I restarted it and it went away.

  • Running version 0.22.0 and got errors on this code

        ' load pointers to rx and tx buffers
        pRxBuf[portHandle] := @BYTE[@rxbuf][portHandle * BUF_SIZE]               ' ptr to hub buffer address
        pTxBuf[portHandle] := @BYTE[@txbuf][portHandle * BUF_SIZE]
    
        ' load pointers to head/tail indexes
        pRxHead[portHandle] := @LONG[@rxHeadIdx][portHandle]                        ' ptr to hub addresses
        pTxHead[portHandle] := @LONG[@txHeadIdx][portHandle]
        pRxTail[portHandle] := @LONG[@rxTailIdx][portHandle]
        pTxTail[portHandle] := @LONG[@txTailIdx][portHandle]
    
    
    

    It didn't like the @BYTE and @LONG, undefined symbol. This code works in Prop Tool

  • Found an other error (spin2 code):

      if (value < 0)                                        ' negative value?
        -=value                                              '   yes, make positive
        nstr[idx++] := "-"                                  '   and print sign indicator
    

    on -=value, error: undexpected -=

  • After reading the reviews about your program I wanted to try it. So I downloaded it and tried to install it on a machine running Linux Mint 20.3. I followed the instructions I think and in terminal it appears to have worked. But I don't see the program in my menu or on the desktop. Attached is a screenshot of my terminal command and response.

    Has anyone else tried to use your program on Linux?

    Thanks for any help you can give. it sounds like you have produced a great program.
    Carroll

  • @Carroll said:
    After reading the reviews about your program I wanted to try it. So I downloaded it and tried to install it on a machine running Linux Mint 20.3. I followed the instructions I think and in terminal it appears to have worked. But I don't see the program in my menu or on the desktop. Attached is a screenshot of my terminal command and response.

    Has anyone else tried to use your program on Linux?

    I'm developing and running it on Linux.

    If I'm not wrong, Mint is derived from Ubuntu, so the desktop install should work at least with Gnome 3, however I'm not sure about the desktop manager (Cinnamon, MATE, Xfce ?).
    The script is quite old but should have put the desktop file under ${HOME}/.local/share/applications/

    Try to logout/login, this should refresh the menus.

  • I checked and did find the desktop file in .local/share/applications. However when I clicked on it I got a message saying there was an error while trying to open the program. I went to the Spin Tools folder and was able to click on spinide and tell it to run in terminal and the program came up and let me upload a program to the Propeller board. What is interesting is that I can use Flexprop and upload programs from the Spin Tools examples but if I try to use Spin Tools to upload a Flexprop example program I get a message saying there are errors in the program. I don't know enough yet about Parallax programming to understand what is going on but I thought you might want to know about that.

    You are correct that LM is based on Ubuntu. And I am running Cinnamon as my DE. Shutting down my PC and restarting it later did not make Spin Tools appear either in my menu or on my desktop. I may not be real quick to reply but if you want me to do some more testing I will be glad to help you in any way I can. I can post screenshots of the errors messages if that would help. I do also like how your program shows you where the errors are. Now I just need to learn how to fix them!

  • @Carroll said:
    I checked and did find the desktop file in .local/share/applications. However when I clicked on it I got a message saying there was an error while trying to open the program. I went to the Spin Tools folder and was able to click on spinide and tell it to run in terminal and the program came up and let me upload a program to the Propeller board.

    I see now you have unpacked the program in a folder with spaces in the name "Spin Tools/spin-tools" I think the install script doesn't handle that well. Try to run uninstall.sh, move the program to a folder without spaces (just move spin-tools to $HOME), run install.sh again.

    What is interesting is that I can use Flexprop and upload programs from the Spin Tools examples but if I try to use Spin Tools to upload a Flexprop example program I get a message saying there are errors in the program. I don't know enough yet about Parallax programming to understand what is going on but I thought you might want to know about that.

    Need to see the source and the error to give an answer, however, if you have read the thread, there are a number of statements that are not well handled yet, I have fixed most of them and I'm going to do a release today, so maybe it is already fixed. Of course Spin Tools can't handle the other launguages supported by flexprop, only Spin is supported.

  • Released version 0.23.0.

    This release includes a number of fixes for the latest statement issues (pointers, bitfields, REG[], etc.).

    Added an object tree view, above the file browser:

    It shows the tree for the active editor tab (no "top object" support yet).

    Added tab stops and background colors toggle preferences:

    The source formatter now uses the defined tabstops. The only "problematic" thing is the DAT section (means I haven't found a better way to handle that): it uses the defined tabstops, however it needs at least 4 tab stops assigned to condition, instruction, arguments and modifiers.

    Also changed how the terminal preferences are stored, so at startup it will revert to the defaults.

  • CarrollCarroll Posts: 9
    edited 2023-02-27 15:30

    Thanks for your help. I did remove the earlier version of Spin Tools and downloaded the latest version. I extracted it into a folder named "SpinTools" with no spaces. i ran the install.sh file and it did install a desktop icon in the .local/share/applications folder. i moved that to the desktop and marked it as trusted and it correctly launched the program. I also found that I now have a menu item marked Spin Tools IDE. So it appears everything is working correctly. Now I just need to learn how to program with Spin.

    Thanks again for your help and your program looks great!
    Carroll

  • Update on mac works !
    My compile errors are gone !
    But preferences widows do not show
    object tree works.

    Thank-you macca

  • @Ltech said:
    Update on mac works !
    My compile errors are gone !
    object tree works.

    Good!

    But preferences widows do not show

    Doesn't show ? Any error window that pops up ?
    Was it working with previous versions ?

  • Wow. Really nice. 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. Thanks for adding smart tabs.

  • dgatelydgately Posts: 1,619
    edited 2023-02-27 19:57

    @macca said:

    @Ltech said:
    But preferences widows do not show

    Doesn't show ? Any error window that pops up ?
    Was it working with previous versions ?

    On macOS, apps generally have a "Settings..." menu item under the App's menu... Selecting that option in Spin Tools IDE does nothing. You have to look in the Files menu to see and select "Preferences". The same is true for the "About Spin Tools IDE" menu within the App's menu (see below)... If you think about it, Settings/Preferences really don't belong in the File menu (at least that's what Apple's User guidelines would say :D ).


    There should be a provided way to make this work cross-platform., right?

    dgately

  • @dgately this is my issue.
    So Yes I have preference, but not where expected on osx

  • @dgately said:
    On macOS, apps generally have a "Settings..." menu item under the App's menu... Selecting that option in Spin Tools IDE does nothing. You have to look in the Files menu to see and select "Preferences". The same is true for the "About Spin Tools IDE" menu within the App's menu (see below)... If you think about it, Settings/Preferences really don't belong in the File menu (at least that's what Apple's User guidelines would say :D ).

    Ah that menu, yes, I think there is a way to hook to it.

    About the preferences item, I don't think there is a suggested placement on other platforms, some programs put it under File, others under Edit, Eclipse has the preferences under the Window menu. Maybe Edit is the more correct place since it actually edits the preferences.

  • @macca

    Really liking the latest update. It basically took out two of my top needs. Ran into two issues yesterday though.

    1) Working on a project with weird behavior, turns out this is easy to reproduce, see snippet below. With the Toggle method commented, the code behaves as expected and prints a sequence of numbers periodically (2 loops a second). If I uncomment Toggle, it spams the loop test but only counts to value 0, and the delay doesn't seem be invoked. It counts up to 3493 then stops running. Also, moving method Toggle below LoopTest it'll work fine. My guess is an address calculation error when you have a block of inline assembly in the bytecode (?).

    CON
        _xtlfreq                      = 20_000_000
        _clkfreq                      = 40_000_000
    
    OBJ
        piBoard:                    "piBspP2Eval"
    
    VAR
        LONG iter
    
    PUB Main()
        repeat
            LoopTest()
            WAITMS(500)
    
        'Toggle()       ' unreachable but if uncomment the program goes unstable
    
    PRI Toggle() ' move me below LoopTest and the demo will always work
        org
            drvnot #8
        end
    
    PRI LoopTest() | n
        debug("Loop Test (Iter ", udec_(++iter), ")")
        repeat n from 0 to 7
            debug(udec(n))
    

    2) If you make a change and try to upload too fast. E.g., type then F10, there appears to be a race condition where either A: the compiler is still busy, so the UI just reports "The program has errors" or B: Uploads the old binary (then press F10 again and the new one gets uploaded assuming since the compiler finished at that point).

  • @DarkInsanePyro said:
    1) Working on a project with weird behavior, turns out this is easy to reproduce, see snippet below. With the Toggle method commented, the code behaves as expected and prints a sequence of numbers periodically (2 loops a second). If I uncomment Toggle, it spams the loop test but only counts to value 0, and the delay doesn't seem be invoked. It counts up to 3493 then stops running. Also, moving method Toggle below LoopTest it'll work fine. My guess is an address calculation error when you have a block of inline assembly in the bytecode (?).

    Yes, you are right, the inline pasm messes with the address calculation of the repeat loop in LoopTest (which I think is the only statement that uses absolute addresses instead of relative), after the first loop it jumps in the middle of the object header...
    Strangely the method address reference in the header seems correct. A really nice bug!

    2) If you make a change and try to upload too fast. E.g., type then F10, there appears to be a race condition where either A: the compiler is still busy, so the UI just reports "The program has errors" or B: Uploads the old binary (then press F10 again and the new one gets uploaded assuming since the compiler finished at that point).

    Yes, the locks are not yet in place, mainly because I didn't want to lock the program waiting for the compiler in case of unexpected errors. I'll try to add some checks, but for now it is better to wait a bit.

  • Update function worked as well on my Mac.

    And the compile issue I stated above also seems fixed. I still have some code that compiles with propeller tool but fails with spin tools ide. I am tinkering with the P2GUI and it will compile under propeller tools and it compiles with flexprop but the certain things don't work as expected when using flexprop.

    P2GUI will not compile under spin tools ide. However this latest release (.23) P2GUI went from hundreds of errors to less than 30.

    It might be having similar issues as flexprop has, and it seems to be with the trend_control functions.

  • @"Greg LaPolla" said:
    P2GUI will not compile under spin tools ide. However this latest release (.23) P2GUI went from hundreds of errors to less than 30.

    It might be having similar issues as flexprop has, and it seems to be with the trend_control functions.

    A link to the source ?

Sign In or Register to comment.