Basic question for a avrdude beginner !

Hello !
I got a questions about the use of avrdude,
First, it is possible to upload my .hex file on arduino without using any other device, i mean can i directly connect my arduino nano to pc by USB ?

If yes, i got no idea why my cmd line isn't working, i tried this after checking how does avrdude works in this page :
avrdude.exe (c arduino -p m328p -P COM9 _b 57600 _Uflash:w:"reset_rom.hex":i
Before using the cmd i do save my .hex file on C:\

i got this result : avrdude.exe : ser_open(): can't open device "\.\COM9" : Access denied

Thanks by advance for you answers !

Darsys:
First, it is possible to upload my .hex file on arduino without using any other device, i mean can i directly connect my arduino nano to pc by USB ?

Yes.

If yes, i got no idea why my cmd line isn't working, i tried this after checking how does avrdude works in this page :
avrdude.exe (c arduino -p m328p -P COM9 _b 57600 _Uflash:w:"reset_rom.hex":i
Before using the cmd i do save my .hex file on C:\

i got this result : avrdude.exe : ser_open(): can't open device "\.\COM9" : Access denied

First, you have to check the port if it exists and is accessible in your OS.

I solved the problem of the COM port, in fact, the baudrate in the port setting was 9600 (atmega328p use 57600) but after changing it i got a new error :cold_sweat: :
avrdude.exe stk500_getsync(): not in sync: resp=0xe0

Any idea ?

Try 115200. There are 2 versions of Nano: with old bootloader - 57600baud, with new bootloader - 115200baud.

You are right, it worked with 115200 !
Thanks alot :wink: !

Glad to help.