Specifying alternative avrdude.conf?

Yes, did that. Going to give it a try. I’ll report back.

That seemed to work. Thank you very much!

J

@maxgerhardt, I really appreciate you uploading this. The avrdude.conf file used by platformIO seldom works for programming my Arduino Mega boards (and doesn’t at all on the ones with updated Optiboot from MegaCore), while the standard Arduino IDE had minimal to no issues. This allowed me to finally build using PlatformIO without having to consistently try to re-program till it ‘sticks’.

The two mega boards I’m using are the DFRobot Bluno Mega 2560 and a cheap Ebay Mega 2560 clone. The Bluno board seemed to be a bit picker than the standard Mega, possibly related to the bluetooth controller hanging off of the UART.

For those curious, here is what my platformio.ini file looks like:

[env:megaatmega2560]
lib_ldf_mode = chain+
platform = atmelavr
board = megaatmega2560
framework = arduino

; To use standard Arduino avrdude.conf
extra_scripts = custom_avrdude.py

; change microcontroller
;board_build.mcu = atmega2560

; change MCU frequency
;board_build.f_cpu = 16000000L

; change the upload speed
board_upload.speed = 115200
;board_upload.speed = 256000

; change the upload protocol
upload_protocol = arduino

; For using USBasp
;upload_protocol = usbasp
;upload_flags = -Pusb

Additional entries in the file:
lib_ldf_mode = chain+ Is to get PlatformIO to parse the pre-processor statements in some of my included libraries
board_upload.speed = 115200 Seems to help with my upload stability? Subjective feelings here
upload_protocol = arduino Like with the upload speed setting, this seems to help with upload stability (subjective)

1 Like