You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
cyl
1dc041d8fb
|
2 years ago | |
---|---|---|
App | 2 years ago | |
SysDrives | 2 years ago | |
.gitignore | 2 years ago | |
CMakeLists.txt | 2 years ago | |
README.md | 2 years ago |
README.md
CH58xCMakeTemplate (CMake构建CH58x)
[这是一个模板程序]
CH58x单片机是基于Rsic-V架构,厂家使用Eclipse开发项目。(如果是其他系列则替换SysDrives里面的文件)
该模板脱离Eclipse使用Clion + riscv-none-embed-gcc + CMake实现。
构建
cmake -DCMAKE_BUILD_TYPE=Debug "-DCMAKE_MAKE_PROGRAM=ninja.exe路径" -DCMAKE_BUILD_TYPE=Debug -G Ninja -S . -B build
例子:cmake -DCMAKE_BUILD_TYPE=Debug "-DCMAKE_MAKE_PROGRAM=C:/Program Files/JetBrains/CLion 2022.2/bin/ninja/win/ninja.exe" -DCMAKE_BUILD_TYPE=Debug -G Ninja -S . -B build
编译
cmake --build build
或者配置Clion完成构建编译下载。