Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation fails for ESP32 : myproject.partition.bin missing. #163

Open
UltimateUnicorn opened this Issue Mar 6, 2019 · 1 comment

Comments

2 participants
@UltimateUnicorn
Copy link

UltimateUnicorn commented Mar 6, 2019

Hello. Thanks for the support and many advices you've already provided here.
I would like to report a bug that occurs when I try to compile a sketch for an ESP32.

My setup

Steps to reproduce

  • Create a new project (I copied the HelloServer.ino from the examples directory into a new directory called test and renamed HelloServer.ino into test.ino).
  • Compile it using arduino-cli compile --fqbn esp32:esp32:esp32 test (from the parent directory of test) -> works well (I got a "normal" output from the compiler and the following files have been created in the test folder : test.esp32.esp32.esp32.bin & test.esp32.esp32.esp32.elf.
  • Upload the project : arduino-cli upload --fqbn esp32:esp32:esp32 -p /dev/ttyUSB0 test -> doesn't work. I get the following output :

No new serial port detected.
usage: esptool write_flash [-h] [--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]

[ ...]
esptool write_flash: error: argument : [Errno 2] No such file or directory: 'test/test.esp32.esp32.esp32.partitions.bin'
Error: exit status 2
Error during upload.

Additional information

  • When using the Espressif toolchain & ESP-IDF on the same computer I can upload the sketch and it runs.
  • I used the exact same procedure using the Arduino IDE version 1.8.8 under Windows : it worked flawlessly.
  • I just realized that there is no newline between "directory:" and "test/tes....." on my console. Don't know if it's relevant.

Feel free to contact me for additional details / testings.
Thanks.

@per1234

This comment has been minimized.

Copy link
Collaborator

per1234 commented Mar 7, 2019

The ESP32 core's recipe.objcopy.eep.pattern creates a file named {build.project_name}.partitions.bin:
https://github.com/espressif/arduino-esp32/blob/master/platform.txt#L80

recipe.objcopy.eep.pattern={tools.gen_esp32part.cmd} -q "{runtime.platform.path}/tools/partitions/{build.partitions}.csv" "{build.path}/{build.project_name}.partitions.bin"

and then the upload recipe expects to find that file in {build.path}, but arduino-cli doesn't copy that file from the temporary build folder to the sketch folder, thus the error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.