Nrf52832 devlopemnt board with LSM6DSL sensor

I am getting starting the nrf52832 board with an LSM6DSL sensor for motion recognition. it is possible in edge impulse ??
how to configure and train the model in edge impulse.

Hi @satyaveersingh, yes it should be possible with nRF Connect SDK. One thing to note is since the nRF52-DK does not have external serial flash, you need to change the sample memory to point to internal RAM in your local copy of https://github.com/edgeimpulse/firmware-nrf52840-5340-dk/blob/master/edge-impulse/ingestion-sdk-platform/NordicSemi-nrf52/ei_zephyr_flash_commands.cpp. See also: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.7.0/nrf/ug_nrf52.html

Hi @yodaimpulse,
I am trying to Setup of nrf Connect SDK Setup for nrf52832 development.so I am getting errors and I think not properly set up of nrf connect.

please guide me.

Hi @satyaveersingh pls make a ticket on https://devzone.nordicsemi.com/ for general guidance with installing nRF Connect SDK, great resource for you.

Hi @yodaimpulse,
We have done the setup of NRF Connect SDK setup as per your suggestion.

we are following the steps which are described in the following link
https://github.com/edgeimpulse/firmware-nrf52840-5340-dk.

we have done the software steps completely.

we are having an Errors in Building the device firmware (locally) at this command

 west build -b nrf5340dk_nrf5340_cpuapp

please find below errors I am getting when running this command.

west build -b nrf5340dk_nrf5340_cpuapp
ERROR: Build directory C:\Users\Administrator\ncs\v1.7.0\firmware-nrf52840-5340\build targets board nrf52840dk_nrf52840, but board nrf5340dk_nrf5340_cpuapp was specified. (Clean the directory, use --pristine, or use --build-dir to specify a different one.)
FATAL ERROR: refusing to proceed without --force due to the above error

One More Question,
Suppose if we have an LSM6DSL sensor and we want to connect this sensor to the nrf52832 development board so can you Guide me at which path or at which location we have to write the code or driver for this sensor.
how the Edge impulse is going to Communicate with our SDK.

Hi @satyaveersingh I think you have to use nrf52dk_nrf52832 for the build target if you have the nRF52-DK. Also see “working with other sensors” section of: https://github.com/edgeimpulse/firmware-nrf52840-5340-dk. I hope it helps.

Hi @yodaimpulse
I have to build edge-impulse SDK to the nrf52832 development board using bash terminal through the command but I am getting errors.

west build -b nrf52dk_nrf52832

ERROR: Build directory C:\Users\Administrator\ncs\firmware-nrf52840-5340\build targets board nrf52840dk_nrf52840, but board nrf52dk_nrf52832 was specified. (Clean the directory, use --pristine, or use --build-dir to specify a different one.)
FATAL ERROR: refusing to proceed without --force due to the above error

this SDK import in Segger Embedded studio? it is possible or not?

Hi @satyaveersingh,

As mentioned in the error, the directory needs to be cleaned first. Can you try building with -p or --pristine like:

west build -b nrf52dk_nrf52832 -p

Hi @Arjan ,
I have to build edge-impulse SDK to the nrf52832 development board using bash terminal through the command but I am getting errors.

west build -b nrf52dk_nrf52832 -p

[671/895] Building CXX object CMakeFiles/app.dir/edge-impulse-sdk/tensorflow/lite/micro/schema_utils.cc.obj
[672/895] Building CXX object CMakeFiles/app.dir/edge-impulse-sdk/tensorflow/lite/micro/recording_micro_allocator.cc.obj
[673/895] Building CXX object CMakeFiles/app.dir/edge-impulse-sdk/tensorflow/lite/micro/simple_memory_allocator.cc.obj
[674/895] Building CXX object CMakeFiles/app.dir/edge-impulse/ingestion-sdk-platform/NordicSemi-nrf52/ei_main.cpp.obj
[675/895] Building CXX object CMakeFiles/app.dir/edge-impulse-sdk/tensorflow/lite/micro/test_helpers.cc.obj
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: ‘C:\Users\Administrator\ncs\v1.7.0\toolchain\opt\bin\cmake.EXE’ --build ‘C:\Users\Administrator\ncs\firmware-nrf52840-5340\build’

Hi @satyaveersingh,

Looks like your build environment is not set up correctly. You could also try building the project in a docker container by following these steps: https://github.com/edgeimpulse/firmware-nrf52840-5340-dk#building-the-device-firmware-docker

Be sure to install first Docker Desktop for your machine: https://www.docker.com/get-started

Hope that this works!
Arjan

Hi @Arjan

we have nrf52832 development board and
we are following the steps which are described in the following link
https://github.com/edgeimpulse/firmware-nrf52840-5340-dk.

