I read this article : http://www.instructables.com/id/Burn-Arduino-Bootloader-with-Arduino-MEGA/. All is ok when I do that. But in my case, I want to burn my own bootloader file into my Mega328p. So I got back the command line from the ARduino IDE console and I had the information about my .hex file:
"%WORKSPACE_LOC%\arduino\hardware\tools\avr\bin\avrdude.exe" "-C%WORKSPACE_LOC%\arduino\hardware\tools\avr\etc\avrdude.conf" -v -v -v -patmega328p -cstk500v1 -P%COM_PORT_ICSP% -b19200 -e -Uflash:w:%WORKSPACE_LOC%\my_bootloader\Release\my_bootloader.hex -Ulock:w:0x3F:m -Uefuse:w:0x05:m -Uhfuse:w:0xDE:m -Ulfuse:w:0xFF:m
And unfortunately, it doesn't work; this is the error:
avrdude.exe: invalid file format 'my_bootloader.hex' in update specifier avrdude.exe: error parsing update operation 'flash:w:\my_path\my_bootloader\Release\my_bootloader.hex '
All the paths are correct. I tried with the native bootloader .hex file for Arduino328p and there is the same problem.
Thank you guys for your help !