|
2 years ago | |
---|---|---|
.. | ||
.vscode | 3 years ago | |
builtin_imgs | 2 years ago | |
drivers | 2 years ago | |
idf_port | 2 years ago | |
images | 2 years ago | |
main | 2 years ago | |
.config | 2 years ago | |
CMakeLists.txt | 2 years ago | |
Kconfig | 2 years ago | |
Makefile | 3 years ago | |
README.md | 2 years ago | |
README_ZH.md | 2 years ago | |
SConscript | 2 years ago | |
SConstruct | 2 years ago | |
rtconfig.h | 2 years ago | |
rtconfig.py | 2 years ago | |
rtt.patch | 2 years ago | |
sdkconfig | 2 years ago |
中文 | English
This document records the execution instruction of the BSP (board support package) for the ESP32-C3 development board.
The document is covered in two parts:
We tested 2 development boards, it all works, but due to the different LED pins of the two development boards, so we'll need to select the corresponding development board in the menuconfig.
The mainly-used resources of LUATOS_ESP32C3 are shown as follows:
Each peripheral supporting condition for this BSP is as follows:
On-board Peripherals | *Support* | *Remark* |
---|---|---|
GPIO | Support | |
UART | Support | Using LUATOS_ESP32C3 development board requires connecting serial port to USB chip UART0_TX and UART0_RX (such as CP2102) |
JTAG debug | Support | ESP32C3 usb-linked development boards can be debugged |
Download the RISC-V toolchain:
wget https://github.com/espressif/crosstool-NG/releases/download/esp-2022r1-RC1/riscv32-esp-elf-gcc11_2_0-esp-2022r1-RC1-linux-amd64.tar.xz
tar xf riscv32-esp-elf-gcc11_2_0-esp-2022r1-RC1-linux-amd64.tar.xz
Configure the path of the toolchain:
Add the local path of the RISC-V
toolchain to the EXEC_PATH
variable in the rtconfig.py
file, or specify the path by setting the RTT_EXEC_PATH
environment variable, for example:
export RTT_EXEC_PATH=/opt/riscv32-esp-elf/bin
Compile
Install esptool to convert ELF files to binary flash files:
pip install esptool
Execute the following command on the Linux platform to configure:
scons --menuconfig
It will automatically download env-related scripts to the ~/.env
directory, and then execute:
source ~/.env/env.sh
cd bsp/ESP32_C3/
pkgs --update
It will automatically download RT-Thread-packages/esp-idf
and RT-Thread-packages/FreeRTOS-Wrapper
, after updating the software packages, execute scons
to compile the board support package.
If the compilation is successful, rtthread.elf
, rtthread.bin
files will be generated.
Programming tool download
The current bsp test uses the flash_download_tool_3.9.4
tool to program without errors.
Programming tool download address: https://www.espressif.com.cn/sites/default/files/tools/flash_download_tool_3.9.4_0.zip
Programming tool configuration
Chip model selection ESP32-C3
Configure the binary file and offset address as follows:
| binary file | offset address | | ------------------- | -------- | | bootloader.bin | 0x0 | | partition-table.bin | 0x8000 | | rtthread.bin | 0x10000 |
Among them, bootloader.bin
and partition-table.bin
can be found in the bsp/ESP32_C3/builtin_imgs
folder. After the configuration is completed, the screenshot is as follows, and then click START
to download.
Maintainer:
Special thanks to chenyingchun0312 for providing support on the RISC-V part working.