-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
--upload-port flag has no effect #44
Comments
Also fwiw, the
|
This sounds like the multi-board issue that was raised on the forum, which stems from the Teensy Loader not allowing a port to be specified, hence any port you specify via platformIO upload_port won't take. The OP for that thread was on linux, so instead turned the ports on and off programatically to get around the issue. An alternative might be to use tycmd via an extra_script to do the upload, as it seems it can be given specific port references or hardware IDs. https://community.platformio.org/t/multiple-boards-upload-port-works-but-crashes-2nd-board/9029 |
Is there any solution to this issue for Windows? I almost bricked my Teensy 2.0 by flashing it with Teensy 3.2 program. It's very annoying to be forced to constantly replugging cables when I'm working on 2 different boards simultaneously and it's very easy to make a mistake. |
@oomek our team now uses PIO for builds and tycmd for uploads. |
Right, completely forgot about it. I used to use it as an easy consumer side updater. Is there any guide of how to integrate it with PIO? |
Did you just do an extra_script that overrides the i.e. I'm thinking something like the following would do the trick... although the best option would really be to add platformio.ini
upload_with_tycmd.py
|
I did not change anything. I used tycmd before as a stadalone with a batch file. In PIO I have just standard |
Sorry, was editing my prior comment, and didn't realise it was tagging you instead of yosemitebandit. Anyway, see above for one possible way to 'integrate' tycmd ... |
Thank you. I'm gonna try it out tomorrow |
@oomek I work with @yosemitebandit , here's the way we use tycmd: We keep our boards in a fixed location on the linux machine (for us a raspberry pi). This means the same board is always in the bottom right position, or the top left, etc. First build tycmd following the instructions in the github readme. I had trouble getting this to work on a mac but it was a breeze on Raspbian. Then you can list your boards (using verbose flag) with add 5530090-Teensy Teensy 3.6 (USB Serial) interfaces: That location information tells you where in the USB tree the board is. I suspect this will work even through USB hubs but I haven't tried it yet. There are instructions on the tytools github about how to use the various location tags as well, in this case we need
We still use platformio to compile the project, and you can locate the hex build in: tycmd is also nice in that it will check the teensy board version you're trying to upload to, and refuse to upload incompatible code, like something compiled for a 3.2 onto a 3.6 (PIO still doesn't do this and will happily KO a teensy if you send it the wrong code). We haven't tried integrating like @pfeerick suggested above, but we'll give it a try! |
For some reason |
Yeah, finally got around to trying it myself...
If you add a space before the This is with the extrascript mentioned above with the path to my executable... (on Windows atm, so have to escape the paths)... upload_with_tycmd.py
platformio.ini
|
I don't really suggest using the "port" since it tends to change. Instead I use the serial number as reported by the USB port. I've made a PR to PaulStoffregen/teensy_loader_cli#57 If you use conda, and conda-forge, I've release it https://github.com/conda-forge/teensy_loader_cli-feedstock But it seems like tycmd is more powerful. Maybe I'll try to build that for the conda ecosystem. Unfortunately, I don't have a development machine for windows easily accessible, so I likely won't be making the necessary changes there. |
Just got bitten by this and the clear answer on https://askubuntu.com/questions/1374435/how-to-program-multiple-teensys-in-platformio-simultaneously-on-ubuntu worked for me, without the need for a python script |
I have a machine connected to both a teensy 3.6 and a teensy 3.2 (both over USB):
Initially I can also see both ttys:
When I try to upload to the 3.6, it appears as though the 3.2 is flashed. (Prior to this, I was able to confirm that
ttyACM0
is the 3.6).This seems to brick the 3.2 (it has to be power-cycled and manually reflashed). The 3.2's tty is gone:
Running the same upload command again will successfully upload to the 3.6 (presumably because that is the only available tty at this point?).
I found this similar-sounding issue on the core repo, fwiw: platformio/platformio-core#1904
The text was updated successfully, but these errors were encountered: