Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/elmot/clion_cmake_nrf5_stub
CMake project stub for NordicSemi nRF5 chips, supports CLion
https://github.com/elmot/clion_cmake_nrf5_stub
arm clion clion-cmake clion-embedded clion-ide embedded hacktoberfest mcu nordicsemi nrf51 nrf52
Last synced: about 2 months ago
JSON representation
CMake project stub for NordicSemi nRF5 chips, supports CLion
- Host: GitHub
- URL: https://github.com/elmot/clion_cmake_nrf5_stub
- Owner: elmot
- License: unlicense
- Created: 2020-10-13T16:17:07.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2020-11-26T20:30:35.000Z (about 4 years ago)
- Last Synced: 2023-06-06T15:33:15.533Z (over 1 year ago)
- Topics: arm, clion, clion-cmake, clion-embedded, clion-ide, embedded, hacktoberfest, mcu, nordicsemi, nrf51, nrf52
- Language: CMake
- Homepage: https://www.jetbrains.com/clion/features/embedded-dev.html
- Size: 9.77 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
How to convert a standard nRF5 SDK example into a CLion-compatible CMake project
======1. Create a project folder and `cd` there
1. Download content of this repository to the project folder
+ `git clone --depth=1 https://github.com/elmot/clion_cmake_nRF5_stub.git .`
+ Delete `.git` folder
1. Copy files from the example to the project folder
+ `main.c` -> `src/main.c`
+ `Makefile`->`Makefile.txt`
+ `config/` ->`config/`
+ `.ld` -> `.ld`
1. Open the project with CLion
1. Go through all `Todo` comments in those two files and fill up the information. Use `TODO` tool window for that
1. CLion settings
+ Open `File` -> `Settings` -> `Build, Execution, Deployment` -> `Toolchains` and setup a toolchain out of `MinGW`
and `arm-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 `.elf`
* Download Executable: `Never`
* 'target remote' args: `tcp::2331`
* GDB Server: path to `JLinkGDBServerCL` executable
* GDB ServerArgs: `-device -strict -timeout 0 -nogui -if swd -s -silent`Note: For nRF52840 MCU device name is `nRF52840_xxAA`
1. Flash and debug
+ Select `erase` run configuration and press ***Build***
+ Select `flash_softdevice` run configuration and press ***Build***
+ Select `flash_debug` run configuration and press ***Debug***