PlatformIO Community

How do I find my devices to upload to?

Let me start by stating I am not very computer literate. Not even sure what I’m asking or if I’m saying things right.

Working with Marlin 2 firmware in both Visual Studio and Atom through Platformio. Platformio automatically detected my sdcard on the F: drive to upload to when I compiled for a LPC1768 board and everything went without to much of a hiccup. I’ve been trying to do the same with a STM32F4 board and have run into issues to far above my head to comprehend. After months of frustration i finally decided to put an atmega2560 based board back into my printer that was working with Marlin 1.1.9 but figured i would go ahead and upgrade it to Marlin 2.

After compiling and building without any issues I can’t get it to upload. Platformio isn’t autodetecting the upload port anymore and when i try and set upload_port = F:\ in platformio.ini it tells me access is denied when it tries to upload. I have no other apps running and no other window open except Google. Could there be something in the background connecting to it that I don’t see?. It list my sd card under logical devices on the Platformio tab so it sees it right? I actually have two sd cards, one in the built in reader(H:) and one in a USB hub(F:) and neither one works but it lists them both. I’m copying the path in the device list and just pasting it but am I putting in the wrong path name?

I know the issue is due to my lack of knowledge but if someone could just guide me to something I don’t need an engineering degree to understand, I would be very appreciative.

Is this still for the atmega2560 based board? As I don’t think specifying an upload_port to be a SD card is correct… for atmelavr boards you program them via the serial / com port - i.e. COM4, COM7 … whatever serial port it comes up as on your system.

For your LPC1768, it’s possible you missed this right at the end of the guide on the marlin site where it tells you that you should be copying it manually… :slight_smile: (although that path is wrong now… it’s .pio/build/board_name/firmware.bin now…

For platforms that use a firmware.bin file such as the LPC1768 and LPC1769
Bin file location

  • Transfer the automatically generated firmware.bin over to the SD card to be used

Aloha and thank you for the response!

The LPC1768 Board (its a SKR V1.3) was actually the one that went off without a hitch. Built and uploaded to my sd card in the F: drive automatically. Printer currently printing right next to me working great.

It’s the STM32F4 (SKR Pro V1.1) that was giving me the headaches, kept seeing Google searches with ppl having the same issue with that particular board, I’m thinking bug issue and will wait until one of you smarter ppl figures out what to do about it.

Platformio is working correctly and doing what it is supposed to be doing because the atmega board problem is due to my inexperience…gotta plug the board directly into the computer, can’t flash the firmware with a sd card like the LPC1768 apparently - i.e.COM4, COM7…lol Nothing like a bunch of zeros and ones to make me feel dumb.

Thanks again for the help.

Hey, at least you’re not giving up 'cause it’s all greek to you! :slight_smile:

I’m not familiar with how they do things with the Marlin firmware, but the manual for your board suggests that you …

Customize the firmware and compile it. Check for errors. If there are no errors, find the
firmware.bin file. Copy it to the SD card and plug the SD card in the board. Reboot the
board, wait for about 10 seconds before doing anything else with the board.

… so it sounds like Bigtree Tech’s own advise is to compile it, look for the output .bin file and copy it to your SD card… i.e. compile the code, and then browse to the path shown at the end of the build …


… which is easiest done by right clicking on the .pio folder in the file explorer panel … but it’s basically in the project folder where you have the marlin firmware source.


Thanks again for your time, I really appreciate getting guidance on my issues.

I was really excited after reading your reply but, of course, life happens and I haven’t had time to try anything until I got home today. I got the board back out, hooked up a display and just connected it to the computer to power it up. After building Marlin successfully, I found the .bin file right where you said it would be and copied it to my sd card. When I restarted the board, the LEDs began to flash like the board was doing it’s thing and the computer chimed like a new device had connected to it but the display remained blank. I tried everything again in various orders but couldn’t get anything to work. I even wired in a touch display to the board to verify it wasn’t the display but it kept saying there was no device to

The weird thing, though, I had to run out and forgot to unplug the board. When I got back, the Marlin splash screen was on the display. It wouldn’t respond to anything and when i restarted the board the display remained blank like before and I can’t get it to do it again.

And this is being compiled for the correct board / processor type?

Is this the code you’re trying to compile? As it seems the ‘official’ Marlin 2 may not be working yet or support this board, but Bigtree Tech appear to be maintaining a port in their own repo. Also seems to be set to the correct build for the correct board/environment out of the box.

I was going to reply that I had tried the BIGTREETECH repo and had even tried a fresh download straight from Marlin, both without success but decided before that, what the hell, I’ve downloaded this thing so many times, I’ll start all over again for the 12th time. There was something different this time though. Someone updated the BIGTREETECH Marlin folder today. I’ve went through this configuration (so many times now that it didn’t take me long) making the basic changes and following the guidelines YOU pointed out and I now have a running printer. Thank you.

I don’t know if it was just missing the sd card copy thing or if something actually got updated today but either way, I’m a happy camper! Thanks for sticking through it and putting up with my stubborn old man rants. Sometimes it just takes another set of eyes because you’re right, most of it WAS Greek to me, lol.

1 Like

Could be absolutely anything… computers can be like that sometimes… you’d swear there was a poltergeist in there at times just messing with you head :wink:

Regardless of the culprit, glad you got it working… so have fun printing! :smiley: