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

Spin Tools IDE

11112131416

Comments

  • VonSzarvasVonSzarvas Posts: 3,328
    edited 2024-05-19 19:24

    @macca said:
    Need to check that, I tought the CTRL is enough to toggle the hand icon (and maybe I always move the mouse to properly position it, so I don't notice...), maybe some differences with Linux.

    Might not be an issue with variables, but certainly with functions, especially when a tooltip window comes up. (Could be the tooltip modal opening that gets things into a weird combination) .

    Edit: Yep- seems that's something.... The tooltip. If you hold CTRL (whilst cursor is over a blank area), and then move the mouse over the function name, it all seems fine. But if you move the mouse over the function name first, and then use CTRL, the behaviour is a bit random. That might well be an extra windows event to handle :)

  • DiverBobDiverBob Posts: 1,102

    Ran across an error I haven't seen before: 'address not set'. it occurs on the pub runTest1(n) line. Not sure what I did wrong but I can't get it to go away. I'm running version 0.30.3

  • JonnyMacJonnyMac Posts: 8,988
    edited 2024-05-26 21:09

    There have been updates since the version you're using, including the ability to use PNut as a compiler which enables the use of graphical debug screens if you're running Windows.

  • maccamacca Posts: 750

    @DiverBob said:
    Ran across an error I haven't seen before: 'address not set'. it occurs on the pub runTest1(n) line. Not sure what I did wrong but I can't get it to go away. I'm running version 0.30.3

    That is a sort of "internal error" that should never happen, in that case the root cause is the error on the repeat statement line (undefined temp variable ?). I'm not sure why it throws the address not set error, I think the error in the repeat statement leaves the compiler in a weird state. Anyway, fix the repeat line and it should work.

    Also, please, when reporting errors or possible bugs, always make sure to use the latest release (0.30.3 is a bit old).

  • JonnyMacJonnyMac Posts: 8,988
    edited 2024-05-26 18:46

    It looks like temp is not defined as a global (for loops that control variable ought to be a local). I was able to duplicate your condition and get the mystery hint "address not set" without temp being defined.

    When temp is defined (global or local), the errors go away.

  • DiverBobDiverBob Posts: 1,102

    Thanks for the suggestions, I’ll try them out. I was breaking a long pub into smaller sections and the temp variable didn’t get passed onto the new pub.

  • DiverBobDiverBob Posts: 1,102

    That fixed the error. I also updated the program, all up to date again…
    Thanks for the help

  • JonnyMacJonnyMac Posts: 8,988
    edited 2024-05-29 02:58

    @macca This bit of code works in PNut v44, but not in Spin Tools 0.36.1. Spin Tools doesn't allow one to define a local variable as a structure.

    Thankfully, though, I can still compile the code using PNut from within Spin Tools.

  • maccamacca Posts: 750

    @JonnyMac said:
    @macca This bit of code works in PNut v44, but not in Spin Tools 0.36.1. Spin Tools doesn't allow one to define a local variable as a structure.

    The source of the latest PNut is not published so my structure implementation is still incomplete, and I am a bit reluctant to complete with what I (don't) have since I guess I need to redo most of it...
    I think I can add the local variable to the parser, but make it work is another story...

  • JonnyMacJonnyMac Posts: 8,988

    Understand. I did ask Chip to consider allowing structures to be defined like this so they're easier to read and we don't have to deal with the elipses.

    con
    
      struct sWavHeader(  
        long chunkId,
        long chunkSize,
        long format,
        long subChunk1Id,
        long subChunk1Size,
        word audioFormat,
        word numChannels,
        long sampleRate,
        long byteRate,
        word blockAlign,
        word bitsPerSample,
        long subChunk2Id,
        long subChunk2Size
      )
    
  • JonnyMacJonnyMac Posts: 8,988
    edited 2024-05-30 04:26

    Possible bug. While doing some work tonight I find that when I press Enter the contents of the copy buffer are pasted into the line.

    It only happens there is something on the line -- it doesn't happen when the line is blank.

  • Jon, that might be related to the issue reported in post #446.

    Marco thought it was the code suggestion feature. I believe he is thinking about how to improve.

    Maybe ignoring suggestions after a closing bracket , or any other closing statement construct?

  • JonnyMacJonnyMac Posts: 8,988

    It's not suggested text -- it just shows up when I press enter. Now... this could be due to Spin Tools not allowing structures as a local which is what that definition is. I have decided to abandon structures for the the project until they've matured and all the compilers are on the same page.

  • Curious- the behavior seems very similar- when hitting enter on a line that has an obj function call (like your example of term.tx), then one of the local parameters will get appended to the end of the line (as you are showing).
    Pressing ESC before Enter seems to prevent it happening. I thought Marco mentioned it was related to the code-completion feature, but I might have mis-read that.

    Anyway- it's all in the melting pot now- that's all that counts :) Nothing else to see here :)

    +>

    I'm really enjoying coding in SPIN again using spin-tools IDE. Can't stop thinking that every time I open a project!!

  • JonnyMacJonnyMac Posts: 8,988
    edited 2024-05-30 18:02

    Marco has done a fantastic job, and as more people discover it and make suggestions, it will get even better.

    @macca: A couple small requests now that I'm using Spin Tools more frequently so I can use the latest features in PNut.

    1) If I make a selection and press space, the selection will be replaced with a space. If I make a selection and press Tab, the selection gets extended. I'd rather replace the selection with spaces up to the next tab stop. Where this is really helpful is re-aligning end-of-line comments.

    2) I habitually make a selection and right-click, expecting a context menu from which I can copy, paste, etc. Can we have this in Spin Tools?

  • maccamacca Posts: 750

    @JonnyMac said:
    Possible bug. While doing some work tonight I find that when I press Enter the contents of the copy buffer are pasted into the line.

    It only happens there is something on the line -- it doesn't happen when the line is blank.

    That's weird, AFAIK, there is no way to paste the copy buffer with the Enter key.
    Can you reproduce consistently ? If so, I need the exact steps, with a small text example.

    1) If I make a selection and press space, the selection will be replaced with a space. If I make a selection and press Tab, the selection gets extended. I'd rather replace the selection with spaces up to the next tab stop. Where this is really helpful is re-aligning end-of-line comments.

    I don't think to understand the use case (extending the selection may not be correct, need to check).
    When I need to realign the end-of-line comments, I just move the cursor to the beginning of the comment and press TAB until it is aligned. There is no need to select the spaces (or anything else) before.

    2) I habitually make a selection and right-click, expecting a context menu from which I can copy, paste, etc. Can we have this in Spin Tools?

    Yes, I was thinking of adding it.

  • JonnyMacJonnyMac Posts: 8,988

    Can you reproduce consistently?

    Well, the other day it went from a minor annoyance to a PITA -- but I cannot reproduce today.

    ...I just move the cursor to the beginning of the comment and press TAB until it is aligned.

    I developed that habit because of how Propeller Tool works: pressing Shift-Tab does not move the text at the end of the line. Using Shift-Tab in Spin Tools does work the way I want so I'll have to remember that.

    Yes, I was thinking of adding it.

    Thank you.

  • Hi all, I am sure I am missing something here but I have had this problem several times and am not sure what I should be doing to solve it.
    In a nut shell "How do we stop a program from running / close DEBUG console when SPINTools IDE is running in DEBUG mode?"
    Once running DEBUG seems to take all of Spin Tools resources and makes any editing difficult so I think I need to terminate that test before we can get back to editing the code?
    If using the serial terminal, we could just reset the processor by toggling the [DTR] box but I have no idea how to stop the debugging or reset the program when using the debug console!
    Any thoughts? Perhaps I am just using it wrong as I have never seen anyone else using this.

    Closing Spin Tools in this mode seems to be a bad idea as then we get something like this:-

    which I can only close by killing < Java(TM) Platform SE Binary >

    Testing for this, shows up another possible problem with Spintools IDE in DEBUG mode.
    The code I am currently running is <test_octoExercise_recv.spin2> by Stephen M Moraco .
    I am just trying to test / understand how to use his Octoport driver, Rx only in this case, I know I am not really running it correctly as the Tx isn't actually being used as intended here, but in Spintools IDE <0.36.0> I see this:-

    Lots of garbage mostly with some real stuff, and this effectively locks up Spintools IDE, thus the need to disable the debug console.

    The Same code running on Propeller Tool <2.9.3> in debug mode gives this:-

    and I can terminate it by closing the Debug window.
    The RX #1 msg=[45.000] (on all 8 ports is the correct data I am looking for, the rest is because I am not using the program as intended by the writer.

    Test Program details:- OBEX4257 ISP high-speed 8-port serial subsystem. P2 Object for maintaining a single or 2-8 simultaneous serial ports using a single COG - 2.9Mbit/sec
    the <test_octoExercise_recv.spin2> is from his linked Github site GitHub Repository: P2 OctoSerial Subsystemfrom < https://github.com/ironsheep/P2-OctoSerial-subsystem >

  • maccamacca Posts: 750

    @lab_ges said:
    Hi all, I am sure I am missing something here but I have had this problem several times and am not sure what I should be doing to solve it.
    In a nut shell "How do we stop a program from running / close DEBUG console when SPINTools IDE is running in DEBUG mode?"
    Once running DEBUG seems to take all of Spin Tools resources and makes any editing difficult so I think I need to terminate that test before we can get back to editing the code?
    If using the serial terminal, we could just reset the processor by toggling the [DTR] box but I have no idea how to stop the debugging or reset the program when using the debug console!
    Any thoughts? Perhaps I am just using it wrong as I have never seen anyone else using this.

    I'm using the reset button on the P2 Edge breadboard... :)

    Closing Spin Tools in this mode seems to be a bad idea as then we get something like this:-
    which I can only close by killing < Java(TM) Platform SE Binary >

    This needs some improvements...

    Testing for this, shows up another possible problem with Spintools IDE in DEBUG mode.
    The code I am currently running is <test_octoExercise_recv.spin2> by Stephen M Moraco .
    I am just trying to test / understand how to use his Octoport driver, Rx only in this case, I know I am not really running it correctly as the Tx isn't actually being used as intended here, but in Spintools IDE <0.36.0> I see this:-
    Lots of garbage mostly with some real stuff, and this effectively locks up Spintools IDE, thus the need to disable the debug console.

    I did a quick test of just launching the program, without the RPI stuff, and looks good to me.

    Cog0  INIT $0000_0000 $0000_0000 load
    Cog0  INIT $0000_0EC0 $0000_2E6C jump
    Cog0  * -----  RECEIVE end STARTED  ----- *
    Cog0  SP8: rxp = 30, txp = 31, baudrate = 2_995_200, portHandle = 0
    Cog0  SP8: rxp = 28, txp = 29, baudrate = 2_995_200, portHandle = 1
    Cog0  SP8: rxp = 26, txp = 27, baudrate = 2_995_200, portHandle = 2
    Cog0  SP8: rxp = 24, txp = 25, baudrate = 2_995_200, portHandle = 3
    Cog0  SP8: rxp = 22, txp = 23, baudrate = 2_995_200, portHandle = 4
    Cog0  SP8: rxp = 20, txp = 21, baudrate = 2_995_200, portHandle = 5
    Cog0  SP8: rxp = 18, txp = 19, baudrate = 2_995_200, portHandle = 6
    Cog0  SP8: rxp = 16, txp = 17, baudrate = 2_995_200, portHandle = 7
    Cog0  * Handles: 0 1 2 3 4 5 6 7
    Cog0  ---------------
    Cog0  SP8: start serial tranceiver Cog
    Cog1  INIT $0000_165C $0000_272C load
    

    One issue I see is if you have set the case sensitive symbols option, then the _clkfreq constant needs to be uppercase or it is not used causing the garbage similar to what you see (probably because the clock is not set correctly). Seems working good with case insensitive symbols. Need to look at this.

  • @macca said:
    I'm using the reset button on the P2 Edge breadboard.

    OK, I don't have one of those, this is on my own board and have always used the Proptool to reset it if needed.

    One issue I see is if you have set the case sensitive symbols option, then the _clkfreq constant needs to be uppercase or it is not used causing the garbage similar to what you see (probably because the clock is not set correctly). Seems working good with case insensitive symbols. Need to look at this.

    I didn't set the case sensitive option, I didn't realize it was there till now.

    I noticed there was a later version of Spin Tools IDE and have now installed that, so I am now running Spin Tools IDE 0.36.1.
    I am now seeing more correct characters but I always seem to get some weard characters if I use SpinTools IDE in DEBUG mode, though not to this extent.
    Propeller tool always seems to be clean.
    Using Spin Tools IDE 0.36.1 the debug is much better, though those [NULL] codes seem to increment by one each scan of the 7 ports

    It looks like an unterminated input line or something, but that is probably something I am doing wrong, Spin Tools IDE 0.36.1 seems to have mostly fixed the garbage in debug, the rest I need to search for.

  • JonnyMacJonnyMac Posts: 8,988
    edited 2024-06-05 18:05

    When you're working on "niceties" Marco, I hope you consider....

    1) Save To... option from the File menu so that I can save to my favorite folders
    -- taken from Preferences/General/File browser visible paths
    -- could add library folders and recently used folder as well
    2) Context menu on right-click in editor area

    These may be repeat requests -- doing a lot of coding today and these things stick out. As ever, thanks for Spin Tools IDE and all its great features.

  • LtechLtech Posts: 370
    edited 2024-06-08 08:25

    Hello everybody,
    I just upgrade to a mac on M3 chip.
    I can't get java runtime running for spin tools.
    Is there somebody running it on an M3 ?

    % java -version
    java version "22.0.1" 2024-04-16
    Java(TM) SE Runtime Environment (build 22.0.1+8-16)
    Java HotSpot(TM) 64-Bit Server VM (build 22.0.1+8-16, mixed mode, sharing)

    Thank-you

  • @Ltech said:
    Hello everybody,
    I just upgrade to a mac on M3 chip.
    I can't get java runtime running for spin tools.
    Is there somebody running it on an M3 ?

    % java -version
    java version "22.0.1" 2024-04-16
    Java(TM) SE Runtime Environment (build 22.0.1+8-16)
    Java HotSpot(TM) 64-Bit Server VM (build 22.0.1+8-16, mixed mode, sharing)

    Thank-you

    Try using homebrew to install openjdk

  • LtechLtech Posts: 370

    I try openjdk , it fails.

    I find on oracle: "Oracle warned Apple customers to delay installing the latest macOS 14.4 Sonoma update because it will break Java on Apple silicon CPUs."
    I am on Sonoma 14.4

  • dgatelydgately Posts: 1,628
    edited 2024-06-09 23:26

    @Ltech said:
    I find on oracle: "Oracle warned Apple customers to delay installing the latest macOS 14.4 Sonoma update because it will break Java on Apple silicon CPUs."
    I am on Sonoma 14.4

    On a MacBook Pro 16" Apple Silicon M2 (SpinTools IDE runs on this):

    me ~ % sw_vers      
    ProductName:        macOS
    ProductVersion:     14.5
    BuildVersion:       23F79
    
    me ~ % java -version
    java version "19.0.2" 2023-01-17
    Java(TM) SE Runtime Environment (build 19.0.2+7-44)
    Java HotSpot(TM) 64-Bit Server VM (build 19.0.2+7-44, mixed mode, sharing)
    
    me bin % file java
    java: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64e:Mach-O 64-bit executable arm64e]
    java (for architecture x86_64): Mach-O 64-bit executable x86_64
    java (for architecture arm64e): Mach-O 64-bit executable arm64e
    

    M3 (does not seem a likely problem point, but who knows?)
    java version 22.0.1 ? (what java version was default on the M3 Mac?)

    Note: openjdk has not been installed via homebrew on this M2 system...

    dgately

  • Hi All,
    Can anyone tell me if "SPIN Tools IDE" supports the [debug_baud] command.

    I was getting errors in DEBUG at the default speed <2_000_000> and wanted to prove my board didn't have a hardware problems causing these, so I tried to dial the speed down to 115_200 but I just got nothing on the DEBUG console in "SPIN Tools IDE". The same code worked OK with or without the line < DEBUG_BAUD = 115_200 > under Propeller tools, but Spin Tools IDE (0.36.1) doesn't.

    Turned out DEBUG seems to work ok on my board as long as I am not trying to send information at the same time to TERM and that is where I was going wrong.

    This is a part of my efforts to use a P2 board in a project and I have been trying to work out how to use the "P2 debug commands" (rather than just a terminal) but I haven't seen many good practical examples anywhere.
    The documentation in "Parallax Spin2 Documentation v43" looks ok but seems a bit advanced without describing how the code works in places.
    I am pretty sure "SPIN Tools IDE" only supports Text mode but that is OK for new.

  • maccamacca Posts: 750

    @lab_ges said:
    Can anyone tell me if "SPIN Tools IDE" supports the [debug_baud] command.

    I was getting errors in DEBUG at the default speed <2_000_000> and wanted to prove my board didn't have a hardware problems causing these, so I tried to dial the speed down to 115_200 but I just got nothing on the DEBUG console in "SPIN Tools IDE". The same code worked OK with or without the line < DEBUG_BAUD = 115_200 > under Propeller tools, but Spin Tools IDE (0.36.1) doesn't.

    The DEBUG_BAUD constant is supported but I think the value is not propagated to the debug console so it keeps the default speed (that's why tou see nothing). Will fix this soon.

    Turned out DEBUG seems to work ok on my board as long as I am not trying to send information at the same time to TERM and that is where I was going wrong.

    This is a part of my efforts to use a P2 board in a project and I have been trying to work out how to use the "P2 debug commands" (rather than just a terminal) but I haven't seen many good practical examples anywhere.
    The documentation in "Parallax Spin2 Documentation v43" looks ok but seems a bit advanced without describing how the code works in places.
    I am pretty sure "SPIN Tools IDE" only supports Text mode but that is OK for new.

    Yes, Spin Tools supports only text mode (in the end all debug modes are actually text that gets intepreted by the receiver).

  • JonnyMacJonnyMac Posts: 8,988

    Can anyone tell me if "SPIN Tools IDE" supports the [debug_baud] command.

    If you use the external compiler feature (thank you, Marco!) and use PNut, yes.

    I am pretty sure "SPIN Tools IDE" only supports Text mode but that is OK for new.

    If you use PNut to compile your code from Spin Tools, you get access to all DEBUG features (Windows only).

    I setup two commands for PNut: one for RAM, the other RAM+DEBUG.

    Since PNut doesn't support a library path, I put a copy of PNut into my Library folder and execute it from there.

    I spoke a bit about this on the Propeller Live Forum meeting yesterday. Spin Tools IDE gives us a really nice, very comfortable tool for code editing, and now we can use external compilers if we like. This is nice because Chip doesn't always provide Marco (Spin Tools IDE) or Eric (FlexSpin compiler) what they need in real time so that their compilers can make PNut.

  • LtechLtech Posts: 370

    I get it work on my mac M3 silicon.
    I use the MacOS (x86_64) in stead of the MacOS (aarch64)
    So it is on the emulation, but it runs fine

  • maccamacca Posts: 750

    Released version 0.37.0

    This release updates the Eclipse SWT version to the lasted 2024-06 release, and adds a number of fixes.

    The structure handling was refactored with some optimizations, still not the "official" support since the source was not published, but should work. Local structure variables should also work.

    About the Mac versions. After the posts here I realized that the aarch64 (Mx) version was not built correctly, I tought I had updated the underlying appbundler plugin but was still the old version that included only the x86_64 executable and not the aarch64 executable. Sorry for that.

    To recap (for what I know about the Mac): there are 4 Mac packages: x86_64 with and without jre, aarch64 with and without jre.
    The x86_64 package with jre included should work on both x86_64 and Mx processors, the latter due to the compatibility/translation/emulation feature.
    The aarch64 package with jre included should work only on Mx processors.
    The packages without jre included requires the appropriate jre already installed and should follow the same requirements, meaning that the x86_64 package with an x86_64 jre should work on both x86_64 and Mx processors. On a Mx processor only the Mx jre and aarch64 package should work. Packages and processors can't be mixed, AFAIK, an aarch64 jre can't run the x86_64 package and vice versa.

    Other things:

    • Added the editor context menu
    • Hover popup and content proposal activation fixes
    • Fixed widget disposed errors with unstoppable serial receive
    • Handle system symbols as case insensitive (fixed _clkfreq issue)
    • Added reset device on console close preference (this should mitigate the unstoppable debug output issue)
    • Fixed the console DEBUG_BAUD setting

    About the content proposal popup issue, I have examined the thing and I don't think it is a bug, as long as the popup is open, hitting enter will insert the suggested content, the problem, I think, is that the popup is opened too early and is not clear how to close. I have added a small delay to the trigger characters so it is possible to type an object.method call without opening the popup (can still be opened with Ctrl+SPACE). The popup can then be closed without inserting the suggested content by pressing ESC. Hope this helps to mitigate the issue.

Sign In or Register to comment.