Shop Learn P1 Docs P2 Docs
Help with Propeller Tool and Serial terminal - Page 2 — Parallax Forums

Help with Propeller Tool and Serial terminal

2»

Comments

  • JonnyMacJonnyMac Posts: 8,238
    edited 2021-12-20 07:33

    Attached is the Spin2 code I am trying to get working in PropIDE.

    It works fine in Propeller Tool if you change the terminal mode to T_PST and change the \n in the output to \r.

    Attached also is a Spin2 code to start a second cog. It starts but then the primary hangs forever.

    Yes, it does, and it's your fault. Here's the offending code.

    The first parameter of cogspin is the cog to use and you've got MathCog there. MathCog is a variable that is initialized to 0, so your cogspin call is clobbering your main interpreter cog. If you replace MathCog with newcog then the program will run (I tested; it does [note other changes for Propeller Tool]).

    I've attached demo with a working background code (timer and RTC) with methods for starting and stopping the background cog cleanly.

  • zlantzzlantz Posts: 136
    edited 2021-12-20 18:29

    @JonnyMac said:
    Yes, it does, and it's your fault. Here's the offending code.

    Awesome, I felt there was something I didn't read right in the spin2 documentation.

    I have made a little more headway on the Propeller Tool serial terminal issue (sorry for earlier name mix up). When I only load the code to RAM (F10) the serial terminal seems to work but if I load to Flash (F11) then it stays blank forever even if I hit enter or other keys in the terminal, but if I program with FlexProp then it works just fine with the flash using the same code. So its narrowed down to the "Load Flash" function in the Propeller Tool v2.6.0 (and previous) on my end.

    This is starting to get exciting now that the functions are coming to life!

    Many thanks for all the help getting everything worked out... Have wanted to upgrade since the P2 was first posted about.

  • JonnyMacJonnyMac Posts: 8,238
    edited 2021-12-20 19:29

    So its narrowed down to the "Load Flash" function in the Propeller Tool v2.6.0 (and previous) on my end.

    Another swing, another miss. I tested with F11 and everything works as advertized.

    Sorry to seem like a grouch, but this is more operator error on your part. I use F10 and F11 all the time. I created wait_for_terminal() so that I could use F10 for program development (especailly in the P1 which takes a bit of time to program the EEPROM). If you're using F11 you can comment that line out and simply reset the board.

    I think your confusion is that you think Propeller Tool is controlling PST. Other than opening PST, it's not. In FlexProp the command line has more control over the terminal which makes things kind of automatic. That said, as far as I know you can't use the FlexProp terminal on its own (if I'm wrong, please tell me how). I have occasional projects that talk to each other and I can open two copies of PST (one for each board) to see the transactions.

    Please, stop with the unfounded declarations/suggestions that there are problems with the P2. I write Propeller code in the course of my job every single day. I only use Propeller Tool and PST. I do not have problems -- if I did, I would have raised them with my friends at Parallax. Yes, there is room for improvement in the tools, but they are not broken.

  • JonnyMacJonnyMac Posts: 8,238
    edited 2021-12-20 19:28

    Just a follow-up. Make sure you have the internal DEBUG system disabled (deselected) when wanting to use PST or any other terminal for output.

  • @JonnyMac said:

    So its narrowed down to the "Load Flash" function in the Propeller Tool v2.6.0 (and previous) on my end.

    Another swing, another miss. I tested with F11 and everything works as advertized.

    Sorry to seem like a grouch, but this is more operator error on your part.

    I know this problem might seem like operator error but I am having a hard time seeing how... Not trying to be the problematic customer here either.

    To make it easier, I made a video to show my process comparing (F10) with (F11) and the results I get. Each time enabling the serial terminal and hitting enter in the box to enable the "wait for terminal" command. You can see that it works fine if I use F10 but F11 does not function on my computer and hangs instead but works with FlexProp. That is why I was thinking maybe there is a driver or something you have installed that is not installed on my computer. Its the only thing that would make sense possibly other than a software bug/glitch.

    Just trying to get to the bottom of this as it is an issue that I am experiencing that shouldn't be there. I would think this would be of interest to you.

  • If you don't have the DIP switches on the board set for flash boot, it won't boot from flash.

  • The only thing you're doing differently from me is using the menus versus the function keys on the keyboard. I tried it your way and after F11, things hung. But then I noticed that I had accidentally selected the tab next to my program which was an object and doesn't do anything. Once I selected the correct tab, everything was fine again, with F10 and with F11, on the keyboard and through the menus. I am not able to duplicate what you're seeing.

    That is why I was thinking maybe there is a driver or something you have installed that is not installed on my computer.

    No. Just the standard FTDI driver for the Propeller Plug.

    The video compression makes the text nearly unreadable on my screen (laptop, standard HD) -- just make sure you're not using Compile Top. And if you have function keys on your keyboard, please try using them. Personally, I find it faster to press F10 and then F12 to pull up PST. This shouldn't make a difference on your system, but it's worth a try.

    I would think this would be of interest to you.

    Propeller Tool works for me. I'm simply trying to get you to stop making unfair statements about Parallax products, and get you going to you can have as much fun with the P2 as the rest of us are having. I really like the P2.

    @"Jeff Martin" is the programmer behind Propeller Tool and PST. He's a busy guy, but does take input through:
    -- https://github.com/parallaxinc/Propeller-Tool/issues

  • @Wuerfel_21 said:
    If you don't have the DIP switches on the board set for flash boot, it won't boot from flash.

    Thank you for pointing that out, Ada. I have never moved my my DIP switches and didn't even think about that.

  • AribaAriba Posts: 2,591

    @JonnyMac said:
    ... That said, as far as I know you can't use the FlexProp terminal on its own (if I'm wrong, please tell me how).

    In FlexProp you choose Terminal only in the Special menu.
    Or you start it from command line with: pload2 -t or pload2 -T (the latter is a PST compatible Terminal).
    Instead of using a cmd window, you can also make a batch file for starting it from the Windows-GUI.

    Andy

  • Thanks, Andy.

  • Issues with propeller tool.

    Cannot find the path.

  • ersmithersmith Posts: 5,442

    @pilot0315 : Read the error message carefully. It says "Possible cause: Top object file not saved to any folder". So the first thing to try is to save your file, making sure to give it the appropriate suffix (.spin for a Spin1 program, .spin2 for a Spin2 program). Then at least the Propeller Tool will have some idea of whether you're programming for P1 or P2.

  • JonnyMacJonnyMac Posts: 8,238

    Eric is correct: you must save the file as a .Spin or Spin2 file so that Propeller Tool knows which version of the compiler to use. Long term, a special comment may allow the compiler to identify the source type so that it can be compiled before saving. I always add {$P1} and {$P2} to my propeller programs hoping that Jeff Martin sticks with the convention he used in the BASIC Stamp editor.

  • Thank you both. First time using the 2.6.2 version. Getting used to the differences in spin and spin2.

  • @JonnyMac @ersmith
    I am having PST issues with the 2.6.2.
    Baud rates are correct but I get gibberish. Started to deconstruct File....... jm_formatted_strings_test.spin2
    because I have seen some changes as I have not touched the P2 in a little over a year. Noticed that the changes affected all of
    my working code. Did something simple just to print "test" worked then when adding the next item to print got gibberish. Used the JM code as the template. Any Issues with the PST?

  • JonnyMacJonnyMac Posts: 8,238
    edited 2022-01-24 21:48

    No issues with PST here. Make sure the terminal type is set to PST.

    I've attached an updated format demo program. The output will look like this:

    You may have a crystal problem on your board. The P2 uses an RC oscillator to download, but anything timing sensitive after that would need the crystal working for correct timing. I saw this a few times in P1 projects when water got under the crystal (from production washing) and caused it to misbehave.

  • It was a copy and paste. I will look at what you send.
    Thanks

Sign In or Register to comment.