Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

CLI in C++ project

Hi,

I'm trying to port a project using nRF5 SDK to C++. One of the desired features would be interaction with the app via J-Link RTT using the command line interface.

CLI library is very easy to use, but it's also very hard-wired to C programming style. I've tried somewhat porting CLI macros like NRF_CLI_CMD_REGISTER to C++ and didn't succeed because it uses named section variables. Trying to use extern "C" and C-style wrappers for C++ functions also didn't get rid of the errors.

I can't either execute C++ functions from the CLI commands or register them. 

Could you point me in some direction if anybody used command line in nRF C++ projects? Porting CLI library or perhaps using another command line handling library, either should be fine

Parents Reply Children
No Data
Related