Open BurlakovSG opened 1 year ago
Because esp-idf framework is not arduino, so you have to change that https://esphome.io/components/esp32.html
Probably it will still not like it, so you will need to add some other options (I am running my c3 with these, no idea why :D):
esphome:
platformio_options:
platform_packages:
- framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#2.0.1
platform:
- https://github.com/platformio/platform-espressif32.git#feature/arduino-upstream
Hey, thanks for reporting.
Yeah, my sketch needs NimBLE from Arduino framework, so used with default ESPHome setup.
Probably, I need to mention that in README.
Because esp-idf framework is not arduino, so you have to change that https://esphome.io/components/esp32.html
Probably it will still not like it, so you will need to add some other options (I am running my c3 with these, no idea why :D):
esphome: platformio_options: platform_packages: - framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#2.0.1 platform: - https://github.com/platformio/platform-espressif32.git#feature/arduino-upstream
With this parameters:
esphome:
name: airbnk
platformio_options:
board_build.f_flash: 40000000L
board_build.flash_mode: dio
board_build.flash_size: 4MB
platform_packages:
- framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#master
platform:
- https://github.com/platformio/platform-espressif32.git#feature/arduino-upstream
includes:
- airbnk-gateway.h
libraries:
- "h2zero/NimBLE-Arduino"
esp32:
variant: ESP32C3
board: esp32-c3-devkitm-1
framework:
type: arduino
version: 2.0.0
I get the following error:
Linking /data/airbnk/.pioenvs/airbnk/firmware.elf
RAM: [= ] 12.6% (used 41420 bytes from 327680 bytes)
Flash: [====== ] 58.6% (used 1075506 bytes from 1835008 bytes)
Building /data/airbnk/.pioenvs/airbnk/firmware.bin
esp32_create_combined_bin(["/data/airbnk/.pioenvs/airbnk/firmware.bin"], ["/data/airbnk/.pioenvs/airbnk/firmware.elf"])
usage: esptool merge_bin [-h] --output OUTPUT [--format {r,a,w}]
[--flash_freq {keep,80m,60m,48m,40m,30m,26m,24m,20m,16m,15m,12m}]
[--flash_mode {keep,qio,qout,dio,dout}]
[--flash_size FLASH_SIZE]
[--spi-connection SPI_CONNECTION]
[--target-offset TARGET_OFFSET]
[--fill-flash-size FILL_FLASH_SIZE]
<address> <filename> [<address> <filename> ...]
esptool merge_bin: error: argument <address> <filename>: [Errno 2] No such file or directory: '/data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/esp32c3/bin/bootloader__40m.bin'
*** [/data/airbnk/.pioenvs/airbnk/firmware.bin] Explicit exit, status 2
I believe, Nimble-Arduino isn't supported by esp-idf - they have their own fork at least.
I'm afraid, there's no simple solution.
Configuration:
When compiling I get the following error: