Uploading using programmer


I’m not used to post in forums as i usually find the answer somewhere, but this time i can’t get a clue about my issue.

I’m having trouble finding a more precise documentation about programmers.

I would like to update my code from the IDE user interface, or even by CLI, (as far as someone give me some piece of information on how to do it…)

I failed to parameter twice :
1 - An Atmega644p, using MCUdude mightycore and an usbtiny ISP
board_f_cpu = 20000000L
upload_protocol = usbtiny

2 - A STM32 bluepill, using arduino framework and a STlinkV2 programmer
(i don’t remember my parameters as i just gave up at the time, telling myself that i’ll go on with this crappy arduino IDE as i can still upload on one click)

If someone can help me at least for the first one, that would be great.

I think I may help with the ATMega upload.
I use them a lot, and in the beginning I kept failing to upload the firmware using an Arduino ISP or an AVR Dragon.
My solution was to not use the “upload” target but rather the “program” one.

!#> pio run --target program

I think the “upload” target is for bootloader based programming.

I’ve also successfully uploaded to an STM32 via ST-Link but can’t remember at all how I did it.