Wednesday, May 6, 2020

flashed hi and low using avrdude and two hex files.

Wrote normal blink program for nano and also assembled a 1802 program called hi.asm into hi.hex.

Used avrdude to burn both into nano and read back contents with this command:

$ c:\tinyc\avrdude -CC:\tinyc\avrdude.conf -v -patmega328p -carduino -PCOM15 -b57600 -Uflash:w:Blink1.ino.hex:i -Uflash:w:hi.hex:i -Uflash:r:dump.bin:r

Looked at big dump file, dump.bin and both the avr code and the little 1802 program were there.

Means we don't have to combine files in software. Just assemble 1802.asm into 1802.hex then combine and burn with one avrdude command.



c:\tinyc\avrdude -CC:\tinyc\avrdude.conf -v -patmega328p -carduino -PCOM15 -b57600 -Uflash:w:Blink1.ino.hex:i -Uflash:w:hi.hex:i -Uflash:r:dump.bin:r

Note two files flashed (one normal blink.hex-type file and one assembled 1802.hex file), one big file read back.

No comments:

Post a Comment

Pi Pico and other Boards

 Got a new Pi Pico and it looks very promising. Want to use Oled display with it.