Unable to build standalone example with C++ model on nRF Connect SDK

Hi,

I´m trying to deploy a model using the C++ library to my nrf52840 DK, but I get build errors.
I´ve followed the tutorial on https://docs.edgeimpulse.com/docs/running-your-impulse-locally-zephyr.

I do “File” -> “Open nRF Connect SDK project…” -> select “example-standalone-inferencing-zephyr-master” map as project -> select nrf52840dk as board

“example-standalone-inferencing-zephyr-master” map has same structure as mentioned in the tutorial.

I get 11 build errors looking like this:

In the end it outputs “Error starting process C:\Users\robin\ncs\v1.5.0\toolchain\opt/bin/arm-none-eabi-ar”

I´ve tried building other sample projects provided by Nordic Semi, and those builds.
I´ve tried same procedure on both nRF Connect SDK 1.5.0 and 1.4.99-dev1.

Do you have any idea how to work around?

Was unsure whether I should report this on bug or something else, but I can´t build the project after following the tutorial step by step, so I thought it might suit here anyway.

Hi @M435,

“File” -> “Open nRF Connect SDK project…”

In which IDE are you doing this?

It is the Segger Embedded Studio in nRF Connect SDK toolchain

Thanks, will let the embedded team look at it. In the meantime building with west should work.

Ok, I will try that. Thanks!

1 Like

Hi @M435,

The issue is that SES (Segger Embedded Studio) stripped out most of the header files for C++ from GCC. hence does not compile C++ code. So currently the only way to build for Nordic chips with Zephyr is to use the west tool.

There is probably a way to provide SES with another compiler that would support C++, but I would not recommend that.

Thank you for the answer. That makes sense.
But that also means that I can´t debug the fw, so it would really be benefitial if this issue could be fixed in the future.

Yeah, unfortunately this is not with us. West does seem to be able to start a debug server (https://docs.zephyrproject.org/latest/guides/west/build-flash-debug.html#debugging-west-debug-west-debugserver) which I assume wraps around the Segger tools anyway.

Yes, I agree with you and we will try to push that. In the meantime, you can use west debug for step-by-step debugging. See the documentation here:
https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.5.0/zephyr/guides/west/build-flash-debug.html#debugging-west-debug-west-debugserver

1 Like

I see, thanks for the suggestion!

You can also use mbed for most of the nRF MCUs.

I still have to document it, but here is my project, which runs Edge Impulse SDK on an nrf52840 with mbed OS. Particularly, here is the folder with the deployment code. Hope it helps.

2 Likes

Cool, thanks for the tip!

1 Like