#31- How to set up CMake alongside VS code for WCH RISC-V?
HTML-код
- Опубликовано: 17 окт 2024
- #riscv #CH32 #mcu #vscode
In this video, we are going to be looking at how to set up CMake, alongside Visual Studio Code, when working with WCH MCUs, and how we can integrate the RISCV-GCC Toolchain alongside OpenOCD for debugging and flashing.
The prerequisites include CMake, Ninja, and Visual Studio Code. We recommend the following extensions in Visual Studio Code be included as well.
Serial Monitor - (for writing via WCHs UART_Printf(function)).
Inte Hex - to view and analyze HEX files.
C/C++ - Syntax highlighting, snippets, and more for C/C++.
SonarLint - code quality checker and linter.
After installing everything, we add Ninja, and the OpenOCD to PATH, then use the Run Task command, to run the commands in the following order.
CMake: Configure
CMake: Build
Flash
CMake: Clean
PS: Make sure to link the compiler_commands.json file to the SonarLint Extension, for the linting to work.
Any chance you can show how this works for the datalogger video from #24 ?
Can you provide link for the sample project being used here?
github.com/dreamcmi/WCH-CMake, This is link for you, please check it out