Wednesday, April 29, 2020

avrdude

Want to use avrdude from Arduino files but those files are locked inside Windowsapps folder in Program Files folder of C: drive.

C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.33.0_x86__mdqgnx93n4wtt\hardware\tools\avr/bin/avrdude -CC:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.33.0_x86__mdqgnx93n4wtt\hardware\tools\avr/etc/avrdude.conf -v -patmega328p -carduino -PCOM14 -b57600 -D -Uflash:w:C:\ardtemp/Blink1.ino.hex:i


How's that for a file name (above). This invokes avrdude that programs a little nano.
The version is:
avrdude: Version 6.3-20190619

Had to unlock Windowsapps folder using instructions found here:

https://answers.microsoft.com/en-us/windows/forum/all/what-is-windows-apps-hidden-folder-and-why-cant-i/40a60508-c409-422a-af92-bd51fe5a4ca9

Might put a copy of avrdude and associated conf file into ardtemp where the file.ino.hex file live. The can do avrdude invokes away from official Arduino folder for safety.

Did this and had no luck til I inserted baud rate. So while in c:\ardtemp dirI wrote on command line:

Dell@DESKTOP-FGA8Q4U C:\ardtemp
$ avrdude -Cavrdude.conf -v -patmega328p -carduino -PCOM14 -b57600 -Uflash:w:Blink1.ino.hex:i

...and it worked.

Now want to read entire file back.

Mega uses following for avrdude in normal mode:
C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.33.0_x86__mdqgnx93n4wtt\hardware\tools\avr/bin/avrdude -CC:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.33.0_x86__mdqgnx93n4wtt\hardware\tools\avr/etc/avrdude.conf -v -patmega2560 -cwiring -PCOM15 -b115200 -D -Uflash:w:C:\ardtemp/CDP1802e91.ino.hex:i

-------------------------------------------------------further research-----------------
Mega uses following for avrdude in normal mode:

C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.33.0_x86__mdqgnx93n4wtt\hardware\tools\avr/bin/avrdude -CC:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.33.0_x86__mdqgnx93n4wtt\hardware\tools\avr/etc/avrdude.conf -v -patmega2560 -cwiring -PCOM15 -b115200 -D -Uflash:w:C:\ardtemp/CDP1802e91.ino.hex:i

revised is:
avrdude -C avrdude.conf -v -patmega2560 -cwiring -PCOM15 -b115200 -D -Uflash:w:CDP1802e91.ino.bin:r

Try this above.
But avrdude, latest copy (avrdude version 6.3-20190619,) now resides in c:\TinyC, as does conf file.So, to revise above, try:
(while in folder containing the arduino bin file below)

$ \tinyc\avrdude -C \tinyc\avrdude.conf -v -patmega2560 -cwiring -PCOM15 -b115200 -D -Uflash:w:CDP1802e91.ino.bin:r

\tinyc\avrdude -C \tinyc\avrdude.conf -v -patmega2560 -cwiring -PCOM15 -b115200 -D -Uflash:w:CDP1802e91.ino.bin:r (<--worked)12:14 PM 5/05/2020

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.