Nrf9160 Demo Compilation Issue

build environment:
Mac

arm-toolchain:
export GNUARMEMB_TOOLCHAIN_PATH="~/opt/gnuarmemb/gcc-arm-none-eabi-9-2019-q4-major"

nrf-sdk:
v1.6.0

I’m having difficulty compiling the nrf9-mqtt-demo project
(https://github.com/edgeimpulse/firmware-nrf-91/tree/mqtt-demo)

I’ve also tried the main branch with the same issue.

I’ve followed instructions in the readme to build but it appears from the output below that the edge impulse libraries aren’t linked. Not sure how to fix. Please advise. Thanks :slight_smile:

/Users/tadmcallister/EdgeImpulse/firmware-nrf-91/build/../edge-impulse/ingestion-sdk-c/ei_sampler.cpp:330: undefined reference to `ei_printf(char const*, ...)'

/Users/tadmcallister/opt/gnuarmemb/gcc-arm-none-eabi-9-2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: /Users/tadmcallister/EdgeImpulse/firmware-nrf-91/build/../edge-impulse/ingestion-sdk-c/ei_sampler.cpp:331: undefined reference to `ei_printf(char const*, ...)'

/Users/tadmcallister/opt/gnuarmemb/gcc-arm-none-eabi-9-2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: /Users/tadmcallister/EdgeImpulse/firmware-nrf-91/build/../edge-impulse/ingestion-sdk-c/ei_sampler.cpp:333: undefined reference to `ei_printf(char const*, ...)'

/Users/tadmcallister/opt/gnuarmemb/gcc-arm-none-eabi-9-2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: /Users/tadmcallister/EdgeImpulse/firmware-nrf-91/build/../edge-impulse/ingestion-sdk-c/ei_sampler.cpp:335: undefined reference to `ei_printf(char const*, ...)'

/Users/tadmcallister/opt/gnuarmemb/gcc-arm-none-eabi-9-2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: /Users/tadmcallister/EdgeImpulse/firmware-nrf-91/build/../edge-impulse/ingestion-sdk-c/ei_sampler.cpp:337: undefined reference to `ei_printf(char const*, ...)'

/Users/tadmcallister/opt/gnuarmemb/gcc-arm-none-eabi-9-2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: app/libapp.a(ei_sampler.cpp.obj):/Users/tadmcallister/EdgeImpulse/firmware-nrf-91/build/../edge-impulse/ingestion-sdk-c/ei_sampler.cpp:288: more undefined references to `ei_printf(char const*, ...)' follow

collect2: error: ld returned 1 exit status

ninja: build stopped: subcommand failed.

Hi @mcallistertad, sorry! Due to an overzealous .gitignore the Zephyr porting functions were excluded. Now fixed in both master & the MQTT branch. :man_facepalming:

1 Like

Awesome! Looking forward to trying it out

FYI this only works with the nrf9160-dk V2 . V1 doesn’t have the additional SPI flash that’s needed onboard.

1 Like

Working great. Now to try out a sound classifier model
Screenshot 2021-09-14 at 09.55.10

1 Like

Yes, that’s right. But on the DK <0.15.0 (since that Version Nordic has added the external Flash) you can change the define:


to RAM and then store samples in RAM.
1 Like