Closed nabelekt closed 1 year ago
I have found that if I add --erase
to the end of my write
command, the program works as expected. Why is the --erase
required? If that is expected/desired, this issue can be closed.
You are not the first, and you won't be the last :| (It's not as simple as it might seem to have a universal erase across AVR, PIC and SAM... in hindsight the default behaviour might has been better inverted, but we favour consistency at this point.) Glad you got it to work!
I think the reason that I wasn't using --erase
in the first place was that the help makes it seem like it wouldn't apply to me:
--erase erase memory section before writing (from an Intel(R) hex file only)
, particularly the part in parentheses. I'm not sure what an "Intel hex file" is but was thinking it was something that would be meant to be flashed to an Intel device.
Thanks for the help and for your work on this tool!
Edit: Found a solution. See next comment.
Hello, all. I have a project using an AVR128DA28 which I have always previously programmed using the Arduino IDE with DxCore. Here are the settings that I have there:
Here is the code I am experimenting with:
If I flash using the Arduino IDE, my LED blinks as expected.
If I flash the MCU using the IDE and then run
pymcuprog read -t uart -u COM4 -d avr128da28 -f blink_read_arduino
, I get these files: blink_read_arduino.zip.If I then run
pymcuprog write -t uart -u COM4 -d avr128da28 -f blink.hex
. I get:but my LED does not flash. And
pymcuprog verify -t uart -u COM4 -d avr128da28 -f blink.hex
gives me:Here is the
blink.hex
file that I am flashing: blink.txt (renamed because I can't upload a .hex file here).If I then run
pymcuprog read -t uart -u COM4 -d avr128da28 -f blink_read_cmd_line
, I get these files: blink_read_cmd_line_hex.zip.I differed the files that I've attached and made the following notes:
So, any ideas what I need to do differently to replicate what the Arduino IDE/DxCore is doing? It looks like that is actually using a modified version of pymcuprog.
Any help would be greatly appreciated. Thank you!