mraardvark / pyupdi

Python UPDI driver for programming "new" tinyAVR and megaAVR devices
MIT License
212 stars 73 forks source link

Writing to a non zero address results in verify errors #80

Open bitli opened 3 years ago

bitli commented 3 years ago

Writing an hex file with a non zero base (example 0x200, as produced by the Arduino IDE) on Attiny814 results in verify errors, as it is read back from (0x8000), the base address of the flash (pyupdi:154), not the offset address passed as parameter and calculated at nvm:217 Changing the line pyupdy:154 to readback = nvm.read_flash(start_address, len(data)) solves the problem apparently.

mraardvark commented 3 years ago

Thanks @bitli Unfortunately I don't have a test setup for pyupdi to verify this. Ah I see you have a PR :) FYI: If you are interested, pymcuprog is a tested and maintained package that incorporates pyupdi 'backend'