Shop OBEX P1 Docs P2 Docs Learn Events
PNut command line examples and downloads — Parallax Forums

PNut command line examples and downloads

Probably question for @cgracey,
Trying and failing to figure out how to set the com port to download from when using PNut from a command line; either standalone or from a script/batch file. Whether in VSC or using PNut itself, the com port allways seems to end up on com11 rather than 6. Proptool finds the P2 no problem, but PNut locks every time. Can selecting the port even be done from the command line? If so, how would I do it?
Thanks,

Comments

  • evanhevanh Posts: 15,693
    edited 2024-02-11 09:37

    It's in the last section of the Spin 2 Language Documentation (Google Doc), just before the list of Clock/PLL symbols - https://www.parallax.com/propeller-2/documentation/

    EDIT: Oh, I see. That only seems to apply to debugging port number ... Yeah, comport can't be specified for download. Autodetect is only way. :(

    EDIT2: It should be possible to automate a compile with Pnut then download the compiled binary using Loadp2.

  • Thankyou @evanh ,

    Thought I was completely missing something. My grey cells are still all (biased observation to be sure) there. Read and re-read that section and looked like the manual setting for comport to download was not documented/existing. So it seems that my best option at this point may be to alter the tasks.json for VSC and / or write batch files for otherwise automating the process. Or edit with VSC or other editor, run Pnut to compile and run LaodP2.

    Thx.

    Feature request for PNut: Add ability to pass download port from command line with say a port number and an A or some char for autodetect.

  • evanhevanh Posts: 15,693

    On Linux and MacOS I know there is the ability to specify by unique port name string. Which is handy when the port number assignment is not static, like via hotplugged USB expansions. Loadp2 supports it, eg: loadp2 -p /dev/serial/by-id/usb-Parallax_Inc_Propeller_P2-ES_EVAL_P23YOO42-if00-port0

  • cgraceycgracey Posts: 14,134

    I will look into adding this.

  • frank freedmanfrank freedman Posts: 1,982
    edited 2024-02-17 20:25

    Thank you Chip!

Sign In or Register to comment.