ESP-32
download esp-idf, the git download is too slow, you can download and install from https://npm.taobao.org/mirrors/git-for-windows/
UART to development board: 15200-8-1-N
build & flash & monitor:
idf.py build
idf.py -p COMx flash
idf.py -p COMX monitor
winpty: command not found” error, fix it by pacman -S winpty
The UART is not found or there is not a new device in your device manager, which means you have the calbe problem, replace it. There are lots of cable which only have the power line without the data line.
NOTE: Using the cable with data function and not only power charge.
install the driver of cp211x if needed (actully, the driver exists in my system)
1. make ( your cp210x driver )
2. cp cp210x.ko to /lib/modules/<kernel-version>/kernel/drivers/usb/serial 3. insmod /lib/modules/<kernel-version/kernel/drivers/usb/serial/usbserial.ko 4. insmod cp210x.ko
python工具包:在\esp\esp-idf目录下的requirements.txt文件中,特别注意离线安装情况下需要
click>=5.0
pyserial>=3.0
future>=0.15.2
cryptography>=2.1.4
pyparsing>=2.0.3,<2.4.0
pyelftools>=0.22
以及 windows-curses
:most of components are can by pip install xxxx to install it, except the indows-curses
: that is too bad, the windows-curses is not always wrong when run install.bat and export.bat. you can go to ${IDF_PATH}/tools/kconfig_new/esp-windows-curses folder to install python setup.py install
VS code to support auto navigation
c_cpp_properties.json at workspace folder
{ "configurations": [ { "name": "Win32", "includePath": [ "${workspaceFolder}/**", "C:/Users/Administrator/esp-idf/components", "C:/Users/Administrator/esp-idf/components/esp_common/include", "C:/Users/Administrator/esp-idf/components/newlib/platform_include", "C:/Users/Administrator/esp-idf/components/esp32/include", "C:/Users/Administrator/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/xtensa-esp32-elf/include", "C:/Users/Administrator/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/lib/gcc/xtensa-esp32-elf/8.4.0/include", "C:/Users/Administrator/esp-idf/components/driver/include", "C:/Users/Administrator/esp-idf/components/bt/include", "C:/Users/Administrator/esp-idf/components/soc/esp32/include", "C:/Users/Administrator/esp-idf/components/freertos/include", "C:/Users/Administrator/esp-idf/components/bt/host/bluedroid/api/include/api", "${workspaceFolder}/build/config", "C:/Users/Administrator/esp-idf/components/log/include", "C:/Users/Administrator/esp-idf/components/heap/include", "C:/Users/Administrator/esp-idf/components/soc/include", "C:/Users/Administrator/esp-idf/components/spi_flash/include", "C:/Users/Administrator/esp-idf/components/tcpip_adapter/include", "C:/Users/Administrator/esp-idf/components/lwip/include/", "C:/Users/Administrator/esp-idf/components/lwip/port", "C:/Users/Administrator/esp-idf/components/vfs/include", "C:/Users/Administrator/esp-idf/components/nvs_flash/include", "C:/Users/Administrator/esp-idf/components/newlib/platform_include", "C:/Users/Administrator/esp-idf/components/mbedtls/mbedtls/include", "C:/Users/Administrator/esp-idf/components/json/cJSON", "C:/Users/Administrator/esp-idf/components/wpa_supplicant/port/include" ], "defines": [ "_DEBUG", "UNICODE", "_UNICODE" ], "cStandard": "c17", "cppStandard": "c++17", "intelliSenseMode": "msvc-x64" } ], "version": 4 }
#ADC
fatal error: esp_adc_cal.h: No such file or directory
solution: in CMakeLists.txt idf_component_register add REQUIRS "esp_adc_cal"
BLE Notify
https://github.com/Smartphone-Companions/ESP32-ANCS-Notifications
https://www.esp32.com/viewtopic.php?f=13&t=11228&p=45738&hilit=ble+notify#p45738
https://github.com/espressif/esp-idf/blob/master/examples/bluetooth/bluedroid/ble/gatt_server_service_table/tutorial/Gatt_Server_Service_Table_Example_Walkthrough.md
https://github.com/espressif/esp-idf/issues/3102
about the low power mode and wakeup
https://github.com/espressif/esp-iot-solution