esp32 IDF自定义安装路径
export IDF_TOOLS_PATH=$HOME/git/esp-idf4.3
export IDF_GITHUB_ASSETS=“dl.espressif.com/github_assets”
./install.sh
esp32 编译命令
idf.py set-target esp32 //根据实际设备型号
idf.py menuconfig
idf.py build
esp32 烧录和监控命令
idf.py -p /dev/ttyUSB0 flash
idf.py -p /dev/ttyUSB0 monitor
clear && idf.py -p /dev/ttyUSB0 flash monitor
clear && idf.py -p /dev/ttyUSB0 app-flash monitor
idf.py -p /dev/ttyUSB0 app monitor
esp32 自定义烧录
$IDF_PATH/components/esptool_py/esptool/esptool.py -p /dev/ttyUSB0 -b 460800 --before default_reset --after hard_reset --chip esp32 write_flash --flash_mode dio --flash_size detect --flash_freq 40m 0x1000 build/bootloader/bootloader.bin 0x8000 build/partition_table/partition-table.bin 0x11000 build/ota_data_initial.bin 0x20000 build/esp-uart.bin 0x360000 testq6bc.bin
esp32 生成固件bin
$IDF_PATH/components/nvs_flash/nvs_partition_generator/nvs_partition_gen.py generate test.csv test1.bin 0x4000
esp32 生成spiffs固件bin并烧录
$IDF_PATH/components/spiffs/spiffsgen.py 0x4000 spiffs_image spiffs.bin
$IDF_PATH/components/esptool_py/esptool/esptool.py -p /dev/ttyUSB0 -b 460800 --before default_reset --after hard_reset --chip esp32 write_flash --flash_mode dio --flash_size detect --flash_freq 40m 0x1000 build/bootloader/bootloader.bin 0x8000 build/partition_table/partition-table.bin 0x11000 build/ota_data_initial.bin 0x20000 build/esp-uart.bin 0x364000 spiffs.bin