Giter VIP home page Giter VIP logo

Comments (10)

xedbg avatar xedbg commented on June 12, 2024

Hi @paulskirk53 - pymcuprog allows for programming several segments in several sessions, and thus does not erase the device before programming.
Before release 3.13 the solution from platformio was to chain erase and program: pymcuprog erase && pymcuprog write
In 3.13 the --erase switch was added which means it can be done in one operation using pymcuprog write --erase
And if you are in doubt, use the --verify switch to check by read-back after programming.
(The --erase is not done by default - we have too many [internal] use-cases which will need to be addressed if we change this behaviour)

from pymcuprog.

paulskirk53 avatar paulskirk53 commented on June 12, 2024

Ah, brill, thanks for the explanation.

from pymcuprog.

paulskirk53 avatar paulskirk53 commented on June 12, 2024

Hi, I have just come back to this using the Platformio CLI, and using this command
pymcuprog write -d atmega4809 -t uart -u COM5 -c 250k -f .pio\build\ATmega4809\firmware.hex --erase
I get the error:
pymcuprog: error: unrecognized arguments: --erase

any help much appreciated.

from pymcuprog.

xedbg avatar xedbg commented on June 12, 2024

@paulskirk53 - please verify which version of pymcuprog you are running since this --erase switch was added not long ago.
pymcuprog --version

from pymcuprog.

paulskirk53 avatar paulskirk53 commented on June 12, 2024

it is 3.13.3.166
I did
pip install pymcuprog

earlier today. It did work with the --erase option after I posted in July.
thanks for help.

from pymcuprog.

mraardvark avatar mraardvark commented on June 12, 2024

That version was released in May... Are you sure there is not an older version in a venv inside platformio?

from pymcuprog.

paulskirk53 avatar paulskirk53 commented on June 12, 2024

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?

from pymcuprog.

mraardvark avatar mraardvark commented on June 12, 2024

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...

from pymcuprog.

paulskirk53 avatar paulskirk53 commented on June 12, 2024

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:
pymcuprog write -d atmega4809 -t uart -u COM5 -c 250k -f .pio\build\ATmega4809\firmware.hex --version

and it reports pymcuprog version 3.13.3.166

hope that helps.

from pymcuprog.

paulskirk53 avatar paulskirk53 commented on June 12, 2024

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.

from pymcuprog.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.