You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The RISC-V toolchain situation for the CH32 series is quite chaotic. The following two options are recommended:
10
+
11
+
*[The official riscv-wch-elf bundled with MRS](http://www.mounriver.com/download): Supports WCH's rv32imafcxw extended instruction set, but has incomplete C++ standard library support, making it incompatible with libraries like Eigen.
12
+
*[Upstream riscv32-unknown-elf](https://github.com/riscv-collab/riscv-gnu-toolchain): Does **not** support WCH's extended instruction set, but provides complete C++ standard library support. Needs to be built manually and is currently not supported on Windows.
13
+
14
+
For quick compilation, you can use the Docker image provided by this project.
15
+
16
+
## CMake Configuration
17
+
18
+
An additional option needs to be configured: `LIBXR_CH32_CONFIG_FILE`, which specifies the path to the CH32 peripheral library configuration file, such as: `ch32v30x_conf.h`.
The official ESP tutorial is already quite comprehensive: [ESP-IDF Getting Started](https://docs.espressif.com/projects/esp-idf/zh_CN/latest/esp32c3/get-started/index.html). Just follow the instructions to install the environment.
10
+
11
+
## Project CMake Configuration
12
+
13
+
`libxr` provides a CMake configuration for ESP32: [esp32-cmake](https://github.com/Jiu-xiao/libxr/blob/master/CMake/esp32.cmake), which can be directly used.
14
+
15
+
For the official ESP Hello World project, add the following line at the end of `main/CMakeLists.txt`:
16
+
17
+
```cmake
18
+
include(path_to_libxr/CMake/esp32.cmake)
19
+
```
20
+
21
+
This completes the CMake setup. Be sure to replace `path_to_libxr` with the actual path to your `libxr` directory.
0 commit comments