Platformio does not accept upload port

I’m about to go absolutely insane with this problem. I just can not get platformio to accept any port.
I’m running Fedora 34.
Here is my config

[env:ATmega1284P]

platform = atmelavr

board = ATmega1284P

framework = arduino

upload_port = usb

upload_protocol = atmelice_isp

upload_flags = -e

When I run avrdude through terminal it will happily accept usb or nothing at all as an upload port, when running set fuses it will also find my board without any trouble. But putting usb (as in my config) it will spit out
No such file or directory: ‘usb’
through pio device list I can see my programmer is connected to /dev/ttyS0 but using that will give me

avrdude: jtag3_open_common(): JTAGICE3/EDBG port names must start with "usb"

Using /dev/ttyS0 in terminal will give the same error. I’ve been trying to get platformio to ignore the upload_port and send it through to avrdude anyways since it seems it can handle it but very unsuccessfully.

avrdude command I used to check connection

avrdude -p ATmega1284P -c atmelice_isp

Any guidance is very appreciated.

1 Like

Have you tried per docs

[env:ATmega1284P]
platform = atmelavr
board = ATmega1284P
framework = arduino
upload_protocol = custom
upload_port = usb
upload_flags =
    -C
    $PROJECT_PACKAGES_DIR/tool-avrdude/avrdude.conf
    -p
    $BOARD_MCU
    -P
    $UPLOAD_PORT
    -c
    atmelice_isp
upload_command = avrdude $UPLOAD_FLAGS -U flash:w:$SOURCE:i
1 Like

Youŕe a legend!

I was fiddling around with that config earlier in great anger and somehow screwed it up. It appears to work now. Big thanks!