A simple ch58x cmake project template.
There are several ways to configure the toolchain:
- Install
arm-none-eabi-gccto/usr/arm-none-eabi-gcc. Project can automatically find toolchain. - Pass in parameter
-DCMAKE_C_COMPILER=/path/to/bin/riscv-none-embed-gccto cmake. - Pass in parameter
-DTOOLCHAIN_PATH="/path/to/RISC-V Embedded GCC"to cmake. - Set toolchain directory to
TOOLCHAIN_PATHenvironment variable.
- Open Settings - Build, Execution, Deployment - Toolchains.
- Add a new toolchain. Set up
C CompilerandC++ Compiler. - Open Settings - Build, Execution, Deployment - CMake.
- Add a new profile. Choose the correct toolchain.
Set TARGET_LD_SCRIPT or TARGET_STARTUP_ASM as your own before add_subdirectory(openwch)
See: CMakeLists.txt
- Extract SDK to
openwchdirectory. - Update
CH58X_COMMON_PATHandCH58X_BLE_LIB_PATHfor CMakeLists.txt
See LICENSE