Welcome! Log In Create A New Profile

Advanced

Where/how to specify the Serial Port in platformio.ini

Posted by PickyBiker 
Where/how to specify the Serial Port in platformio.ini
April 05, 2023 09:37PM
My auto build and upload fails to find the 3D Printer attached to COM8. Where and how do I tell the auto build/upload what port the printer is on?
Re: Where/how to specify the Serial Port in platformio.ini
April 05, 2023 11:46PM
I take it that your motherboard uploads via the USB port, not the SD card.

One reason for the com port search to fail is if the printer is already connected to another terminal program like Pronterface or Octoprint.

You can try adding upload_port = COM8 to the environment for your board. The upload script may over ride this setting.
Re: Where/how to specify the Serial Port in platformio.ini
April 06, 2023 03:26AM
Another common reason is you have another program running that is keeping the port to itself.

Cura does this the instant it is opened.
Re: Where/how to specify the Serial Port in platformio.ini
April 06, 2023 01:21PM
I added upload_port = COM8 to the env section of the platformio.ini file and it didn't help.
I changed it to upload_port = E which is the drive letter of the sd card in the printer, still no help.

It is not a really big deal to copy the bin file from .pio folder to the E drive, but it would be nice if I could get the upload to work.
Re: Where/how to specify the Serial Port in platformio.ini
April 06, 2023 11:02PM
If this is still the SKR 1.4 Turbo

The upload script locates the sdcard card drive by looking for one of these two conditions.

A volume name of REARM
A file in the root of the directory called FIRMWARE.CUR (the contents of this file is irreverent)


So update things so at least one of these tests returns true.

Edited 1 time(s). Last edit at 04/07/2023 12:47AM by Dust.
Re: Where/how to specify the Serial Port in platformio.ini
April 07, 2023 12:07AM
Agreed - all LPC176x boards only upload via the SD card. The UPLOAD option in Auto Build Marlin invokes a script that'll automatically copy the firmware.bin file to the target disc if it can find one that meets either condition @dust mentions.
Re: Where/how to specify the Serial Port in platformio.ini
April 07, 2023 12:31PM
Out of town until Monday. I'll check that then. THANKS!
Re: Where/how to specify the Serial Port in platformio.ini
April 10, 2023 02:00PM
I renamed the folder to REARM, made certain there was a firmware.cur in the root, and removed the previously added upload_port = entry from the platformio.ini fie.

Everything now uploads automatically as it should.

Thanks for the help!!!
Sorry, only registered users may post in this forum.

Click here to login