本文主要是介绍鹏程万里------esp32 helloword编译和烧录,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
首先桌面上有一个
然后点击进去后,
到这个helloword的目录下
然后编译
然后烧录
C:\Users\56855\Desktop\esp-idf-5\examples\get-started\hello_world>idf.py -p COM18 flash
Checking Python dependencies...
Python requirements from C:\Users\56855\Desktop\esp-idf-5\requirements.txt are satisfied.
Adding flash's dependency "all" to list of actions
Executing action: all (aliases: build)
Running ninja in directory c:\users\56855\desktop\esp-idf-5\examples\get-started\hello_world\build
Executing "ninja all"...
[0/1] Re-running CMake...
-- mconf-idf version mconf-v4.6.0.0-idf-20190628-win32
-- ccache will be used for faster recompilation
-- Project version: v4.0.1-dirty
-- Building ESP-IDF components for target esp32
-- Could NOT find Perl (missing: PERL_EXECUTABLE)
-- Adding linker script C:/Users/56855/Desktop/esp-idf-5/examples/get-started/hello_world/build/esp-idf/esp32/esp32_out.ld
-- Adding linker script C:/Users/56855/Desktop/esp-idf-5/components/esp32/ld/esp32.project.ld.in
-- Adding linker script C:/Users/56855/Desktop/esp-idf-5/components/esp32/ld/esp32.peripherals.ld
-- Adding linker script C:/Users/56855/Desktop/esp-idf-5/components/esp_rom/esp32/ld/esp32.rom.ld
-- Adding linker script C:/Users/56855/Desktop/esp-idf-5/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld
-- Adding linker script C:/Users/56855/Desktop/esp-idf-5/components/esp_rom/esp32/ld/esp32.rom.syscalls.ld
-- Adding linker script C:/Users/56855/Desktop/esp-idf-5/components/esp_rom/esp32/ld/esp32.rom.newlib-data.ld
-- Adding linker script C:/Users/56855/Desktop/esp-idf-5/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld
-- Components: app_trace app_update asio bootloader bootloader_support bt coap console cxx driver efuse esp-tls esp32 esp_adc_cal esp_common esp_eth esp_event esp_gdbstub esp_http_client esp_http_server esp_https_ota esp_https_server esp_local_ctrl esp_ringbuf esp_rom esp_websocket_client esp_wifi espcoredump esptool_py expat fatfs freemodbus freertos heap idf_test jsmn json libsodium log lwip main mbedtls mdns mqtt newlib nghttp nvs_flash openssl partition_table protobuf-c protocomm pthread sdmmc soc spi_flash spiffs tcp_transport tcpip_adapter ulp unity vfs wear_levelling wifi_provisioning wpa_supplicant xtensa
-- Component paths: C:/Users/56855/Desktop/esp-idf-5/components/app_trace C:/Users/56855/Desktop/esp-idf-5/components/app_update C:/Users/56855/Desktop/esp-idf-5/components/asio C:/Users/56855/Desktop/esp-idf-5/components/bootloader C:/Users/56855/Desktop/esp-idf-5/components/bootloader_support C:/Users/56855/Desktop/esp-idf-5/components/bt C:/Users/56855/Desktop/esp-idf-5/components/coap C:/Users/56855/Desktop/esp-idf-5/components/console C:/Users/56855/Desktop/esp-idf-5/components/cxx C:/Users/56855/Desktop/esp-idf-5/components/driver C:/Users/56855/Desktop/esp-idf-5/components/efuse C:/Users/56855/Desktop/esp-idf-5/components/esp-tls C:/Users/56855/Desktop/esp-idf-5/components/esp32 C:/Users/56855/Desktop/esp-idf-5/components/esp_adc_cal C:/Users/56855/Desktop/esp-idf-5/components/esp_common C:/Users/56855/Desktop/esp-idf-5/components/esp_eth C:/Users/56855/Desktop/esp-idf-5/components/esp_event C:/Users/56855/Desktop/esp-idf-5/components/esp_gdbstub C:/Users/56855/Desktop/esp-idf-5/components/esp_http_client C:/Users/56855/Desktop/esp-idf-5/components/esp_http_server C:/Users/56855/Desktop/esp-idf-5/components/esp_https_ota C:/Users/56855/Desktop/esp-idf-5/components/esp_https_server C:/Users/56855/Desktop/esp-idf-5/components/esp_local_ctrl C:/Users/56855/Desktop/esp-idf-5/components/esp_ringbuf C:/Users/56855/Desktop/esp-idf-5/components/esp_rom C:/Users/56855/Desktop/esp-idf-5/components/esp_websocket_client C:/Users/56855/Desktop/esp-idf-5/components/esp_wifi C:/Users/56855/Desktop/esp-idf-5/components/espcoredump C:/Users/56855/Desktop/esp-idf-5/components/esptool_py C:/Users/56855/Desktop/esp-idf-5/components/expat C:/Users/56855/Desktop/esp-idf-5/components/fatfs C:/Users/56855/Desktop/esp-idf-5/components/freemodbus C:/Users/56855/Desktop/esp-idf-5/components/freertos C:/Users/56855/Desktop/esp-idf-5/components/heap C:/Users/56855/Desktop/esp-idf-5/components/idf_test C:/Users/56855/Desktop/esp-idf-5/components/jsmn C:/Users/56855/Desktop/esp-idf-5/components/json C:/Users/56855/Desktop/esp-idf-5/components/libsodium C:/Users/56855/Desktop/esp-idf-5/components/log C:/Users/56855/Desktop/esp-idf-5/components/lwip C:/Users/56855/Desktop/esp-idf-5/examples/get-started/hello_world/main C:/Users/56855/Desktop/esp-idf-5/components/mbedtls C:/Users/56855/Desktop/esp-idf-5/components/mdns C:/Users/56855/Desktop/esp-idf-5/components/mqtt C:/Users/56855/Desktop/esp-idf-5/components/newlib C:/Users/56855/Desktop/esp-idf-5/components/nghttp C:/Users/56855/Desktop/esp-idf-5/components/nvs_flash C:/Users/56855/Desktop/esp-idf-5/components/openssl C:/Users/56855/Desktop/esp-idf-5/components/partition_table C:/Users/56855/Desktop/esp-idf-5/components/protobuf-c C:/Users/56855/Desktop/esp-idf-5/components/protocomm C:/Users/56855/Desktop/esp-idf-5/components/pthread C:/Users/56855/Desktop/esp-idf-5/components/sdmmc C:/Users/56855/Desktop/esp-idf-5/components/soc C:/Users/56855/Desktop/esp-idf-5/components/spi_flash C:/Users/56855/Desktop/esp-idf-5/components/spiffs C:/Users/56855/Desktop/esp-idf-5/components/tcp_transport C:/Users/56855/Desktop/esp-idf-5/components/tcpip_adapter C:/Users/56855/Desktop/esp-idf-5/components/ulp C:/Users/56855/Desktop/esp-idf-5/components/unity C:/Users/56855/Desktop/esp-idf-5/components/vfs C:/Users/56855/Desktop/esp-idf-5/components/wear_levelling C:/Users/56855/Desktop/esp-idf-5/components/wifi_provisioning C:/Users/56855/Desktop/esp-idf-5/components/wpa_supplicant C:/Users/56855/Desktop/esp-idf-5/components/xtensa
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/56855/Desktop/esp-idf-5/examples/get-started/hello_world/build
[1/7] cmd.exe /C "cd /D C:\Users\56855\Desktop\esp-idf-5\examples\get-started\hello_world\bui....exe -E echo *******************************************************************************"
Partition table binary generated. Contents:
*******************************************************************************
# Espressif ESP32 Partition Table
# Name, Type, SubType, Offset, Size, Flags
nvs,data,nvs,0x9000,24K,
phy_init,data,phy,0xf000,4K,
factory,app,factory,0x10000,1M,
*******************************************************************************
[4/7] Generating binary image from built executable
esptool.py v2.8
Generated C:/Users/56855/Desktop/esp-idf-5/examples/get-started/hello_world/build/hello-world.bin
[5/7] Performing build step for 'bootloader'
[0/1] Re-running CMake...
-- mconf-idf version mconf-v4.6.0.0-idf-20190628-win32
-- Project version: v4.0.1-dirty
-- Building ESP-IDF components for target esp32
-- Adding linker script C:/Users/56855/Desktop/esp-idf-5/components/esp32/ld/esp32.peripherals.ld
-- Adding linker script C:/Users/56855/Desktop/esp-idf-5/components/esp_rom/esp32/ld/esp32.rom.ld
-- Adding linker script C:/Users/56855/Desktop/esp-idf-5/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld
-- Adding linker script C:/Users/56855/Desktop/esp-idf-5/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld
-- Adding linker script C:/Users/56855/Desktop/esp-idf-5/components/bootloader/subproject/main/esp32.bootloader.ld
-- Adding linker script C:/Users/56855/Desktop/esp-idf-5/components/bootloader/subproject/main/esp32.bootloader.rom.ld
-- Components: bootloader bootloader_support efuse esp32 esp_common esp_rom esptool_py log main micro-ecc partition_table soc spi_flash xtensa
-- Component paths: C:/Users/56855/Desktop/esp-idf-5/components/bootloader C:/Users/56855/Desktop/esp-idf-5/components/bootloader_support C:/Users/56855/Desktop/esp-idf-5/components/efuse C:/Users/56855/Desktop/esp-idf-5/components/esp32 C:/Users/56855/Desktop/esp-idf-5/components/esp_common C:/Users/56855/Desktop/esp-idf-5/components/esp_rom C:/Users/56855/Desktop/esp-idf-5/components/esptool_py C:/Users/56855/Desktop/esp-idf-5/components/log C:/Users/56855/Desktop/esp-idf-5/components/bootloader/subproject/main C:/Users/56855/Desktop/esp-idf-5/components/bootloader/subproject/components/micro-ecc C:/Users/56855/Desktop/esp-idf-5/components/partition_table C:/Users/56855/Desktop/esp-idf-5/components/soc C:/Users/56855/Desktop/esp-idf-5/components/spi_flash C:/Users/56855/Desktop/esp-idf-5/components/xtensa
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/56855/Desktop/esp-idf-5/examples/get-started/hello_world/build/bootloader
ninja: no work to do.
Executing action: flash
Running esptool.py in directory c:\users\56855\desktop\esp-idf-5\examples\get-started\hello_world\build
Executing "D:\ESP-IDF\.espressif\python_env\idf4.0_py3.6_env\Scripts\python.exe C:\Users\56855\Desktop\esp-idf-5\components/esptool_py/esptool/esptool.py -p COM18 -b 460800 --before default_reset --after hard_reset write_flash @flash_project_args"...
esptool.py -p COM18 -b 460800 --before default_reset --after hard_reset write_flash --flash_mode dio --flash_freq 40m --flash_size 2MB 0x8000 partition_table/partition-table.bin 0x1000 bootloader/bootloader.bin 0x10000 hello-world.bin
esptool.py v2.8
Serial port COM18
Connecting....
Detecting chip type... ESP32
Chip is ESP32D0WDQ5 (revision 1)
Features: WiFi, BT, Single Core, Coding Scheme None
Crystal is 40MHz
MAC: 24:0a:c4:85:cd:d0
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Compressed 3072 bytes to 103...
Wrote 3072 bytes (103 compressed) at 0x00008000 in 0.0 seconds (effective 2240.6 kbit/s)...
Hash of data verified.
Compressed 25392 bytes to 14962...
Wrote 25392 bytes (14962 compressed) at 0x00001000 in 0.3 seconds (effective 596.8 kbit/s)...
Hash of data verified.
Compressed 147936 bytes to 76863...
Wrote 147936 bytes (76863 compressed) at 0x00010000 in 1.7 seconds (effective 677.4 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting via RTS pin...
Done
烧录后看idf.py -p COM18 monitor发现出错了,提示说如果您使用的是 ESP32-DevKitC(板载 ESP32-SOLO-1 模组),请在烧写示例程序前,前往 menuconfig
中使能单核模式(CONFIG_FREERTOS_UNICORE)。
于是去
idf.py menuconfig搜这个CONFIG_FREERTOS_UNICORE
然后到
去选中这个only on first core,按下空格选中,如果取消就再按空格键
然后编译后烧录即可
解锁了esp32的helloword
这篇关于鹏程万里------esp32 helloword编译和烧录的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!