Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 00:32 18 Feb 2026 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Getting USBasp to work

     Page 2 of 2    
Author Message
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 2039
Posted: 06:33am 14 Feb 2026
Copy link to clipboard 
Print this post

I need more info, what file are we talking about, avrdude does not save a file, except when programming output (what you see as it programs) is redirected to a file and not the terminal, which I'm sure is not what you are asking.
NANO Inverter: Full download - Only Hex Ver 8.2Ks
 
Bryan1

Guru

Joined: 22/02/2006
Location: Australia
Posts: 1669
Posted: 07:15am 14 Feb 2026
Copy link to clipboard 
Print this post

OK I got avrdude via apt-get and where linux saved that file as when I look in thundar I can't find where  it is so placing the inverter.hex file in the avrdude folder is a question
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 3013
Posted: 07:51am 14 Feb 2026
Copy link to clipboard 
Print this post

Previous page, Posted: 04:45am 14 Feb 2026, KeepIS supplied a link to "avrdude_64.tar.gz" that you may be able to unzip to a location of your choice. Then you don't have to hunt for it.
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4241
Posted: 08:42am 14 Feb 2026
Copy link to clipboard 
Print this post

Worst case if you can't find something, as root if you really need to look everywhere:

find / -iname '*avrdude*'

You may want to pipe it through less if there may be many matches

find / -iname '*avrdude*' | less

The i in -iname ignores case.

If you know you don't want a directory (folder) you can also use

-type f

John
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 2039
Posted: 10:36pm 14 Feb 2026
Copy link to clipboard 
Print this post

  Bryan1 said  OK I got avrdude via apt-get and where linux saved that file as when I look in thundar I can't find where  it is so placing the inverter.hex file in the avrdude folder is a question


Just a thought, it appears you are able to run avrdude itself, so if installed via apt-get, avrdude may be in a location in the Linux command search path, you may only need to put the full path to the inverter.hex file in the avrdude command line.
NANO Inverter: Full download - Only Hex Ver 8.2Ks
 
Bryan1

Guru

Joined: 22/02/2006
Location: Australia
Posts: 1669
Posted: 01:21am 15 Feb 2026
Copy link to clipboard 
Print this post

Ok another day and getting closer
Bryan@Bryan:~
$ avrdude -v -c USBasp -p ATmega328P -F -v -U flash : /Home/Bryan/Documents/ inverter.hex :i

avrdude: Version 7.1
        Copyright the AVRDUDE authors;
        see https://github.com/avrdudes/avrdude/blob/main/AUTHORS

        System wide configuration file is /etc/avrdude.conf
        User configuration file is /home/Bryan/.avrduderc
        User configuration file does not exist or is not a regular file, skipping

        Using Port                    : usb
        Using Programmer              : USBasp
avrdude: seen device from vendor >www.fischl.de<
avrdude: seen product >USBasp<
avrdude: defaulting memtype in -U w:flash option to "flash"
avrdude ioerror() OS error: file flash is not readable: No such file or directory

avrdude done.  Thank you.


Now when I did the find search just about every entry was saying permission denied

Did a simple code to see if the nano was seen

avrdude -c USBasp -p ATmega328P -F

avrdude error: cannot set sck period; please check for usbasp firmware update
avrdude: AVR device initialized and ready to accept instructions
avrdude: device signature = 0x1e9516 (probably m328pb)
avrdude warning: expected signature for ATmega328P is 1E 95 0F


Now here I put the full path to the inverter.hex and the second one is where the inverter.hex was dragged and dropped in /usr/bin/avrdude


avrdude  -c USBasp -p ATmega328pb -F -v -U flash:/Home/Bryan/Documents/inverter.hex: i
avrdude parse_op() error: invalid I/O mode '/' in update specification
 allowed values are:
   r = read device
   w = write device
   v = verify device
avrdude main() error: unable to parse update operation 'flash:/Home/Bryan/Documents/inverter.hex:'
Bryan@Bryan:~
$ avrdude -c USBasp -p ATmega328pb -F -v -U flash: inverter.hex: i
avrdude parse_op() error: invalid I/O mode '' in update specification
 allowed values are:
   r = read device
   w = write device
   v = verify device
avrdude main() error: unable to parse update operation 'flash:'

Edited 2026-02-15 12:07 by Bryan1
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 2039
Posted: 01:52am 15 Feb 2026
Copy link to clipboard 
Print this post

Very close.

First, can you open a terminal and try this:

