pymcuprog icon indicating copy to clipboard operation
pymcuprog copied to clipboard

pymcuprog reports upload success but is not uploading code

Open paulskirk53 opened this issue 2 years ago • 10 comments

Hi, Apologies for a long post but the background is important. I use a pair of AVR 4809 (40 pin variants) in a project. I use FTDI boards to facilitate code uploads and serial comms between a windows PC running my code and the AVRs. I use the Platformio IDE. When I started with the 4809s it was my first experience of UPDI and I found pyupdi, which in those days was not deprecated. It worked fine as installed in my platformio IDE. I subsequently started using pymcuprog when pyupdi became deprecated, but as it is much slower to upload code than pyupdi, I reverted to pyupdi. So the problem is that (for a reason I am exploring with the Platformio folks), pyupdi periodically disappears from my IDE. When this happens, I use pymcuprog as follows:

pymcuprog write -d atmega4809 -t uart -u COM3 -c 250k -f .pio\build\ATmega4809\firmware.hex

and it reports success when uploading code. However, I don't think the code uploads. A simple blinkled prog. used as a trial does not blink the LED. Naturally to start with I thought it was me, but today I managed to reinstall pyupdi and used that to upload the same blinkled code. It worked, so just out of curiosity, I used pymcuprog to upload the code and that seemed to work too as reported below:

PS C:\Users\Paul\Documents\PlatformIO\Projects\Arduino-code-blinkled> pymcuprog write -d atmega4809 -t uart -u COM3 -c 250k -f .pio\build\ATmega4809\firmware.hex Pinging device... Ping response: 1E9651 Writing from hex file... Writing flash... Done.

But it doesn't.

So I think all the above can be summarised as follows: If I use pyupdi to upload code, that works. If I use pymcuprog, it doesn't work.

It's probably a setting I have missed. Thanks for any thoughts.

paulskirk53 avatar Jul 04 '22 11:07 paulskirk53