A simple ch58x cmake project template.
There are several ways to configure the toolchain:
- Install
arm-none-eabi-gcc
to/usr/arm-none-eabi-gcc
. Project can automatically find toolchain. - Pass in parameter
-DCMAKE_C_COMPILER=/path/to/bin/riscv-none-embed-gcc
to cmake. - Pass in parameter
-DTOOLCHAIN_PATH="/path/to/RISC-V Embedded GCC"
to cmake. - Set toolchain directory to
TOOLCHAIN_PATH
environment variable.
- Open Settings - Build, Execution, Deployment - Toolchains.
- Add a new toolchain. Set up
C Compiler
andC++ 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
openwch
directory. - Update
CH58X_COMMON_PATH
andCH58X_BLE_LIB_PATH
for CMakeLists.txt
See LICENSE