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

Natively support pymcuprogram #32

Open
maxgerhardt opened this issue Oct 30, 2021 · 6 comments
Open

Natively support pymcuprogram #32

maxgerhardt opened this issue Oct 30, 2021 · 6 comments
Labels

Comments

@maxgerhardt
Copy link
Contributor

maxgerhardt commented Oct 30, 2021

The microchip-pic-avr-tools/pymcuprog tool has emerged and per https://github.com/microchip-pic-avr-tools/pymcuprog/blob/main/pypi.md#serial-port-updi-pyupdi is capable of uploading to a MegaAVR device via UPDI via a serial adapter, in the same way pyupdi can.

One might think integrating PyUPDI should be done, but as of 3 days a deprecation notice was posted pointing to the pymcuprog program as its successor. The serialupdi subfolder is PyUPDI slightly adapted.

As of now, PlatformIO only supported PyUPDI via upload_protocol = custom configurations anyways, not natively (see here).

Programming "raw" MegaAVR chips via a simple serial adapter is a common use-case for hobbyists bying the chips directly (such as the convienent DIP form the ATMega4809) and as such, PlatformIO should support uploading the firmware and setting fuses natively through using only a serial adapter and the new pymcuprog program.

For CLI docuentation, see https://github.com/microchip-pic-avr-tools/pymcuprog/issues/7 and https://github.com/microchip-pic-avr-tools/pymcuprog/blob/main/pypi.md.

@MCUdude
Copy link
Contributor

MCUdude commented Jan 5, 2022

The next release of Avrdude will natively support SerialUPDI. It has already been pushed to the upstream repo.

https://github.com/avrdudes/avrdude

@matou78
Copy link

matou78 commented May 11, 2022

just tested https://github.com/avrdudes/avrdude/releases/tag/v7.0 by replacing "avrdude.exe" and "avrdude.conf" inside of ".platformio\packages\tool-avrdude-megaavr" ( i'm using an AVR64DA32 ) and was able to use "upload_protocol = serialupdi"
My updi uploader is a simple ch340

but as i'm such a noob x) no clue how to propose the update lol

@MCUdude
Copy link
Contributor

MCUdude commented May 11, 2022

The Arduino developers will soon build their own Avrdude 7.0 binaries where all the necessary drivers are bunded in the binary. These are probably the binaries PlatformIO should bundle with their platform-atmelavr and platform-atmelmegaavr packages.

@matou78
Copy link

matou78 commented May 11, 2022

thanks for information, for now it works :p it even helped me find new things for my problem on AVRxxDx chips :)

@mairas
Copy link

mairas commented Jan 31, 2023

Avrdude 7.0 and 7.1 are indeed out and work reliably with serialupdi programmers. IMHO, this issue can be closed (and #46 should be fixed).

@matou78
Copy link

matou78 commented Feb 3, 2023

for me all good and sexy :)
image

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

No branches or pull requests

5 participants