I have to build edge-impulse SDK to the nrf52832 development board using bash terminal through the command but I am getting errors.

west build -b nrf52dk_nrf52832 -p

but I have to build edge-impulse SDK to the nrf52832 development board using bash terminal through the command it is successfully built on this command.

west build -b nrf52840dk_nrf52840 -p

it is possible to build to nrf52832 board ?
please guide how it is posiible.

Hi, when I’m trying to build with

west build -b nrf52dk_nrf52832 -p

I get following error

/home/arjan/Documents/EdgeImpulse/Firmware/edgeimpulse/firmware-nordic-nrf5x/edge-impulse/ingestion-sdk-platform/NordicSemi-nrf52/ei_device_nordic_nrf52.cpp:78:2: error: #error "Unsupported build target was chosen!"
   78 | #error "Unsupported build target was chosen!"

That’s because we only support the nrf52840 and nrf5340 with this project. The reason for this is the small amount of RAM memory on the nrf52832.
You could try to adjust the code to allow build for the nrf52832, but depending on the model size this will work.

What kind of model are you trying to run?

Hello @Arjan,
previously we have used the example you have suggested and now we are trying to build using another example.
I am installing the standalone repo of example-standalone-inferencing-zephyr from the link.

After that, I’ve deployed the C++ library from the edge impulse project>deployment page.

We are using NRF52832 dev board, for this board when we build with the command:

west build -b nrf52dk_nrf52832 -p

the error logs are generated which is shown in the following link: Error log link

image.png

The above-given logs are for an Error generated project.

When we try with the same command: west build -b nrf52840dk_nrf52840 -p with another board name then it will build successfully without any errors as shown in the following link: output log link

image.png

The above-given logs are for a successfully built project.

NOTE: You will notice the significant difference between both logs will be at the end of it where it shows the generated O/P.

You’re not building the example-standalone-inferencing-zephyr project, but the firmware-nrf52840-5340-dk project.

Hello @Arjan,

As per the previous conversation, I have tried both examples separately but none of them is built successfully in this command.

west build -b nrf52dk_nrf52832 -p

@satyaveersingh, can you try to build this project: https://drive.google.com/file/d/1XCk0yH9VOslS6qf51T8LFZk0hIu3HdCz/view?usp=sharing

This works for me

Hello @Arjan,
please give the access.

You should now be able to download the zip

Hello @Arjan

we have done the Setup of the given Example.
I am trying to build the code but I am getting a path error.

west build -b nrf52dk_nrf52832

Traceback (most recent call last):
File “runpy.py”, line 193, in _run_module_as_main
File “runpy.py”, line 86, in run_code
File "C:\Users\Satyaveer\ncs\v1.7.0\toolchain\opt\bin\Scripts\west.exe_main
.py", line 7, in
File “C:\Users\Satyaveer\ncs\v1.7.0\toolchain\opt\bin\Lib\site-packages\west\app\main.py”, line 779, in main
app.run(argv or sys.argv[1:])
File “C:\Users\Satyaveer\ncs\v1.7.0\toolchain\opt\bin\Lib\site-packages\west\app\main.py”, line 106, in run
self.run_command(argv)
File “C:\Users\Satyaveer\ncs\v1.7.0\toolchain\opt\bin\Lib\site-packages\west\app\main.py”, line 338, in run_command
self.run_extension(args.command, argv)
File “C:\Users\Satyaveer\ncs\v1.7.0\toolchain\opt\bin\Lib\site-packages\west\app\main.py”, line 408, in run_extension
command.run(args, unknown, self.topdir, manifest=self.manifest)
File “C:\Users\Satyaveer\ncs\v1.7.0\toolchain\opt\bin\Lib\site-packages\west\commands.py”, line 132, in run
self.do_run(args, unknown)
File “C:\Users\Satyaveer\ncs\v1.7.0\zephyr\scripts\west_commands\build.py”, line 183, in do_run
self._sanity_check()
File “C:\Users\Satyaveer\ncs\v1.7.0\zephyr\scripts\west_commands\build.py”, line 348, in _sanity_check
self._sanity_check_source_dir()
File “C:\Users\Satyaveer\ncs\v1.7.0\zephyr\scripts\west_commands\build.py”, line 337, in _sanity_check_source_dir
‘CMakeLists.txt’ in os.listdir(self.source_dir),
FileNotFoundError: [WinError 3] The system cannot find the path specified: ‘C:\home\arjan\Documents\EdgeImpulse\Firmware\example-standalone-inferencing-zephyr’

please guid me further.

FileNotFoundError: [WinError 3] The system cannot find the path specified: ‘C:\home\arjan\Documents\EdgeImpulse\Firmware\example-standalone-inferencing-zephyr’

It is referencing my file system. Are you using the -p flag?