0

I'm getting this error on Arduino(1.8.9).

usage: esptool write_flash [-h] [--erase-all]
                       [--flash_freq {keep,40m,26m,20m,80m}]
                       [--flash_mode {keep,qio,qout,dio,dout}]
                       [--flash_size FLASH_SIZE]
                       [--spi-connection SPI_CONNECTION] [--no-progress]
                       [--verify] [--compress | --no-compress]
                       <address> <filename> [<address> <filename> ...]
esptool write_flash: error: argument <address> 
<filename>: [Errno 2] No such file or directory:'/home/USER/.arduino15/packages/esp32/hardware/esp32/1.0.2/tools/partitions/boot_app0.bin'
esptool write_flash: error: argument <address> <filename>: [Errno 2] No such file or directory: '/home/USER/.arduino15/packages/esp32/hardware/esp32/1.0.2/tools/partitions/boot_app0.bin'

Although boot_app0.bin file is present: image link

2
  • Yeah, but what user is the Arduino IDE running as? Commented Sep 29, 2019 at 3:19
  • It's on root user Commented Oct 2, 2019 at 9:47

2 Answers 2

1

To fix this problem you can try to edit the platform.txt file which you can find in your esp package directory.

So, you need to replace inner section with code written below:

## Combine gc-sections, archives, and objects recipe.c.combine.pattern={recipe.hooks.linking.prelink.1.pattern} & "{compiler.path}{compiler.c.elf.cmd}" {build.exception_flags} -Wl,-Map "-Wl,{build.path}/{build.project_name}.map" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} -o "{build.path}/{build.project_name}.elf" -Wl,--start-group {object_files} "{archive_file_path}" {compiler.c.elf.libs} -Wl,--end-group "-L{build.path}" & {recipe.objcopy.hex.1.pattern}

The key thing here is "{recipe.hooks.linking.prelink.1.pattern} &" at start and "& {recipe.objcopy.hex.1.pattern}" at the end. The text between is the part of the platform.txt file, that you dont need to change.

The above is true for OS Windows. In OS Linux set {recipe.hooks.linking.prelink.1.pattern} ;" and "; {recipe.objcopy.hex.1.pattern}".

Its solve my problem for ESP8266, I hope its will be helpful for you too.

Reference link https://www.eclipse.org/forums/index.php/t/1095090/

Sign up to request clarification or add additional context in comments.

Comments

0

if you are using esptool. Make sure you actually download the files from github using the download button instead of using the save as option when u right click on the file name.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.