0%

ESP32模块验证实例

Arduino支持

ESP32-CAM

ESP8266

安装esp-idf设置编译环境

  • 安装系统依赖库
1
~$ apt-get install dfu-util cmake ninja-build -y
  • 安装esp-idf源码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
~$ git clone https://github.com/espressif/esp-idf
~$ cd esp-idf
~$ git submodule update --init --recursive
~$ ./install.sh
~$ source export.sh
esp-idf$ source export.sh
Setting IDF_PATH to '/fullpath//github/espressif/esp-idf'
Detecting the Python interpreter
Checking "python3" ...
Python 3.11.3
"python3" has been detected
Checking Python compatibility
Checking other ESP-IDF version.
ERROR: tool xtensa-esp-elf-gdb has no installed versions. Please run '/home/michael/.pyenv/versions/3.11.3/bin/python3 /fullpath//github/espressif/esp-idf/tools/idf_tools.py install' to install it.
ERROR: tool riscv32-esp-elf-gdb has no installed versions. Please run '/home/michael/.pyenv/versions/3.11.3/bin/python3 /fullpath//github/espressif/esp-idf/tools/idf_tools.py install' to install it.
ERROR: tool xtensa-esp-elf has no installed versions. Please run '/home/michael/.pyenv/versions/3.11.3/bin/python3 /fullpath//github/espressif/esp-idf/tools/idf_tools.py install' to install it.
ERROR: tool riscv32-esp-elf has no installed versions. Please run '/home/michael/.pyenv/versions/3.11.3/bin/python3 /fullpath//github/espressif/esp-idf/tools/idf_tools.py install' to install it.
ERROR: tool esp32ulp-elf has no installed versions. Please run '/home/michael/.pyenv/versions/3.11.3/bin/python3 /fullpath//github/espressif/esp-idf/tools/idf_tools.py install' to install it.
ERROR: tool openocd-esp32 has no installed versions. Please run '/home/michael/.pyenv/versions/3.11.3/bin/python3 /fullpath//github/espressif/esp-idf/tools/idf_tools.py install' to install it.
An unsupported version of tool openocd-esp32 was found in PATH: unknown. To use it, run '/home/michael/.pyenv/versions/3.11.3/bin/python3 /fullpath//github/espressif/esp-idf/tools/idf_tools.py export --prefer-system'
ERROR: tool esp-rom-elfs has no installed versions. Please run '/home/michael/.pyenv/versions/3.11.3/bin/python3 /fullpath//github/espressif/esp-idf/tools/idf_tools.py install' to install it.
  • maunal run it again
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
~$ /home/michael/.pyenv/versions/3.11.3/bin/python3 /fullpath//github/espressif/esp-idf/tools/idf_tools.py install

Updating /home/michael/.espressif/idf-env.json
Selected targets are: esp32c6, esp32c2, esp32p4, esp32, esp32s3, esp32h2, esp32c3, esp32s2
Current system platform: linux-amd64
Installing tools: xtensa-esp-elf-gdb, riscv32-esp-elf-gdb, xtensa-esp-elf, riscv32-esp-elf, esp32ulp-elf, openocd-esp32, esp-rom-elfs
Installing xtensa-esp-elf-gdb@12.1_20221002
Downloading https://github.com/espressif/binutils-gdb/releases/download/esp-gdb-v12.1_20221002/xtensa-esp-elf-gdb-12.1_20221002-x86_64-linux-gnu.tar.gz
Destination: /home/michael/.espressif/dist/xtensa-esp-elf-gdb-12.1_20221002-x86_64-linux-gnu.tar.gz.tmp
Done
Extracting /home/michael/.espressif/dist/xtensa-esp-elf-gdb-12.1_20221002-x86_64-linux-gnu.tar.gz to /home/michael/.espressif/tools/xtensa-esp-elf-gdb/12.1_20221002
Installing riscv32-esp-elf-gdb@12.1_20221002
Downloading https://github.com/espressif/binutils-gdb/releases/download/esp-gdb-v12.1_20221002/riscv32-esp-elf-gdb-12.1_20221002-x86_64-linux-gnu.tar.gz
Destination: /home/michael/.espressif/dist/riscv32-esp-elf-gdb-12.1_20221002-x86_64-linux-gnu.tar.gz.tmp
Done
Extracting /home/michael/.espressif/dist/riscv32-esp-elf-gdb-12.1_20221002-x86_64-linux-gnu.tar.gz to /home/michael/.espressif/tools/riscv32-esp-elf-gdb/12.1_20221002
Installing xtensa-esp-elf@esp-13.2.0_20230928
Downloading https://github.com/espressif/crosstool-NG/releases/download/esp-13.2.0_20230928/xtensa-esp-elf-13.2.0_20230928-x86_64-linux-gnu.tar.xz
Destination: /home/michael/.espressif/dist/xtensa-esp-elf-13.2.0_20230928-x86_64-linux-gnu.tar.xz.tmp
Done
Extracting /home/michael/.espressif/dist/xtensa-esp-elf-13.2.0_20230928-x86_64-linux-gnu.tar.xz to /home/michael/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928
Installing riscv32-esp-elf@esp-13.2.0_20230928
Downloading https://github.com/espressif/crosstool-NG/releases/download/esp-13.2.0_20230928/riscv32-esp-elf-13.2.0_20230928-x86_64-linux-gnu.tar.xz
Destination: /home/michael/.espressif/dist/riscv32-esp-elf-13.2.0_20230928-x86_64-linux-gnu.tar.xz.tmp
Done
Extracting /home/michael/.espressif/dist/riscv32-esp-elf-13.2.0_20230928-x86_64-linux-gnu.tar.xz to /home/michael/.espressif/tools/riscv32-esp-elf/esp-13.2.0_20230928
Installing esp32ulp-elf@2.35_20220830
Downloading https://github.com/espressif/binutils-gdb/releases/download/esp32ulp-elf-v2.35_20220830/esp32ulp-elf-2.35_20220830-linux-amd64.tar.gz
Destination: /home/michael/.espressif/dist/esp32ulp-elf-2.35_20220830-linux-amd64.tar.gz.tmp
Done
Extracting /home/michael/.espressif/dist/esp32ulp-elf-2.35_20220830-linux-amd64.tar.gz to /home/michael/.espressif/tools/esp32ulp-elf/2.35_20220830
Installing openocd-esp32@v0.12.0-esp32-20230921
Downloading https://github.com/espressif/openocd-esp32/releases/download/v0.12.0-esp32-20230921/openocd-esp32-linux-amd64-0.12.0-esp32-20230921.tar.gz
Destination: /home/michael/.espressif/dist/openocd-esp32-linux-amd64-0.12.0-esp32-20230921.tar.gz.tmp
Done
Extracting /home/michael/.espressif/dist/openocd-esp32-linux-amd64-0.12.0-esp32-20230921.tar.gz to /home/michael/.espressif/tools/openocd-esp32/v0.12.0-esp32-20230921
Installing esp-rom-elfs@20230320
Downloading https://github.com/espressif/esp-rom-elfs/releases/download/20230320/esp-rom-elfs-20230320.tar.gz
Destination: /home/michael/.espressif/dist/esp-rom-elfs-20230320.tar.gz.tmp
Done
Extracting /home/michael/.espressif/dist/esp-rom-elfs-20230320.tar.gz to /home/michael/.espressif/tools/esp-rom-elfs/20230320

  • 提示错误
1
2
3
~ esp-idf$ source export.sh
ERROR: /home/michael/.espressif/python_env/idf5.2_py3.11_env/bin/python doesn't exist! Please run the install script or "idf_tools.py install-python-env" in order to create it

1
2
~ esp-idf$ idf_tools.py install-python-env
~ esp-idf$ ls ~/.espressif/python_env/idf5.2_py3.11_env/bin/

HelTec WiFi_LoRa_32_V3

缺少依赖库报错

RadioLib

1
2
3
4
 #include <RadioLib.h>
^~~~~~~~~~~~
compilation terminated.
*** [.pio/build/heltec_wifi_lora_32/src/src/Radio/Radio.o] Error 1
  • 安装RadioLib by Jan Gromes,在PIO Home -> Libraries -> Registry选择合适的版本,Add to Project. 详情描述如下:
1
2
RadioLib by Jan Gromeš
Universal wireless communication library. User-friendly library for sub-GHz radio modules (SX1278, RF69, CC1101, SX1268, and many others), as well as ham radio digital modes (RTTY, SSTV, AX.25 etc.).

NTPClient

1
2
3
4
5
6
7
8
   #warning "God mode active, I hope it was intentional. Buckle up, lads."
^~~~~~~
In file included from /fullpath//github/tinyGS/tinyGS/tinyGS.ino:79:
lib/ESPNtpClient/src/ESPNtpClient.h:29:10: fatal error: include/time.h: No such file or directory
#include "include/time.h"
^~~~~~~~~~~~~~~~
compilation terminated.
*** [.pio/build/heltec_wifi_lora_32/src/tinyGS.ino.cpp.o] Error 1
  • 去掉头文件里的#include "include/time.h".

Error: Unknown board ID ‘heltec_wifi_lora_32_V3’

  • 需要更新平台的库文件
1
~$ pio pkg update -g -p espressif32

ESP32-WROOM-32U

安装esp-idf开发环境

  • 这里按官方文档把它clone在用户目录下。这里示例只安装支持esp32所需要的环境支持。
1
2
3
4
5
~$ cd $HOME/
~$ git clone https://github.com/espressif/esp-idf
~$ cd esp-idf
~$ git submodule update --init --recursive
~$ ./install.sh esp32
  • 添加一个别名命令,用来加载esp-idf的开发环境。
1
~$ echo "alias get_idf='. $HOME/esp-idf/export.sh'" >> ~/.bashrc

编译安装示例工程

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
~$ cd esp-idf/examples/zigbee/esp_zigbee_gateway
~ esp-idf/examples/zigbee/esp_zigbee_gateway$ get_idf
~ esp-idf/examples/zigbee/esp_zigbee_gateway$ idf.py set-target esp32
dding "set-target"'s dependency "fullclean" to list of commands with default set of options.
Executing action: fullclean
Build directory '/fullpath//github/espressif/esp-idf/examples/zigbee/esp_zigbee_gateway/build' not found. Nothing to clean.
Executing action: set-target
Set Target to: esp32, new sdkconfig will be created.
Running cmake in directory /fullpath//github/espressif/esp-idf/examples/zigbee/esp_zigbee_gateway/build
Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DPYTHON=/home/michael/.espressif/python_env/idf5.2_py3.11_env/bin/python -DESP_PLATFORM=1 -DIDF_TARGET=esp32 -DCCACHE_ENABLE=0 /fullpath//github/espressif/esp-idf/examples/zigbee/esp_zigbee_gateway"...
-- Found Git: /bin/git (found version "2.39.2")
-- The C compiler identification is GNU 13.2.0
-- The CXX compiler identification is GNU 13.2.0
-- The ASM compiler identification is GNU
-- Found assembler: /home/michael/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-gcc
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /home/michael/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-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/michael/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Building ESP-IDF components for target esp32
Dependencies lock doesn't exist, solving dependencies.
Using component placed at /fullpath//github/espressif/esp-idf/examples/common_components/protocol_examples_common for dependency protocol_examples_common(*), specified in /fullpath//github/espressif/esp-idf/examples/zigbee/esp_zigbee_gateway/main/idf_component.yml
.....Updating lock file at /fullpath//github/espressif/esp-idf/examples/zigbee/esp_zigbee_gateway/dependencies.lock
Processing 4 dependencies:
[1/4] espressif/esp-zboss-lib (0.7.2)
[2/4] espressif/esp-zigbee-lib (0.9.5)
[3/4] idf (5.2.0)
[4/4] protocol_examples_common (*)
[....]
  • 菜单配置,会出现一个TUI(Text-based user interface)的配置菜单,与u-boot,buildroot,kernel所用的配置是一样的。
1
~ esp-idf/examples/zigbee/esp_zigbee_gateway$ idf.py menuconfig
  • 编译工程
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
esp-idf/examples/zigbee/esp_zigbee_gateway$ idf.py build
Executing action: all (aliases: build)
Running ninja in directory /fullpath/github/espressif/esp-idf/examples/zigbee/esp_zigbee_gateway/build
Executing "ninja all"...
[0/1] Re-running CMake...
-- Building ESP-IDF components for target esp32
Processing 4 dependencies:
[4/4] protocol_examples_common (*)
-- Project sdkconfig file /fullpath/github/espressif/esp-idf/examples/zigbee/esp_zigbee_gateway/sdkconfig
Loading defaults file /fullpath/github/espressif/esp-idf/examples/zigbee/esp_zigbee_gateway/sdkconfig.defaults...
-- Compiler supported targets: xtensa-esp-elf
-- App "esp_zigbee_gateway" version: v5.2-dev-3775-gb4268c874a
-- Adding linker script /fullpath/github/espressif/esp-idf/examples/zigbee/esp_zigbee_gateway/build/esp-idf/esp_system/ld/memory.ld
-- Adding linker script /fullpath/github/espressif/esp-idf/components/esp_system/ld/esp32/sections.ld.in
-- Adding linker script /fullpath/github/espressif/esp-idf/components/esp_rom/esp32/ld/esp32.rom.ld
-- Adding linker script /fullpath/github/espressif/esp-idf/components/esp_rom/esp32/ld/esp32.rom.api.ld
-- Adding linker script /fullpath/github/espressif/esp-idf/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld
-- Adding linker script /fullpath/github/espressif/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-data.ld
-- Adding linker script /fullpath/github/espressif/esp-idf/components/esp_rom/esp32/ld/esp32.rom.syscalls.ld
-- Adding linker script /fullpath/github/espressif/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld
-- Adding linker script /fullpath/github/espressif/esp-idf/components/soc/esp32/ld/esp32.peripherals.ld
[...]
[19/917] 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,1150K,
zb_storage,data,fat,0x130000,16K,
zb_fct,data,fat,0x134000,1K,
*******************************************************************************
[...]
Project build complete. To flash, run:
idf.py flash
or
idf.py -p PORT flash
or
python -m esptool --chip esp32 -b 460800 --before default_reset --after hard_reset write_flash --flash_mode dio --flash_size 2MB --flash_freq 40m 0x1000 build/bootloader/bootloader.bin 0x8000 build/partition_table/partition-table.bin 0x10000 build/esp_zigbee_gateway.bin
or from the "/fullpath/github/espressif/esp-idf/examples/zigbee/esp_zigbee_gateway/build" directory
python -m esptool --chip esp32 -b 460800 --before default_reset --after hard_reset write_flash "@flash_args"

  • 烧写工程到目标板子
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
~ esp-idf/examples/zigbee/esp_zigbee_gateway$ idf flash
idf.py flash
Executing action: flash
Serial port /dev/ttyUSB1
Connecting....
Detecting chip type... Unsupported detection protocol, switching and trying again...
Connecting....
Detecting chip type... ESP32
Running ninja in directory /fullpath/github/espressif/esp-idf/examples/zigbee/esp_zigbee_gateway/build
Executing "ninja flash"...
[1/5] cd /fullpath/github/espressif/esp-idf/examples/zigbee/esp_zigbee_gateway/build/esp-idf/esptool_...in /fullpath/github/espressif/esp-idf/examples/zigbee/esp_zigbee_gateway/build/esp_zigbee_gateway.bin
esp_zigbee_gateway.bin binary size 0xfd270 bytes. Smallest app partition is 0x11f800 bytes. 0x22590 bytes (12%) free.
[1/1] cd /fullpath/github/espressif/esp-idf/examples/zigbee/esp_zigbee_gateway/build/bootloader/esp-i.../fullpath/github/espressif/esp-idf/examples/zigbee/esp_zigbee_gateway/build/bootloader/bootloader.bin
Bootloader binary size 0x6810 bytes. 0x7f0 bytes (7%) free.
[4/5] cd /fullpath/github/espressif/esp-idf/components/esptool_py && /usr/bin/cmake -D IDF_PATH=/home...igbee_gateway/build -P /fullpath/github/espressif/esp-idf/components/esptool_py/run_serial_tool.cmake
esptool.py --chip esp32 -p /dev/ttyUSB1 -b 460800 --before=default_reset --after=hard_reset write_flash --flash_mode dio --flash_freq 40m --flash_size 2MB 0x1000 bootloader/bootloader.bin 0x10000 esp_zigbee_gateway.bin 0x8000 partition_table/partition-table.bin
esptool.py v4.7.dev2
Serial port /dev/ttyUSB1
Connecting....
Chip is ESP32-D0WDQ6-V3 (revision v3.0)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 78:21:84:9c:16:a0
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Flash will be erased from 0x00001000 to 0x00007fff...
Flash will be erased from 0x00010000 to 0x0010dfff...
Flash will be erased from 0x00008000 to 0x00008fff...
Compressed 26640 bytes to 16335...
Writing at 0x00001000... (100 %)
Wrote 26640 bytes (16335 compressed) at 0x00001000 in 0.7 seconds (effective 313.8 kbit/s)...
Hash of data verified.
Compressed 1036912 bytes to 664903...
Writing at 0x00109d51... (100 %)
Wrote 1036912 bytes (664903 compressed) at 0x00010000 in 15.2 seconds (effective 546.5 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 137...
Writing at 0x00008000... (100 %)
Wrote 3072 bytes (137 compressed) at 0x00008000 in 0.1 seconds (effective 310.6 kbit/s)...
Hash of data verified.

Leaving...lsus
Hard resetting via RTS pin...
Done

  • 通过串口查看设备详情
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
esp-idf/examples/zigbee/esp_zigbee_gateway$ idf.py -p /dev/ttyUSB1 monitor
Executing action: monitor
Running idf_monitor in directory /fullpath/github/espressif/esp-idf/examples/zigbee/esp_zigbee_gateway
Executing "/home/michael/.espressif/python_env/idf5.2_py3.11_env/bin/python /fullpath/github/espressif/esp-idf/tools/idf_monitor.py -p /dev/ttyUSB1 -b 115200 --toolchain-prefix xtensa-esp32-elf- --target esp32 --revision 0 /fullpath/github/espressif/esp-idf/examples/zigbee/esp_zigbee_gateway/build/esp_zigbee_gateway.elf -m '/home/michael/.espressif/python_env/idf5.2_py3.11_env/bin/python' '/fullpath/github/espressif/esp-idf/tools/idf.py' '-p' '/dev/ttyUSB1'"...
--- esp-idf-monitor 1.3.3 on /dev/ttyUSB1 115200 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
a72d4...
ts 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:7140
load:0x40078000,len:15500
load:0x40080400,len:4
0x40080400: _init at ??:?

load:0x40080404,len:3904
entry 0x40080640
I (29) boot: ESP-IDF v5.2-dev-3775-gb4268c874a 2nd stage bootloader
I (29) boot: compile time Nov 1 2023 15:52:14
I (31) boot: Multicore bootloader
I (35) boot: chip revision: v3.0
I (39) boot.esp32: SPI Speed : 40MHz
I (44) boot.esp32: SPI Mode : DIO
I (48) boot.esp32: SPI Flash Size : 2MB
I (53) boot: Enabling RNG early entropy source...
I (58) boot: Partition Table:
I (62) 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 0011f800
I (91) boot: 3 zb_storage Unknown data 01 81 00130000 00004000
I (99) boot: 4 zb_fct Unknown data 01 81 00134000 00000400
[....]

TFT_eSPI测试ILI9341 2.8inch LCD

  • 测试SPI接口屏,打开~/Arduino/libraries/TFT_eSPI/User_Setups/Setup42_ILI9341_ESP32.h,定义连接如下:
1
2
3
4
5
6
7
8
9

#define ILI9341_DRIVER

#define TFT_MISO 21 // (leave TFT SDO disconnected if other SPI devices share MISO)
#define TFT_MOSI 19
#define TFT_SCLK 18
#define TFT_CS 15 // Chip select control pin
#define TFT_DC 2 // Data Command control pin
#define TFT_RST 4 // Reset pin (could connect to RST pin)
  • 再打开~/Arduino/libraries/TFT_eSPI/User_Setups/User_Setup_Select.h,只打开上面这一个文件的注释。
1
2
3
[...]
#include <User_Setups/Setup42_ILI9341_ESP32.h>
[...]
  • Arduino IDE内选择:DOIT ESP32 DEVKIT Board V1. Tools -> Boards -> ESP32 Arduino -> DOIT ESP32 DEVKIT Board V1.

lv_port_esp32测试ILI9341 2.8inch LCD

  • lv_port_esp32长时间没有更新了,目前只支持ESP-IDF 4.x,LVGL 7.x
1
2
3
git clone --recurse-submodules https://github.com/lvgl/lv_port_esp32.git
cd lv_port_esp32 && idf.py menuconfig

  • 通过menuconfig -> Component config -> LVGL TFT Display controller -> Display Pin Assignments 配置管脚如下:
1
2
3
4
5
6
7
8
9
10
(23) GPIO for MOSI (Master Out Slave In)
[ ] GPIO for MISO (Master In Slave Out)
(18) GPIO for CLK (SCK / Serial Clock)
[*] Use CS signal to control the display
(5) GPIO for CS (Slave Select)
[*] Use DC signal to control the display
(2) GPIO for DC (Data / Command)
(4) GPIO for Reset
[ ] Enable control of the display backlight by using an GPIO.

  • 上面是使用了板子VSPI定义管脚。在menuconfig -> Component config -> lv_example_configuration里,可以配置测试的参数。

错误

  • 通过串口发现,不断重复输出如下的信息,烧写其它程序后也是如此。经排查后发现,GPIO12连接到某个外设上面,导致的结果。先断开GPIO12的连接,再烧写其它的程序,就能正常使用了。
1
2
3
4
5
6
7
8
9
10
rst:0x10 (RTCWDT_RTC_RESET),boot:0x33 (SPI_FAST_FLASH_BOOT)
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
ets Jul 29 2019 12:21:46
[...]
  • 编译缺少组件,可以把缺少的组使用git submodule add方式下载到IDF的目录下,也可以使用idf.py add-dependency "xxxx"方式加入到本工程依赖库里。
1
2
3
4
5
6
7
8
9
[1/1] idf (4.4.6)
CMake Error at ~/espressif/esp-idf-v4.4.6/tools/cmake/build.cmake:201 (message):
Failed to resolve component 'lvgl'.
Call Stack (most recent call first):
~/espressif/esp-idf-v4.4.6/tools/cmake/build.cmake:241 (__build_resolve_and_add_req)
~/espressif/esp-idf-v4.4.6/tools/cmake/build.cmake:518 (__build_expand_requirements)
~/espressif/esp-idf-v4.4.6/tools/cmake/project.cmake:476 (idf_build_process)
CMakeLists.txt:6 (project)

CC1101测试

esp-hosted使用

esp-camera

1
2
3
4
5
6
I (472) cam_hal: Allocating 153600 Byte frame buffer in PSRAM
E (479) cam_hal: cam_dma_config(300): frame buffer malloc failed
E (485) cam_hal: cam_config(384): cam_dma_config failed
E (491) camera: Camera config failed with error 0xffffffff
E (497) example:take_picture: Camera Init Failed
I (502) main_task: Returned from app_main()

谢谢支持

  • 微信二维码: