Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

avrdude lacking functionality #275

Open
uwezi opened this issue Feb 20, 2022 · 1 comment
Open

avrdude lacking functionality #275

uwezi opened this issue Feb 20, 2022 · 1 comment

Comments

@uwezi
Copy link

uwezi commented Feb 20, 2022

The version of avrdude which is shipped with PlatformIO lacks support for widespread uploaders like the usbasp by Thomas Fischl. This functionality is available in the regular build of avrdude.

Configuration

Operating system: Windows 10 64bit

PlatformIO Version: Core 5.2.5 Home 3.4.1

Description of problem

When experimenting with the upload settings under PlatformIO to utilize bare microcontrollers without Arduino-boards I noticed that avrdude was giving me error messages about not finding the necessary USB device for my programmer, an usbasp - normally fully supported by avrdude. Changing the executable in the command to a known-working copy of avrdude everything works fine and as expected.
Both avrdude-executables identify themselves as version 3.6

Steps to Reproduce

see here: https://youtu.be/BKO1rYMPF_k?t=480

Actual Results

error message

Expected Results

no error message

If problems with PlatformIO Build System:

The content of platformio.ini:

[env:ATmega328P]
platform = atmelavr
board = ATmega328p

board_build.f_cpu = 1000000UL

upload_protocol = custom
upload_flags    = -pm328p
    -Pusb
    -B4
    -cusbasp

upload_command = "C:\Program Files (x86)\AVRDUDESS\avrdude" $UPLOAD_FLAGS -U flash:w:$SOURCE:i 

Source file to reproduce issue:

#include <avr/io.h>
#include <util/delay.h>

int main(void)
{
  DDRC = (1 << PB5);
  while (1)
  {
    PORTC ^= (1 << PB5);
    _delay_ms(500);
  }
}

Additional info

@ivankravets ivankravets transferred this issue from platformio/platformio-core Feb 21, 2022
@MCUdude
Copy link
Contributor

MCUdude commented Jan 29, 2023

@uwezi can you try with the latest upstream version? Avrdude 6.3 has been replaced with version 7.1, and is a huge improvement.

Since there hasn't been a release in a while, you'll have to tell PlatformIO to use the git version:

[env:ATmega328P]
platform = https://github.com/platformio/platform-atmelavr.git
board = ATmega328p

board_build.f_cpu = 1000000UL

upload_protocol = custom
upload_flags    = -pm328p
    -Pusb
    -B4
    -cusbasp

upload_command = avrdude $UPLOAD_FLAGS -U flash:w:$SOURCE:i

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants