NXP development on Clion


I spent some time trying to use CLion for my LPC845 mcu until I finally did it, it might work for any NXP mcu, with some modifications. I want to share this information to the community.

Project repo where there is a step by step tutorial: https://github.com/AgustinOrdonez/LPC-on-Clion

Information about this example:

LPC845 comes on a board with a CMSIS-DAP debug and VCOM port. With NXP's LinkServer you can connect to CMSIS-DAP and either load the program or debug it.

In this example there is a super simple blink example on the integrated LED which comes with the board

Project setup:
I started makeing a bare bones project in MCUXpresso IDE(NXP's based on eclipse IDE) and watched the definitions and compiler and linker flags.
Then I downloaded this CMakeLists.txt for cortex-m processors and modified it with the information I got from MCUXpresso.
I then went to NXP's SDK builder and created a “ARM GCC / MCUXpresso for VS Code” SDK for my board and OS. I then proceeded to download an example project and copied all the files my project has on “firmware” and added the linker script for my configuration, I had to add some definitions in CMakiLists.txt for a header that was asking CPU. I also downloaded the .sdv file from the complete SKD download.
Now that the project should be ready to be compiled, once done that I proceeded to configure flashing and deugging with LinkServer from NXP following this post.

Hope someone finds this useful!



Thanks for the post! It seems that the repo is private. Could you please check?


It was a mistake, I changed repo's name, now I fixed the url


Please sign in to leave a comment.