avrdude -N -c usbasp -p m328P -F -v -U flash:w:/Home/Bryan/Documents/inverter.hex:i

I have confirmed that if avrdude and it's config file are placed in the PATH then the command line above works.

Also confirmed that it does not interfere with the Arduino IDE when using the USBasp programmer in the IDE. (The IDE calls it's own version and config when doing so)

BTW You had an error in your command, you had a space in the path/filename in your command.
.
Edited 2026-02-15 12:07 by KeepIS
NANO Inverter: Full download - Only Hex Ver 8.2Ks
 
Bryan1

Guru

Joined: 22/02/2006
Location: Australia
Posts: 1669
Posted: 02:16am 15 Feb 2026
Copy link to clipboard 
Print this post

I had to drop the -N as it reported an error then ran the code

avrdude  -c usbasp -p m328P -F -v -U flash:w:/Home/Bryan/Documents/inverter.hex:i

avrdude: Version 7.1
        Copyright the AVRDUDE authors;
        see https://github.com/avrdudes/avrdude/blob/main/AUTHORS

        System wide configuration file is /etc/avrdude.conf
        User configuration file is /home/Bryan/.avrduderc
        User configuration file does not exist or is not a regular file, skipping

        Using Port                    : usb
        Using Programmer              : usbasp
avrdude ioerror() OS error: file /Home/Bryan/Documents/inverter.hex is not readable: No such file or directory

avrdude done.  Thank you.
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 2039
Posted: 02:18am 15 Feb 2026
Copy link to clipboard 
Print this post

Just re-reading your last post, do not place anything in usr/bin.

If you still get an error, make 1000% sure the path is correct to that hex file.

I have fully tested that command - it works, you did not have the WRITE command (w) after flash, that will cause these errors.

OK I was editing when you posted the reply above.

That means that the path or file name or contents are incorrect.

/Home/Bryan/Documents/inverter.hex is not readable: No such file or directory

!!!!   Home should be home.
.
Edited 2026-02-15 12:24 by KeepIS
NANO Inverter: Full download - Only Hex Ver 8.2Ks
 
Bryan1

Guru

Joined: 22/02/2006
Location: Australia
Posts: 1669
Posted: 02:27am 15 Feb 2026
Copy link to clipboard 
Print this post

Well who would of thought a H and h would be the problem as took out the -N option and changed Home to home

avrdude: device signature = 0x1e9516 (probably m328pb)
avrdude main() warning: expected signature for ATmega328P is 1E 95 0F
avrdude: Note: flash memory has been specified, an erase cycle will be performed.
        To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: auto set sck period (because given equals null)
avrdude usbasp_spi_set_sck_period() error: cannot set sck period; please check for usbasp firmware update
avrdude: reading input file /home/Bryan/Documents/inverter.hex for flash
        with 10214 bytes in 2 sections within [0, 0x7f9d]
        using 81 pages and 154 pad bytes
avrdude: writing 10214 bytes flash ...

Writing | ################################################## | 100% 5.10 s

avrdude: 10214 bytes of flash written
avrdude: verifying flash memory against /home/Bryan/Documents/inverter.hex

Reading | ################################################## | 100% 4.23 s

avrdude: 10214 bytes of flash verified

avrdude done.  Thank you.

Edited 2026-02-15 12:35 by Bryan1
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 2039
Posted: 02:37am 15 Feb 2026
Copy link to clipboard 
Print this post

NOTE: Your avrdude is Version 7.1, the one I zipped is Avrdude version 8.1.

There are differences, and the config file will also be different, likely -N is not implemented in 7.1.

You have no trouble with the avrdude command running, again, avrdude is unhappy with the File or the File path.

!!!!!! I was typing while you were posting/editing your last reply, so my edited reply follows.

To answer the last post: H verses h in Linux, years of old Windows habits take a while to fade.

Linux is VERY - VERY case sensitive.

For future reference you can copy the path from the file manager, I do this and similar copy paste to eliminate subtle errors in names and paths.

Anyway, it's all looking good now.  
.
Edited 2026-02-15 13:50 by KeepIS
NANO Inverter: Full download - Only Hex Ver 8.2Ks
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4241
Posted: 02:17pm 15 Feb 2026
Copy link to clipboard 
Print this post

  Bryan1 said  Now when I did the find search just about every entry was saying permission denied

1st line of my post was: Worst case if you can't find something, as root if you really need to look everywhere:

Anyway, good you got avrdude to work.

John
 
     Page 2 of 2    
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2026