在vscode中的ESP-IDF插件中使用Arduino框架作为组件
首先要先安装好ESP-IDF插件,然后进行如下操作
1、安装特定版本ESP-IDF
在ESP-IDF插件中,Advanced->Configure ESP-IDF Extension
选Advanced,Select ESP-IDF version:,选好版本,点Configure Tools,即可下载并安装ESP-IDF
点Download Tools
2、安装Arduino库
Advanced->Configure ESP-IDF Extension
点Components manager,搜索Arduino
选好某个版本,Install
点Examples
点Create project from this sample
这个项目会有一个名为idf_component.yml的文件,内容为:
dependencies:
espressif/arduino-esp32:
pre_release: true
version: '*'
同意Generate compile_commands,json,会同时下载managed_components
main.cpp
#include "Arduino.h"
void setup() {
Serial.begin(115200);
}
void loop() {
Serial.println("Hello world!");
delay(1000);
}
3、编译运行
ESP-IDF->Build,经过一段时间编译,最终结果显示如下
-- Found Git: /usr/bin/git (found version "2.34.1")
-- The C compiler identification is GNU 12.2.0
-- The CXX compiler identification is GNU 12.2.0
-- The ASM compiler identification is GNU
-- Found assembler: /home/azhu/.espressif/tools/xtensa-esp32-elf/esp-12.2.0_20230208/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /home/azhu/.espressif/tools/xtensa-esp32-elf/esp-12.2.0_20230208/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /home/azhu/.espressif/tools/xtensa-esp32-elf/esp-12.2.0_20230208/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- git rev-parse returned 'fatal: 不是 git 仓库(或者任何父目录):.git'
-- Could not use 'git describe' to determine PROJECT_VER.
-- Building ESP-IDF components for target esp32
NOTICE: Skipping optional dependency: espressif/esp-sr
NOTICE: Skipping optional dependency: espressif/esp-sr
NOTICE: Skipping optional dependency: espressif/esp-sr
NOTICE: Skipping optional dependency: espressif/esp-sr
NOTICE: Skipping optional dependency: espressif/esp-sr
NOTICE: Skipping optional dependency: espressif/esp-sr
NOTICE: Skipping optional dependency: espressif/esp-sr
NOTICE: Skipping optional dependency: espressif/esp-sr
NOTICE: Skipping optional dependency: espressif/esp-sr
NOTICE: Skipping optional dependency: espressif/esp-sr
NOTICE: Skipping optional dependency: espressif/esp-sr
NOTICE: Skipping optional dependency: espressif/esp-sr
NOTICE: Skipping optional dependency: espressif/esp-sr
NOTICE: Skipping optional dependency: espressif/esp-sr
NOTICE: Skipping optional dependency: espressif/esp-sr
NOTICE: Skipping optional dependency: espressif/esp-sr
NOTICE: Skipping optional dependency: espressif/esp-sr
NOTICE: Skipping optional dependency: espressif/esp-sr
NOTICE: Skipping optional dependency: espressif/esp-sr
NOTICE: Skipping optional dependency: espressif/esp-sr
NOTICE: Skipping optional dependency: espressif/esp-sr
NOTICE: Skipping optional dependency: espressif/esp-sr
NOTICE: Skipping optional dependency: espressif/esp-sr
NOTICE: Skipping optional dependency: espressif/esp-sr
NOTICE: Skipping optional dependency: espressif/esp-sr
NOTICE: Skipping optional dependency: espressif/esp-sr
NOTICE: Skipping optional dependency: espressif/esp-sr
NOTICE: Skipping optional dependency: espressif/esp-sr
NOTICE: Skipping optional dependency: espressif/esp-sr
NOTICE: Skipping optional dependency: espressif/esp-sr
NOTICE: Skipping optional dependency: espressif/esp_hosted
NOTICE: Skipping optional dependency: espressif/esp_wifi_remote
NOTICE: Skipping optional dependency: espressif/esp-sr
NOTICE: Skipping optional dependency: espressif/esp_hosted
NOTICE: Skipping optional dependency: espressif/esp_wifi_remote
NOTICE: Processing 26 dependencies:
NOTICE: [1/26] chmorgan/esp-libhelix-mp3 (1.0.3)
NOTICE: [2/26] espressif/arduino-esp32 (3.1.0-rc3)
NOTICE: [3/26] espressif/cbor (0.6.0~1)
NOTICE: [4/26] espressif/esp-dsp (1.5.2)
NOTICE: [5/26] espressif/esp-modbus (1.0.17)
NOTICE: [6/26] espressif/esp-serial-flasher (0.0.11)
NOTICE: [7/26] espressif/esp-zboss-lib (1.6.1)
NOTICE: [8/26] espressif/esp-zigbee-lib (1.6.1)
NOTICE: [9/26] espressif/esp_diag_data_store (1.0.2)
NOTICE: [10/26] espressif/esp_diagnostics (1.2.1)
NOTICE: [11/26] espressif/esp_insights (1.2.2)
NOTICE: [12/26] espressif/esp_modem (1.3.0)
NOTICE: [13/26] espressif/esp_rainmaker (1.5.1)
NOTICE: [14/26] espressif/esp_rcp_update (1.2.0)
NOTICE: [15/26] espressif/esp_schedule (1.2.0)
NOTICE: [16/26] espressif/esp_secure_cert_mgr (2.5.0)
NOTICE: [17/26] espressif/jsmn (1.1.0)
NOTICE: [18/26] espressif/json_generator (1.1.2)
NOTICE: [19/26] espressif/json_parser (1.0.3)
NOTICE: [20/26] espressif/libsodium (1.0.20~2)
NOTICE: [21/26] espressif/mdns (1.4.2)
NOTICE: [22/26] espressif/network_provisioning (1.0.3)
NOTICE: [23/26] espressif/qrcode (0.1.0~2)
NOTICE: [24/26] espressif/rmaker_common (1.4.6)
NOTICE: [25/26] joltwallet/littlefs (1.16.0)
NOTICE: [26/26] idf (5.1.5)
-- DEBUG: Use esp-modbus component folder: /home/azhu/ESP32/hello_world/managed_components/espressif__esp-modbus.
NOTICE: Skipping optional dependency: espressif/esp-sr
-- Project sdkconfig file /home/azhu/ESP32/hello_world/sdkconfig
Loading defaults file /home/azhu/ESP32/hello_world/sdkconfig.defaults...
Compiler supported targets: xtensa-esp32-elf
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of time_t
-- Check size of time_t - done
-- Found Python3: /home/azhu/.espressif/python_env/idf5.1_py3.10_env/bin/python (found version "3.10.0") found components: Interpreter
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - no
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - not found
-- Could NOT find Threads (missing: Threads_FOUND)
-- Performing Test C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS
-- Performing Test C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS - Success
-- App "main" version: 1
-- Adding linker script /home/azhu/ESP32/hello_world/build/esp-idf/esp_system/ld/memory.ld
-- Adding linker script /home/azhu/esp/v5.1/esp-idf/components/esp_system/ld/esp32/sections.ld.in
-- Adding linker script /home/azhu/esp/v5.1/esp-idf/components/esp_rom/esp32/ld/esp32.rom.ld
-- Adding linker script /home/azhu/esp/v5.1/esp-idf/components/esp_rom/esp32/ld/esp32.rom.api.ld
-- Adding linker script /home/azhu/esp/v5.1/esp-idf/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld
-- Adding linker script /home/azhu/esp/v5.1/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-data.ld
-- Adding linker script /home/azhu/esp/v5.1/esp-idf/components/esp_rom/esp32/ld/esp32.rom.syscalls.ld
-- Adding linker script /home/azhu/esp/v5.1/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld
-- Adding linker script /home/azhu/esp/v5.1/esp-idf/components/soc/esp32/ld/esp32.peripherals.ld
-- DEBUG: Use esp-modbus component folder: /home/azhu/ESP32/hello_world/managed_components/espressif__esp-modbus.
-- git rev-parse returned 'fatal: 不是 git 仓库(或者任何父目录):.git'
ESP Insights Project commit: HEAD-HASH-NOTFOUND
-- git rev-parse returned 'fatal: 不是 git 仓库(或者任何父目录):.git'
ESP RainMaker Project commit: HEAD-HASH-NOTFOUND
-- Components: app_trace app_update bootloader bootloader_support bt chmorgan__esp-libhelix-mp3 cmock console cxx driver efuse esp-tls esp_adc esp_app_format esp_coex esp_common esp_eth esp_event esp_gdbstub esp_hid esp_http_client esp_http_server esp_https_ota esp_https_server esp_hw_support esp_lcd esp_local_ctrl esp_mm esp_netif esp_netif_stack esp_partition esp_phy esp_pm esp_psram esp_ringbuf esp_rom esp_system esp_timer esp_wifi espcoredump espressif__arduino-esp32 espressif__cbor espressif__esp-dsp espressif__esp-modbus espressif__esp-serial-flasher espressif__esp-zboss-lib espressif__esp-zigbee-lib espressif__esp_diag_data_store espressif__esp_diagnostics espressif__esp_insights espressif__esp_modem espressif__esp_rainmaker espressif__esp_rcp_update espressif__esp_schedule espressif__esp_secure_cert_mgr espressif__jsmn espressif__json_generator espressif__json_parser espressif__libsodium espressif__mdns espressif__network_provisioning espressif__qrcode espressif__rmaker_common esptool_py fatfs freertos hal heap http_parser idf_test ieee802154 joltwallet__littlefs json log lwip main mbedtls mqtt newlib nvs_flash openthread partition_table perfmon protobuf-c protocomm pthread sdmmc soc spi_flash spiffs tcp_transport ulp unity usb vfs wear_levelling wifi_provisioning wpa_supplicant xtensa
-- Component paths: /home/azhu/esp/v5.1/esp-idf/components/app_trace /home/azhu/esp/v5.1/esp-idf/components/app_update /home/azhu/esp/v5.1/esp-idf/components/bootloader /home/azhu/esp/v5.1/esp-idf/components/bootloader_support /home/azhu/esp/v5.1/esp-idf/components/bt /home/azhu/ESP32/hello_world/managed_components/chmorgan__esp-libhelix-mp3 /home/azhu/esp/v5.1/esp-idf/components/cmock /home/azhu/esp/v5.1/esp-idf/components/console /home/azhu/esp/v5.1/esp-idf/components/cxx /home/azhu/esp/v5.1/esp-idf/components/driver /home/azhu/esp/v5.1/esp-idf/components/efuse /home/azhu/esp/v5.1/esp-idf/components/esp-tls /home/azhu/esp/v5.1/esp-idf/components/esp_adc /home/azhu/esp/v5.1/esp-idf/components/esp_app_format /home/azhu/esp/v5.1/esp-idf/components/esp_coex /home/azhu/esp/v5.1/esp-idf/components/esp_common /home/azhu/esp/v5.1/esp-idf/components/esp_eth /home/azhu/esp/v5.1/esp-idf/components/esp_event /home/azhu/esp/v5.1/esp-idf/components/esp_gdbstub /home/azhu/esp/v5.1/esp-idf/components/esp_hid /home/azhu/esp/v5.1/esp-idf/components/esp_http_client /home/azhu/esp/v5.1/esp-idf/components/esp_http_server /home/azhu/esp/v5.1/esp-idf/components/esp_https_ota /home/azhu/esp/v5.1/esp-idf/components/esp_https_server /home/azhu/esp/v5.1/esp-idf/components/esp_hw_support /home/azhu/esp/v5.1/esp-idf/components/esp_lcd /home/azhu/esp/v5.1/esp-idf/components/esp_local_ctrl /home/azhu/esp/v5.1/esp-idf/components/esp_mm /home/azhu/esp/v5.1/esp-idf/components/esp_netif /home/azhu/esp/v5.1/esp-idf/components/esp_netif_stack /home/azhu/esp/v5.1/esp-idf/components/esp_partition /home/azhu/esp/v5.1/esp-idf/components/esp_phy /home/azhu/esp/v5.1/esp-idf/components/esp_pm /home/azhu/esp/v5.1/esp-idf/components/esp_psram /home/azhu/esp/v5.1/esp-idf/components/esp_ringbuf /home/azhu/esp/v5.1/esp-idf/components/esp_rom /home/azhu/esp/v5.1/esp-idf/components/esp_system /home/azhu/esp/v5.1/esp-idf/components/esp_timer /home/azhu/esp/v5.1/esp-idf/components/esp_wifi /home/azhu/esp/v5.1/esp-idf/components/espcoredump /home/azhu/ESP32/hello_world/managed_components/espressif__arduino-esp32 /home/azhu/ESP32/hello_world/managed_components/espressif__cbor /home/azhu/ESP32/hello_world/managed_components/espressif__esp-dsp /home/azhu/ESP32/hello_world/managed_components/espressif__esp-modbus /home/azhu/ESP32/hello_world/managed_components/espressif__esp-serial-flasher /home/azhu/ESP32/hello_world/managed_components/espressif__esp-zboss-lib /home/azhu/ESP32/hello_world/managed_components/espressif__esp-zigbee-lib /home/azhu/ESP32/hello_world/managed_components/espressif__esp_diag_data_store /home/azhu/ESP32/hello_world/managed_components/espressif__esp_diagnostics /home/azhu/ESP32/hello_world/managed_components/espressif__esp_insights /home/azhu/ESP32/hello_world/managed_components/espressif__esp_modem /home/azhu/ESP32/hello_world/managed_components/espressif__esp_rainmaker /home/azhu/ESP32/hello_world/managed_components/espressif__esp_rcp_update /home/azhu/ESP32/hello_world/managed_components/espressif__esp_schedule /home/azhu/ESP32/hello_world/managed_components/espressif__esp_secure_cert_mgr /home/azhu/ESP32/hello_world/managed_components/espressif__jsmn /home/azhu/ESP32/hello_world/managed_components/espressif__json_generator /home/azhu/ESP32/hello_world/managed_components/espressif__json_parser /home/azhu/ESP32/hello_world/managed_components/espressif__libsodium /home/azhu/ESP32/hello_world/managed_components/espressif__mdns /home/azhu/ESP32/hello_world/managed_components/espressif__network_provisioning /home/azhu/ESP32/hello_world/managed_components/espressif__qrcode /home/azhu/ESP32/hello_world/managed_components/espressif__rmaker_common /home/azhu/esp/v5.1/esp-idf/components/esptool_py /home/azhu/esp/v5.1/esp-idf/components/fatfs /home/azhu/esp/v5.1/esp-idf/components/freertos /home/azhu/esp/v5.1/esp-idf/components/hal /home/azhu/esp/v5.1/esp-idf/components/heap /home/azhu/esp/v5.1/esp-idf/components/http_parser /home/azhu/esp/v5.1/esp-idf/components/idf_test /home/azhu/esp/v5.1/esp-idf/components/ieee802154 /home/azhu/ESP32/hello_world/managed_components/joltwallet__littlefs /home/azhu/esp/v5.1/esp-idf/components/json /home/azhu/esp/v5.1/esp-idf/components/log /home/azhu/esp/v5.1/esp-idf/components/lwip /home/azhu/ESP32/hello_world/main /home/azhu/esp/v5.1/esp-idf/components/mbedtls /home/azhu/esp/v5.1/esp-idf/components/mqtt /home/azhu/esp/v5.1/esp-idf/components/newlib /home/azhu/esp/v5.1/esp-idf/components/nvs_flash /home/azhu/esp/v5.1/esp-idf/components/openthread /home/azhu/esp/v5.1/esp-idf/components/partition_table /home/azhu/esp/v5.1/esp-idf/components/perfmon /home/azhu/esp/v5.1/esp-idf/components/protobuf-c /home/azhu/esp/v5.1/esp-idf/components/protocomm /home/azhu/esp/v5.1/esp-idf/components/pthread /home/azhu/esp/v5.1/esp-idf/components/sdmmc /home/azhu/esp/v5.1/esp-idf/components/soc /home/azhu/esp/v5.1/esp-idf/components/spi_flash /home/azhu/esp/v5.1/esp-idf/components/spiffs /home/azhu/esp/v5.1/esp-idf/components/tcp_transport /home/azhu/esp/v5.1/esp-idf/components/ulp /home/azhu/esp/v5.1/esp-idf/components/unity /home/azhu/esp/v5.1/esp-idf/components/usb /home/azhu/esp/v5.1/esp-idf/components/vfs /home/azhu/esp/v5.1/esp-idf/components/wear_levelling /home/azhu/esp/v5.1/esp-idf/components/wifi_provisioning /home/azhu/esp/v5.1/esp-idf/components/wpa_supplicant /home/azhu/esp/v5.1/esp-idf/components/xtensa
-- Configuring done
-- Generating done
-- Build files have been written to: /home/azhu/ESP32/hello_world/build
* 正在执行任务: ninja
[11/1555] Generating ../../partition_table/partition-table.bin
Partition table binary generated. Contents:
*******************************************************************************
# ESP-IDF Partition Table
# Name, Type, SubType, Offset, Size, Flags
nvs,data,nvs,0x9000,24K,
phy_init,data,phy,0xf000,4K,
factory,app,factory,0x10000,1M,
*******************************************************************************
[383/1555] Performing configure step for 'bootloader'
-- Found Git: /usr/bin/git (found version "2.34.1")
-- The C compiler identification is GNU 12.2.0
-- The CXX compiler identification is GNU 12.2.0
-- The ASM compiler identification is GNU
-- Found assembler: /home/azhu/.espressif/tools/xtensa-esp32-elf/esp-12.2.0_20230208/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /home/azhu/.espressif/tools/xtensa-esp32-elf/esp-12.2.0_20230208/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /home/azhu/.espressif/tools/xtensa-esp32-elf/esp-12.2.0_20230208/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Building ESP-IDF components for target esp32
-- Project sdkconfig file /home/azhu/ESP32/hello_world/sdkconfig
Compiler supported targets: xtensa-esp32-elf
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of time_t
-- Check size of time_t - done
-- Adding linker script /home/azhu/esp/v5.1/esp-idf/components/soc/esp32/ld/esp32.peripherals.ld
-- App "bootloader" version: v5.1.5-346-g41a885bb2d
-- Adding linker script /home/azhu/esp/v5.1/esp-idf/components/esp_rom/esp32/ld/esp32.rom.ld
-- Adding linker script /home/azhu/esp/v5.1/esp-idf/components/esp_rom/esp32/ld/esp32.rom.api.ld
-- Adding linker script /home/azhu/esp/v5.1/esp-idf/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld
-- Adding linker script /home/azhu/esp/v5.1/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld
-- Adding linker script /home/azhu/esp/v5.1/esp-idf/components/bootloader/subproject/main/ld/esp32/bootloader.ld
-- Adding linker script /home/azhu/esp/v5.1/esp-idf/components/bootloader/subproject/main/ld/esp32/bootloader.rom.ld
-- Components: bootloader bootloader_support efuse esp_app_format esp_common esp_hw_support esp_rom esp_system esptool_py freertos hal log main micro-ecc newlib partition_table soc spi_flash xtensa
-- Component paths: /home/azhu/esp/v5.1/esp-idf/components/bootloader /home/azhu/esp/v5.1/esp-idf/components/bootloader_support /home/azhu/esp/v5.1/esp-idf/components/efuse /home/azhu/esp/v5.1/esp-idf/components/esp_app_format /home/azhu/esp/v5.1/esp-idf/components/esp_common /home/azhu/esp/v5.1/esp-idf/components/esp_hw_support /home/azhu/esp/v5.1/esp-idf/components/esp_rom /home/azhu/esp/v5.1/esp-idf/components/esp_system /home/azhu/esp/v5.1/esp-idf/components/esptool_py /home/azhu/esp/v5.1/esp-idf/components/freertos /home/azhu/esp/v5.1/esp-idf/components/hal /home/azhu/esp/v5.1/esp-idf/components/log /home/azhu/esp/v5.1/esp-idf/components/bootloader/subproject/main /home/azhu/esp/v5.1/esp-idf/components/bootloader/subproject/components/micro-ecc /home/azhu/esp/v5.1/esp-idf/components/newlib /home/azhu/esp/v5.1/esp-idf/components/partition_table /home/azhu/esp/v5.1/esp-idf/components/soc /home/azhu/esp/v5.1/esp-idf/components/spi_flash /home/azhu/esp/v5.1/esp-idf/components/xtensa
-- Configuring done
-- Generating done
-- Build files have been written to: /home/azhu/ESP32/hello_world/build/bootloader
[391/1555] Performing build step for 'bootloader'
[1/105] Generating project_elf_src_esp32.c
[2/105] Building C object esp-idf/xtensa/CMakeFiles/__idf_xtensa.dir/eri.c.obj
[3/105] Building C object CMakeFiles/bootloader.elf.dir/project_elf_src_esp32.c.obj
[4/105] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/dport_access_common.c.obj
[5/105] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/interrupts.c.obj
[6/105] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/gpio_periph.c.obj
[7/105] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/lldesc.c.obj
[8/105] Building C object esp-idf/xtensa/CMakeFiles/__idf_xtensa.dir/xt_trax.c.obj
[9/105] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/dport_access.c.obj
[10/105] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/adc_periph.c.obj
[11/105] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/uart_periph.c.obj
[12/105] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/sdm_periph.c.obj
[13/105] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/ledc_periph.c.obj
[14/105] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/pcnt_periph.c.obj
[15/105] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/rmt_periph.c.obj
[16/105] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/spi_periph.c.obj
[17/105] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/timer_periph.c.obj
[18/105] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/i2c_periph.c.obj
[19/105] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/lcd_periph.c.obj
[20/105] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/i2s_periph.c.obj
[21/105] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/sdmmc_periph.c.obj
[22/105] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/mcpwm_periph.c.obj
[23/105] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/twai_periph.c.obj
[24/105] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/touch_sensor_periph.c.obj
[25/105] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/rtc_io_periph.c.obj
[26/105] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/dac_periph.c.obj
[27/105] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/sdio_slave_periph.c.obj
[28/105] Building C object esp-idf/hal/CMakeFiles/__idf_hal.dir/mpu_hal.c.obj
[29/105] Building C object esp-idf/hal/CMakeFiles/__idf_hal.dir/efuse_hal.c.obj
[30/105] Building C object esp-idf/hal/CMakeFiles/__idf_hal.dir/esp32/efuse_hal.c.obj
[31/105] Building C object esp-idf/hal/CMakeFiles/__idf_hal.dir/esp32/cache_hal_esp32.c.obj
[32/105] Building C object esp-idf/spi_flash/CMakeFiles/__idf_spi_flash.dir/spi_flash_wrap.c.obj
[33/105] Building C object esp-idf/esp_app_format/CMakeFiles/__idf_esp_app_format.dir/esp_app_desc.c.obj
[34/105] Building C object esp-idf/hal/CMakeFiles/__idf_hal.dir/wdt_hal_iram.c.obj
[35/105] Building C object esp-idf/hal/CMakeFiles/__idf_hal.dir/mmu_hal.c.obj
[36/105] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_mem.c.obj
[37/105] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_random.c.obj
[38/105] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_common_loader.c.obj
[39/105] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_common.c.obj
[40/105] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_clock_init.c.obj
[41/105] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_efuse.c.obj
[42/105] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_random_esp32.c.obj
[43/105] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/secure_boot.c.obj
[44/105] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/bootloader_flash/src/flash_qio_mode.c.obj
[45/105] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/flash_encrypt.c.obj
[46/105] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/flash_partitions.c.obj
[47/105] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/bootloader_flash/src/bootloader_flash_config_esp32.c.obj
[48/105] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_clock_loader.c.obj
[49/105] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/bootloader_flash/src/bootloader_flash.c.obj
[50/105] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_init.c.obj
[51/105] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_console_loader.c.obj
[52/105] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/esp32/bootloader_soc.c.obj
[53/105] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_console.c.obj
[54/105] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/esp32/bootloader_sha.c.obj
[55/105] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/esp32/esp_efuse_table.c.obj
[56/105] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_panic.c.obj
[57/105] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_utility.c.obj
[58/105] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/esp32/bootloader_esp32.c.obj
[59/105] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/esp32/esp_efuse_fields.c.obj
[60/105] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/esp32/esp_efuse_utility.c.obj
[61/105] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/src/esp_efuse_api.c.obj
[62/105] Building C object esp-idf/micro-ecc/CMakeFiles/__idf_micro-ecc.dir/uECC_verify_antifault.c.obj
[63/105] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/src/esp_efuse_fields.c.obj
[64/105] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/esp_image_format.c.obj
[65/105] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/src/esp_efuse_utility.c.obj
[66/105] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/esp_memory_utils.c.obj
[67/105] Building C object esp-idf/esp_system/CMakeFiles/__idf_esp_system.dir/esp_err.c.obj
[68/105] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/port/esp32/esp_cpu_intr.c.obj
[69/105] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/cpu.c.obj
[70/105] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/src/efuse_controller/keys/without_key_purposes/three_key_blocks/esp_efuse_api_key.c.obj
[71/105] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/port/esp32/cpu_region_protect.c.obj
[72/105] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/port/esp32/rtc_clk_init.c.obj
[73/105] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/port/esp32/chip_info.c.obj
[74/105] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/port/esp32/rtc_time.c.obj
[75/105] Building C object esp-idf/esp_rom/CMakeFiles/__idf_esp_rom.dir/patches/esp_rom_crc.c.obj
[76/105] Building C object esp-idf/esp_rom/CMakeFiles/__idf_esp_rom.dir/patches/esp_rom_sys.c.obj
[77/105] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/port/esp32/rtc_clk.c.obj
[78/105] Building C object esp-idf/esp_rom/CMakeFiles/__idf_esp_rom.dir/patches/esp_rom_efuse.c.obj
[79/105] Building C object esp-idf/esp_common/CMakeFiles/__idf_esp_common.dir/src/esp_err_to_name.c.obj
[80/105] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/port/esp32/rtc_sleep.c.obj
[81/105] Building ASM object esp-idf/esp_rom/CMakeFiles/__idf_esp_rom.dir/patches/esp_rom_longjmp.S.obj
[82/105] Building C object esp-idf/esp_rom/CMakeFiles/__idf_esp_rom.dir/patches/esp_rom_uart.c.obj
[83/105] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/port/esp32/rtc_init.c.obj
[84/105] Building C object esp-idf/log/CMakeFiles/__idf_log.dir/log.c.obj
[85/105] Building C object esp-idf/log/CMakeFiles/__idf_log.dir/log_buffers.c.obj
[86/105] Building C object esp-idf/log/CMakeFiles/__idf_log.dir/log_noos.c.obj
[87/105] Building C object esp-idf/main/CMakeFiles/__idf_main.dir/bootloader_start.c.obj
[88/105] Linking C static library esp-idf/log/liblog.a
[89/105] Building C object esp-idf/esp_rom/CMakeFiles/__idf_esp_rom.dir/patches/esp_rom_spiflash.c.obj
[90/105] Linking C static library esp-idf/esp_rom/libesp_rom.a
[91/105] Linking C static library esp-idf/esp_common/libesp_common.a
[92/105] Linking C static library esp-idf/esp_hw_support/libesp_hw_support.a
[93/105] Linking C static library esp-idf/esp_system/libesp_system.a
[94/105] Linking C static library esp-idf/efuse/libefuse.a
[95/105] Linking C static library esp-idf/bootloader_support/libbootloader_support.a
[96/105] Linking C static library esp-idf/esp_app_format/libesp_app_format.a
[97/105] Linking C static library esp-idf/spi_flash/libspi_flash.a
[98/105] Linking C static library esp-idf/hal/libhal.a
[99/105] Linking C static library esp-idf/micro-ecc/libmicro-ecc.a
[100/105] Linking C static library esp-idf/soc/libsoc.a
[101/105] Linking C static library esp-idf/xtensa/libxtensa.a
[102/105] Linking C static library esp-idf/main/libmain.a
[103/105] Linking C executable bootloader.elf
[104/105] Generating binary image from built executable
esptool.py v4.7.0
Creating esp32 image...
Merged 1 ELF section
Successfully created esp32 image.
Generated /home/azhu/ESP32/hello_world/build/bootloader/bootloader.bin
[105/105] cd /home/azhu/ESP32/hello_world/build/bootloader/esp-idf/esptool_py && /home/azhu/.espressif/python_env/idf5.1_py3.10_env/bin/python /home/azhu/esp/v5.1/esp-idf/components/partition_table/check_sizes.py --offset 0x8000 bootloader 0x1000 /home/azhu/ESP32/hello_world/build/bootloader/bootloader.bin
Bootloader binary size 0x6870 bytes. 0x790 bytes (7%) free.
[1468/1555] Building CXX object esp-id...dir/libraries/Ethernet/src/ETH.cpp.obj
/home/azhu/ESP32/hello_world/managed_components/espressif__arduino-esp32/libraries/Ethernet/src/ETH.cpp: In member function 'void ETHClass::end()':
/home/azhu/ESP32/hello_world/managed_components/espressif__arduino-esp32/libraries/Ethernet/src/ETH.cpp:836:22: warning: 'void NetworkEvents::removeEvent(NetworkEventFuncCb, arduino_event_id_t)' is deprecated: removing functional callbacks via pointer is deprecated, use removeEvent(network_event_handle_t) instead [-Wdeprecated-declarations]
836 | Network.removeEvent(onEthConnected, ARDUINO_EVENT_ETH_CONNECTED);
| ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/azhu/ESP32/hello_world/managed_components/espressif__arduino-esp32/libraries/Network/src/Network.h:9,
from /home/azhu/ESP32/hello_world/managed_components/espressif__arduino-esp32/libraries/Ethernet/src/ETH.h:67,
from /home/azhu/ESP32/hello_world/managed_components/espressif__arduino-esp32/libraries/Ethernet/src/ETH.cpp:24:
/home/azhu/ESP32/hello_world/managed_components/espressif__arduino-esp32/libraries/Network/src/NetworkEvents.h:193:8: note: declared here
193 | void removeEvent(NetworkEventFuncCb cbEvent, arduino_event_id_t event = ARDUINO_EVENT_MAX)
| ^~~~~~~~~~~
[1472/1555] Building CXX object esp-id...ries/Network/src/NetworkEvents.cpp.obj
* 正在执行任务: /home/azhu/.espressif/python_env/idf5.1_py3.10_env/bin/python /home/azhu/esp/v5.1/esp-idf/tools/idf_size.py /home/azhu/ESP32/hello_world/build/main.map
Total sizes:
Used static DRAM: 12328 bytes ( 168408 remain, 6.8% used)
.data size: 8872 bytes
.bss size: 3456 bytes
Used static IRAM: 55586 bytes ( 75486 remain, 42.4% used)
.text size: 54559 bytes
.vectors size: 1027 bytes
Used Flash size : 190563 bytes
.text: 137223 bytes
.rodata: 53084 bytes
Total image size: 255021 bytes (.bin may be padded larger)
sudo chmod 777 /dev/ttyUSB0
ESP-IDF->Flash Device
ESP-IDF->Monitor Device,可以看到程序已运行
export IDF_PATH='/home/azhu/esp/v5.1/esp-idf'
'/home/azhu/.espressif/python_env/idf5.1_py3.10_env/bin/python' '/home/azhu/esp/v5.1/esp-idf/tools/idf_monitor.py' -p /dev/ttyUSB0 -b 115200 --toolchain-prefix xtensa-esp32-elf- --target esp32 '/home/azhu/ESP32/hello_world/build/main.elf'
azhu@azhu:~/ESP32/hello_world$ export IDF_PATH='/home/azhu/esp/v5.1/esp-idf'
azhu@azhu:~/ESP32/hello_world$ '/home/azhu/.espressif/python_env/idf5.1_py3.10_env/bin/python' '/home/azhu/esp/v5.1/esp-idf/tools/idf_monitor.py' -p /dev/ttyUSB0 -b 115200 --toolchain-prefix xtensa-esp32-elf- --target esp32 '/home/azhu/ESP32/hello_world/build/main.elf'
--- esp-idf-monitor 1.5.0 on /dev/ttyUSB0 115200
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H
ets Jul 29 2019 12:21:46
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:7128
load:0x40078000,len:15624
load:0x40080400,len:4
--- 0x40080400: _init at ??:?
load:0x40080404,len:3876
entry 0x4008064c
I (29) boot: ESP-IDF v5.1.5-346-g41a885bb2d 2nd stage bootloader
I (29) boot: compile time Dec 22 2024 14:02:35
I (31) boot: Multicore bootloader
I (35) boot: chip revision: v3.0
I (39) boot.esp32: SPI Speed : 40MHz
I (43) boot.esp32: SPI Mode : DIO
I (48) boot.esp32: SPI Flash Size : 2MB
I (52) boot: Enabling RNG early entropy source...
I (58) boot: Partition Table:
I (61) boot: ## Label Usage Type ST Offset Length
I (69) boot: 0 nvs WiFi data 01 02 00009000 00006000
I (76) boot: 1 phy_init RF data 01 01 0000f000 00001000
I (84) boot: 2 factory factory app 00 00 00010000 00100000
I (91) boot: End of partition table
I (95) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=0d05ch ( 53340) map
I (123) esp_image: segment 1: paddr=0001d084 vaddr=3ffb0000 size=022a8h ( 8872) load
I (127) esp_image: segment 2: paddr=0001f334 vaddr=40080000 size=00ce4h ( 3300) load
I (130) esp_image: segment 3: paddr=00020020 vaddr=400d0020 size=21808h (137224) map
I (187) esp_image: segment 4: paddr=00041830 vaddr=40080ce4 size=0cc40h ( 52288) load
I (216) boot: Loaded app from partition at offset 0x10000
I (216) boot: Disabling RNG early entropy source...
I (227) cpu_start: Multicore app
I (228) cpu_start: Pro cpu up.
I (228) cpu_start: Starting app cpu, entry point is 0x40081314
--- 0x40081314: call_start_cpu1 at /home/azhu/esp/v5.1/esp-idf/components/esp_system/port/cpu_start.c:160
I (0) cpu_start: App cpu up.
I (246) cpu_start: Pro cpu start user code
I (246) cpu_start: cpu freq: 160000000 Hz
I (246) cpu_start: Application information:
I (250) cpu_start: Project name: main
I (255) cpu_start: App version: 1
I (260) cpu_start: Compile time: Dec 22 2024 14:01:53
I (266) cpu_start: ELF file SHA256: c141562c46e2dcf5...
I (272) cpu_start: ESP-IDF: v5.1.5-346-g41a885bb2d
I (278) cpu_start: Min chip rev: v0.0
I (283) cpu_start: Max chip rev: v3.99
I (287) cpu_start: Chip rev: v3.0
I (292) heap_init: Initializing. RAM available for dynamic allocation:
I (299) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (305) heap_init: At 3FFB3028 len 0002CFD8 (179 KiB): DRAM
I (312) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (318) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (324) heap_init: At 4008D924 len 000126DC (73 KiB): IRAM
I (332) spi_flash: detected chip: gd
I (335) spi_flash: flash io: dio
W (339) spi_flash: Detected size(4096k) larger than the size in the binary image header(2048k). Using the size in the binary image header.
I (353) app_start: Starting scheduler on CPU0
I (357) app_start: Starting scheduler on CPU1
I (357) main_task: Started on CPU0
I (367) main_task: Calling app_main()
I (402) main_tasHello world!
Hello world!
Hello world!
Hello world!
====================================================
如果不是从Arduino组件的example处创建项目,而是从Create project using template arduino-as-component,结果是
回到已打开的ESP-IDF Setup窗口,点New Project
在上方选择要使用的esp-idf版本,参考如下配置
点Choose Template
点arduino-as-component
点 Create project using template arduino-as-component,然后打开
都同意
main.c
#include "Arduino.h"
extern "C" void app_main()
{
initArduino();
pinMode(4, OUTPUT);
digitalWrite(4, HIGH);
// Do your own thing
}
编译报错:
/home/azhu/ESP32/hello/main/main.cpp:1:10: fatal error: Arduino.h: No such file or directory
1 | #include "Arduino.h"
| ^~~~~~~~~~~
compilation terminated.
[888/896] Building C object esp-idf/wifi_provisioning/CMakeFiles/__idf_wifi_provisioning.dir/proto-c/wifi_scan.pb-c.c.obj
ninja: build stopped: subcommand failed.
* 终端进程“ninja”已终止,退出代码: 1。
把idf_component.yml复制过去,能编译通过,如果遇到 loading 'build.ninja': No such file or directory,把build删除,重新编译
结果
~/ESP32/test$ export IDF_PATH='/home/azhu/esp/v5.1/esp-idf'
'/home/azhu/.espressif/python_env/idf5.1_py3.10_env/bin/python' '/home/azhu/esp/v5.1/esp-idf/tools/idf_monitor.py' -p /dev/ttyUSB0 -b 115200 --toolchaazhu@azhu:~/ESP32/test$ '/home/azhu/.espressif/python_env/idf5.1_py3.10_env/bin/python' '/home/azhu/esp/v5.1/esp-idf/tools/idf_monitor.py' -p /dev/ttyUSB0 -b 115200 --toolchain-prefix xtensa-esp32-elf- --target esp32 '/home/azhu/ESP32/test/build/test.elf'
--- esp-idf-monitor 1.5.0 on /dev/ttyUSB0 115200
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H
ets Jul 29 2019 12:21:46
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:7128
load:0x40078000,len:15624
load:0x40080400,len:4
--- 0x40080400: _init at ??:?
load:0x40080404,len:3876
entry 0x4008064c
I (29) boot: ESP-IDF v5.1.5-346-g41a885bb2d 2nd stage bootloader
I (29) boot: compile time Dec 22 2024 15:52:47
I (31) boot: Multicore bootloader
I (35) boot: chip revision: v3.0
I (39) boot.esp32: SPI Speed : 40MHz
I (43) boot.esp32: SPI Mode : DIO
I (48) boot.esp32: SPI Flash Size : 2MB
I (52) boot: Enabling RNG early entropy source...
I (58) boot: Partition Table:
I (61) boot: ## Label Usage Type ST Offset Length
I (69) boot: 0 nvs WiFi data 01 02 00009000 00006000
I (76) boot: 1 phy_init RF data 01 01 0000f000 00001000
I (84) boot: 2 factory factory app 00 00 00010000 00100000
I (91) boot: End of partition table
I (95) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=0ae7ch ( 44668) map
I (120) esp_image: segment 1: paddr=0001aea4 vaddr=3ffb0000 size=02248h ( 8776) load
I (124) esp_image: segment 2: paddr=0001d0f4 vaddr=40080000 size=02f24h ( 12068) load
I (131) esp_image: segment 3: paddr=00020020 vaddr=400d0020 size=1c4d4h (115924) map
I (176) esp_image: segment 4: paddr=0003c4fc vaddr=40082f24 size=09944h ( 39236) load
I (199) boot: Loaded app from partition at offset 0x10000
I (199) boot: Disabling RNG early entropy source...
I (211) cpu_start: Multicore app
I (212) cpu_start: Pro cpu up.
I (212) cpu_start: Starting app cpu, entry point is 0x40081214
--- 0x40081214: call_start_cpu1 at /home/azhu/esp/v5.1/esp-idf/components/esp_system/port/cpu_start.c:160
I (0) cpu_start: App cpu up.
I (229) cpu_start: Pro cpu start user code
I (229) cpu_start: cpu freq: 160000000 Hz
I (229) cpu_start: Application information:
I (234) cpu_start: Project name: test
I (238) cpu_start: App version: 1
I (243) cpu_start: Compile time: Dec 22 2024 15:52:20
I (249) cpu_start: ELF file SHA256: efb2693f840b4213...
I (255) cpu_start: ESP-IDF: v5.1.5-346-g41a885bb2d
I (261) cpu_start: Min chip rev: v0.0
I (266) cpu_start: Max chip rev: v3.99
I (271) cpu_start: Chip rev: v3.0
I (276) heap_init: Initializing. RAM available for dynamic allocation:
I (283) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (289) heap_init: At 3FFB2EB8 len 0002D148 (180 KiB): DRAM
I (295) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (301) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (308) heap_init: At 4008C868 len 00013798 (77 KiB): IRAM
I (315) spi_flash: detected chip: gd
I (318) spi_flash: flash io: dio
W (322) spi_flash: Detected size(4096k) larger than the size in the binary image header(2048k). Using the size in the binary image header.
I (336) app_start: Starting scheduler on CPU0
I (340) app_start: Starting scheduler on CPU1
I (340) main_task: Started on CPU0
I (350) main_task: Calling app_main()
I (385) gpio: GPIO[4]| InputEn: 1| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (386) main_task: Returned from app_main()