- Create a project folder and
cdthere - Download content of this repository to the project folder
git clone --depth=1 https://github.com/elmot/clion_cmake_nRF5_stub.git .- Delete
.gitfolder
- Copy files from the example to the project folder
main.c->src/main.cMakefile->Makefile.txtconfig/->config/<some_name>.ld-><some_name>.ld
- Open the project with CLion
- Go through all
Todocomments in those two files and fill up the information. UseTODOtool window for that - CLion settings
- Open
File->Settings->Build, Execution, Deployment->Toolchainsand setup a toolchain out ofMinGWandarm-none-eabi-gcc - Reset CMake caches, wait until indexing is done
- Create a run configuration of type "Embedded GDB Server" with parameters:
-
Name:
flash_debug -
Target:
flash -
Executable
<project_name>.elf -
Download Executable:
Never -
'target remote' args:
tcp::2331 -
GDB Server: path to
JLinkGDBServerCLexecutable -
GDB ServerArgs:
-device <device name> -strict -timeout 0 -nogui -if swd -s -silentNote: For nRF52840 MCU device name is
nRF52840_xxAA
-
- Open
- Flash and debug
- Select
eraserun configuration and press Build - Select
flash_softdevicerun configuration and press Build - Select
flash_debugrun configuration and press Debug
- Select
elmot/clion_cmake_nRF5_stub
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|