-
Notifications
You must be signed in to change notification settings - Fork 23
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
pymcuprog reports upload success but is not uploading code #27
Comments
Hi @paulskirk53 - pymcuprog allows for programming several segments in several sessions, and thus does not erase the device before programming. |
Ah, brill, thanks for the explanation. |
Hi, I have just come back to this using the Platformio CLI, and using this command any help much appreciated. |
@paulskirk53 - please verify which version of pymcuprog you are running since this --erase switch was added not long ago. |
it is 3.13.3.166 earlier today. It did work with the --erase option after I posted in July. |
That version was released in May... Are you sure there is not an older version in a venv inside platformio? |
sorry I wouldn't know how to check, is there a command I can use to check for a virtual env.? Perhaps I should post about that on the PIO forum? |
I guess easiest would be to replace the programming flash write call in your .ini file with pymcuprog --version and check the output from that... |
i was never able to get pymcuprog working via the platformio.ini file, so I use it from the CLI. So I removed --erase and used this: and it reports pymcuprog version 3.13.3.166 hope that helps. |
works fine this morning, no probs uploading with --erase. Only difference is the machine was restarted this morning. Version number is the same. Thanks for help. |
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.
The text was updated successfully, but these errors were encountered: