【DigiKey“智造万物,快乐不停”创意大赛】bbb 扩展版的 ESP32-C3 识别了
[复制链接]
为了让 bbb 具有无线联网能力,我设计 bbb RMP 扩展板的时候给配了一个 ESP32-C3 的模块,前段时间因为时间紧任务中,这部分开发暂时搁置了,只是初步测试了下 esp32 没有识别,还以为是我用热风枪将 esp32 给吹坏了,今天又将这部分拿出来分析下,发现可能是我用的 USB 转 Micro USB 的线的问题,我更换了一个当时银行网银盾的 USB 线.
竟然就好了,可以识别到 ESP32-C3 了开心哦。
esp32 的开发环境根据这个连接(因为我在笔记本上用的是 Linux 操作系统)进行就可以:
Standard Toolchain Setup for Linux and macOS
烧录 hello world 程序,使用下述命令:
Running stub... [2/231]
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Flash will be erased from 0x00000000 to 0x00005fff...
Flash will be erased from 0x00010000 to 0x0003dfff...
Flash will be erased from 0x00008000 to 0x00008fff...
Compressed 20848 bytes to 12764...
Writing at 0x00000000... (100 %)
Wrote 20848 bytes (12764 compressed) at 0x00000000 in 0.3 seconds (effective 650.5 kbit/s)...
Hash of data verified.
Compressed 184576 bytes to 97021...
Writing at 0x000367fc... (100 %)
Wrote 184576 bytes (97021 compressed) at 0x00010000 in 1.5 seconds (effective 1012.7 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 103...
Writing at 0x00008000... (100 %)
Wrote 3072 bytes (103 compressed) at 0x00008000 in 0.0 seconds (effective 692.2 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting via RTS pin...
Executing action: monitor
Running idf_monitor in directory /home/red/Projects/bbb_debuger/esp/hello_world
Executing "/home/red/.espressif/python_env/idf5.3_py3.11_env/bin/python /home/red/Projects/bbb_debuger/esp/esp-idf/tools/idf_monitor.py -p /dev/ttyACM0 -b 115200 --toolchain-
prefix riscv32-esp-elf- --target esp32c3 --revision 3 --decode-panic backtrace /home/red/Projects/bbb_debuger/esp/hello_world/build/hello_world.elf -m '/home/red/.espressif/p
ython_env/idf5.3_py3.11_env/bin/python' '/home/red/Projects/bbb_debuger/esp/esp-idf/tools/idf.py' '-p' '/dev/ttyACM0'"...
--- esp-idf-monitor 1.3.4 on /dev/ttyACM0 115200 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
ESP-ROM:esp32c3-api1-20210207
Build:Feb 7 2021
rst:0x15 (USB_UART_CHIP_RESET),boot:0x5 (DOWNLOAD(USB/UART0/1))
Saved PC:0x400462e2
0x400462e2: ets_delay_us in ROM
waiting for download
Done
查看打印信息使用如下命令
```
ESP-ROM:esp32c3-api1-20210207
Build:Feb 7 2021
rst:0xc (RTC_SW_CPU_RST),boot:0xd (SPI_FAST_FLASH_BOOT)
Saved PC:0x40380746
0x40380746: esp_restart_noos at /home/red/Projects/bbb_debuger/esp/esp-idf/components/esp_system/port/soc/esp32c3/system_internal.c:111
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd5820,len:0x1738
load:0x403cc710,len:0xb9c
load:0x403ce710,len:0x2e40
entry 0x403cc71a
I (24) boot: ESP-IDF v5.3-dev-1353-gb3f7e2c8a4 2nd stage bootloader
I (24) boot: compile time Jan 12 2024 13:29:12
I (25) boot: chip revision: v0.4
I (28) boot.esp32c3: SPI Speed : 80MHz
I (33) boot.esp32c3: SPI Mode : DIO
I (38) boot.esp32c3: SPI Flash Size : 2MB
I (43) boot: Enabling RNG early entropy source...
I (48) boot: Partition Table:
I (52) boot: ## Label Usage Type ST Offset Length
I (59) boot: 0 nvs WiFi data 01 02 00009000 00006000
I (66) boot: 1 phy_init RF data 01 01 0000f000 00001000
I (74) boot: 2 factory factory app 00 00 00010000 00100000
I (81) boot: End of partition table
I (86) esp_image: segment 0: paddr=00010020 vaddr=3c020020 size=09e98h ( 40600) map
I (100) esp_image: segment 1: paddr=00019ec0 vaddr=3fc8b000 size=01294h ( 4756) load
I (103) esp_image: segment 2: paddr=0001b15c vaddr=40380000 size=04ebch ( 20156) load
I (115) esp_image: segment 3: paddr=00020020 vaddr=42000020 size=170f0h ( 94448) map
I (134) esp_image: segment 4: paddr=00037118 vaddr=40384ebc size=05fc0h ( 24512) load
I (142) boot: Loaded app from partition at offset 0x10000
I (143) boot: Disabling RNG early entropy source...
I (154) cpu_start: Unicore app
I (163) cpu_start: Pro cpu start user code
I (163) cpu_start: cpu freq: 160000000 Hz
I (163) cpu_start: Application information:
I (166) cpu_start: Project name: hello_world
I (171) cpu_start: App version: 87f9c0e-dirty
I (177) cpu_start: Compile time: Jan 15 2024 21:41:48
I (183) cpu_start: ELF file SHA256: 729c774c0...
I (188) cpu_start: ESP-IDF: v5.3-dev-1353-gb3f7e2c8a4
I (195) cpu_start: Min chip rev: v0.3
I (199) cpu_start: Max chip rev: v1.99
I (204) cpu_start: Chip rev: v0.4
I (209) heap_init: Initializing. RAM available for dynamic allocation:
I (216) heap_init: At 3FC8D240 len 00032DC0 (203 KiB): RAM
I (222) heap_init: At 3FCC0000 len 0001C710 (113 KiB): Retention RAM
I (229) heap_init: At 3FCDC710 len 00002950 (10 KiB): Retention RAM
I (236) heap_init: At 50000010 len 00001FD8 (7 KiB): RTCRAM
I (243) spi_flash: detected chip: generic
I (247) spi_flash: flash io: dio
W (251) spi_flash: Detected size(4096k) larger than the size in the binary image header(2048k). Using the size in the binary image header.
I (264) sleep: Configure to isolate all GPIO pins in sleep state
I (271) sleep: Enable automatic switching of GPIO sleep configuration
I (278) main_task: Started on CPU0
I (278) main_task: Calling app_main()
Hello world!
This is esp32c3 chip with 1 CPU core(s), WiFi/BLE, silicon revision v0.4, 2MB external flash
Minimum free heap size: 327312 bytes
Restarting in 10 seconds...
可以看到 hello world 程序就已经烧录进去了。
对了根据手册的描述, ESP32-C3 进入下载模式,需要拉低 GPIO9 哦。
|