Error Running my Impulse locally in thunderBoard-2

Hi all,

I have built an impulse model and wanted to test it locally in my ThunderBoard-2 board using Simplicity Studio.
I have followed the steps detailed here:


After doing the steps, I try to build the project but I got this error:

It all seems to be a problem finding some files. Here the prompt:

|fatal error: edge-impulse-sdk/tensorflow/lite/c/builtin_op_data.h: No such file or directory|trained_model_compiled.cpp|/example-standalone-inferencing-silabs-tb-sense-2/edgeimpulse/tflite-model|line 26|C/C++ Problem|
|fatal error: edge-impulse-sdk/tensorflow/lite/micro/debug_log.h: No such file or directory|ei_classifier_porting.h|/example-standalone-inferencing-silabs-tb-sense-2/edgeimpulse/edge-impulse-sdk/porting|line 28|C/C++ Problem|

The Simplicity Studio version is : SV5.3.0.0

Thank you in advanced for your help,

Christian

Hi @christian.franco,

This looks like it can be that the project was not properly generated/imported or edge-impulse-sdk is missing. I think the former.

It’s important that step 11 (close and re-open the studio) is followed. Otherwise when you click ‘Force Generation’ the .slcp file would get modified resulting in incorrect project properties.

Can you try following the guide and monitoring the .slcp before and after ‘Force generation’ and see to it that it doesn’t change (due to ‘Force Generation’).

Hi @rjames,
Thank you for your answer.

Ok I have donde everything you have told me, I will enumerate what I see:

  1. State of the project and .slcp file after step 10.
    image

image

  1. I close the project, and even close the Simplicity Studio.

  2. I reopen the project.

  3. I open the .slcp and go to “Project Generators”

  4. I only let marked the ones it says in the tutorial.

  1. Click on Save

  2. Once I click on Save, the project and .sclp files change. This is the state after saving:
    image

image

As noted, some files in the project dessapair and the .sclp file changes.

Any idea?

Thank you

Hi @christian.franco,

I noticed ei-workspace/ in your project. This folder shouldn’t be enumerated in the project.
Can you try what you did but then (Step 10) copying the contents in ei-workspace instead of from the root of the repo. Let me know if that helps.

Hallo,

steps:

  1. I copy the files this time in the ei-workscape folder created in the project explorer. This is the state:

  2. After Building the project
    image

Hi @christian.franco,

There should be no folder ei-workspace in your project. See image.

.

It looked like you copied all the files and directory from example-standalone-inferencing-silabs-tb-sense-2/ rather from example-standalone-inferencing-silabs-tb-sense-2/ei-workspace.

Try removing everything and import the project again starting from Step 1 again.
And in Step 10 you first navigate to example-standalone-inferencing-silabs-tb-sense-2/ei-workspace and drag,copy the contents of this directory to Simplicity Studio.

Hi again @rjames,

I havent copied the whole folder. As I mentioned in the previous message, I added only the files inside the folder to the project explorer (see the first image attached in the previous message) . The thing is that when I push “save” in the “Project Generators” window, everything changes by itself, automatically. It creates a folder called: ei-workspace , and moves the app.c, .h, ei_main.cpp, .h, main.c inside that folder. I dont know why. It is not something I have done, it does it by itself when I save the “Project Generators”.

Is it to do something with the SDK version? I see in your Figure you have the gecko_sdk_3.2.1, but in my case that folder is shadowed and a newer version is shown: gecko_sdk_3.2.3.
Thank you

Hi @christian.franco,

Thanks for your reply. I’ll try with the new sdk and see if I spot anything.

Hi I’ve tried it you’re right.
With the new gecko_sdk_3.2.3 it’s causing issues. I’ll look further into it further.

Thanks for reporting.

So I’ve ran it again and it worked perfectly.

What I did was,

  • between steps 9-12 you’ll see in the lower right corner of Simplicity Studio the message C/C++ Indexer. Wait for the process to complete before advancing to the next step.
  • After editing the project generators (Step 12). You’ll get Generate Configurable Project followed by C/C++ Indexer. Wait for both of these processes to end before Force Generation (Step 13).

You should notice that Simplicity Studio would have created gecko_sdk_3.1.1 (or gecko_sdk_3.2.3 if using the latest SDK) while gecko_sdk_3.2.1 is present. Either way, building the project is successful. See images below:

Using Bluetooth SDK 3.1.2:

Using Bluetooth SDK 3.2.4:

I hope this helps. If this works for you’ll I’ll update the documents.

hi @rjames
I tried following the steps you said, and waiting for the indexer to update in every step, but it keeps doing the same than before.

Do you think is likely to have a meeting ( I know we are on holidays, so it could be whenever you are able) for you to guide me in live. I think is gonna be quicker in this way.

Thank you

I will send you a PM

Hey @rjames
I have tried all the steps in a Windows 10 machine.
It keeps without working, and doing the same (generating the ei-workspace folder). But now an error prompts. Hope it helps.

error:
An internal error occurred during: “example-standalone-inferencing-silabs-tb-sense-2 project generation task”.
Generation: Projects failed example-standalone-inferencing-silabs-tb-sense-2-main

Failed to generate example-standalone-inferencing-silabs-tb-sense-2-main for Example-standalone-inferencing-silabs-tb-sense-2-main [example-standalone-inferencing-silabs-tb-sense-2-main]
A resource already exists on disk ‘C:\Users\MASTER\SimplicityStudio\v5_workspace\example-standalone-inferencing-silabs-tb-sense-2-main\gecko_sdk_3.2.3\platform\service’.
A resource already exists on disk ‘C:\Users\MASTER\SimplicityStudio\v5_workspace\example-standalone-inferencing-silabs-tb-sense-2-main\gecko_sdk_3.2.3\app\common\util\app_assert’.
Resource ‘/example-standalone-inferencing-silabs-tb-sense-2-main/gecko_sdk_3.2.3/app/common/util/app_assert’ does not exist.
A resource already exists on disk ‘C:\Users\MASTER\SimplicityStudio\v5_workspace\example-standalone-inferencing-silabs-tb-sense-2-main\gecko_sdk_3.2.3\util\third_party\crypto\mbedtls\include\mbedtls\aesni.h’.
A resource already exists on disk ‘C:\Users\MASTER\SimplicityStudio\v5_workspace\example-standalone-inferencing-silabs-tb-sense-2-main\gecko_sdk_3.2.3\util\third_party\crypto\mbedtls\include\mbedtls\arc4.h’.
A resource already exists on disk ‘C:\Users\MASTER\SimplicityStudio\v5_workspace\example-standalone-inferencing-silabs-tb-sense-2-main\gecko_sdk_3.2.3\util\third_party\crypto\mbedtls\include\mbedtls\aria.h’.
A resource already exists on disk ‘C:\Users\MASTER\SimplicityStudio\v5_workspace\example-standalone-inferencing-silabs-tb-sense-2-main\gecko_sdk_3.2.3\util\third_party\crypto\mbedtls\include\mbedtls\bn_mul.h’.
A resource already exists on disk ‘C:\Users\MASTER\SimplicityStudio\v5_workspace\example-standalone-inferencing-silabs-tb-sense-2-main\gecko_sdk_3.2.3\util\third_party\crypto\mbedtls\include\mbedtls\certs.h’.
A resource already exists on disk ‘C:\Users\MASTER\SimplicityStudio\v5_workspace\example-standalone-inferencing-silabs-tb-sense-2-main\gecko_sdk_3.2.3\util\third_party\crypto\mbedtls\include\mbedtls\chacha20.h’.
A resource already exists on disk ‘C:\Users\MASTER\SimplicityStudio\v5_workspace\example-standalone-inferencing-silabs-tb-sense-2-main\gecko_sdk_3.2.3\util\third_party\crypto\mbedtls\include\mbedtls\check_config.h’.
A resource already exists on disk ‘C:\Users\MASTER\SimplicityStudio\v5_workspace\example-standalone-inferencing-silabs-tb-sense-2-main\gecko_sdk_3.2.3\util\third_party\crypto\mbedtls\include\mbedtls\cipher.h’.
A resource already exists on disk ‘C:\Users\MASTER\SimplicityStudio\v5_workspace\example-standalone-inferencing-silabs-tb-sense-2-main\gecko_sdk_3.2.3\util\third_party\crypto\mbedtls\include\mbedtls\cmac.h’.
A resource already exists on disk ‘C:\Users\MASTER\SimplicityStudio\v5_workspace\example-standalone-inferencing-silabs-tb-sense-2-main\gecko_sdk_3.2.3\util\third_party\crypto\mbedtls\include\mbedtls\compat-1.3.h’.
A resource already exists on disk ‘C:\Users\MASTER\SimplicityStudio\v5_workspace\example-standalone-inferencing-silabs-tb-sense-2-main\gecko_sdk_3.2.3\util\third_party\crypto\mbedtls\include\mbedtls\debug.h’.
A resource already exists on disk ‘C:\Users\MASTER\SimplicityStudio\v5_workspace\example-standalone-inferencing-silabs-tb-sense-2-main\gecko_sdk_3.2.3\util\third_party\crypto\mbedtls\include\mbedtls\des.h’.
A resource already exists on disk ‘C:\Users\MASTER\SimplicityStudio\v5_workspace\example-standalone-inferencing-silabs-tb-sense-2-main\gecko_sdk_3.2.3\util\third_party\crypto\mbedtls\include\mbedtls\dhm.h’.
A resource already exists on disk ‘C:\Users\MASTER\SimplicityStudio\v5_workspace\example-standalone-inferencing-silabs-tb-sense-2-main\gecko_sdk_3.2.3\util\third_party\crypto\mbedtls\include\mbedtls\ecdsa.h’.
A resource already exists on disk ‘C:\Users\MASTER\SimplicityStudio\v5_workspace\example-standalone-inferencing-silabs-tb-sense-2-main\gecko_sdk_3.2.3\util\third_party\crypto\mbedtls\include\mbedtls\ecp.h’.
A resource already exists on disk ‘C:\Users\MASTER\SimplicityStudio\v5_workspace\example-standalone-inferencing-silabs-tb-sense-2-main\gecko_sdk_3.2.3\util\third_party\crypto\mbedtls\include\mbedtls\entropy.h’.
A resource already exists on disk ‘C:\Users\MASTER\SimplicityStudio\v5_workspace\example-standalone-inferencing-silabs-tb-sense-2-main\gecko_sdk_3.2.3\util\third_party\crypto\mbedtls\include\mbedtls\md_internal.h’.
A resource already exists on disk ‘C:\Users\MASTER\SimplicityStudio\v5_workspace\example-standalone-inferencing-silabs-tb-sense-2-main\gecko_sdk_3.2.3\util\third_party\crypto\mbedtls\include\mbedtls\memory_buffer_alloc.h’.
A resource already exists on disk ‘C:\Users\MASTER\SimplicityStudio\v5_workspace\example-standalone-inferencing-silabs-tb-sense-2-main\gecko_sdk_3.2.3\util\third_party\crypto\mbedtls\include\mbedtls\net.h’.
A resource already exists on disk ‘C:\Users\MASTER\SimplicityStudio\v5_workspace\example-standalone-inferencing-silabs-tb-sense-2-main\gecko_sdk_3.2.3\util\third_party\crypto\mbedtls\include\mbedtls\nist_kw.h’.
A resource already exists on disk ‘C:\Users\MASTER\SimplicityStudio\v5_workspace\example-standalone-inferencing-silabs-tb-sense-2-main\gecko_sdk_3.2.3\util\third_party\crypto\mbedtls\include\mbedtls\pkcs12.h’.
A resource already exists on disk ‘C:\Users\MASTER\SimplicityStudio\v5_workspace\example-standalone-inferencing-silabs-tb-sense-2-main\gecko_sdk_3.2.3\util\third_party\crypto\mbedtls\include\mbedtls\pkcs5.h’.
A resource already exists on disk ‘C:\Users\MASTER\SimplicityStudio\v5_workspace\example-standalone-inferencing-silabs-tb-sense-2-main\gecko_sdk_3.2.3\util\third_party\crypto\mbedtls\include\mbedtls\rsa_internal.h’.
A resource already exists on disk ‘C:\Users\MASTER\SimplicityStudio\v5_workspace\example-standalone-inferencing-silabs-tb-sense-2-main\gecko_sdk_3.2.3\util\third_party\crypto\mbedtls\include\mbedtls\sha1.h’.
A resource already exists on disk ‘C:\Users\MASTER\SimplicityStudio\v5_workspace\example-standalone-inferencing-silabs-tb-sense-2-main\gecko_sdk_3.2.3\util\third_party\crypto\mbedtls\include\mbedtls\ssl.h’.
A resource already exists on disk ‘C:\Users\MASTER\SimplicityStudio\v5_workspace\example-standalone-inferencing-silabs-tb-sense-2-main\gecko_sdk_3.2.3\util\third_party\crypto\mbedtls\include\mbedtls\ssl_cookie.h’.
A resource already exists on disk ‘C:\Users\MASTER\SimplicityStudio\v5_workspace\example-standalone-inferencing-silabs-tb-sense-2-main\gecko_sdk_3.2.3\util\third_party\crypto\mbedtls\include\mbedtls\ssl_internal.h’.
A resource already exists on disk ‘C:\Users\MASTER\SimplicityStudio\v5_workspace\example-standalone-inferencing-silabs-tb-sense-2-main\gecko_sdk_3.2.3\util\third_party\crypto\mbedtls\include\mbedtls\threading.h’.
Resource already exists on disk: ‘/example-standalone-inferencing-silabs-tb-sense-2-main/gecko_sdk_3.2.3/util/third_party/crypto/mbedtls/include/psa’.
Resource ‘/example-standalone-inferencing-silabs-tb-sense-2-main/gecko_sdk_3.2.3/util/third_party/crypto/mbedtls/include/psa’ does not exist.
Resource ‘/example-standalone-inferencing-silabs-tb-sense-2-main/gecko_sdk_3.2.3/util/third_party/crypto/mbedtls/include/psa’ does not exist.
Resource ‘/example-standalone-inferencing-silabs-tb-sense-2-main/gecko_sdk_3.2.3/util/third_party/crypto/mbedtls/include/psa’ does not exist.
Resource ‘/example-standalone-inferencing-silabs-tb-sense-2-main/gecko_sdk_3.2.3/util/third_party/crypto/mbedtls/include/psa’ does not exist.
Resource ‘/example-standalone-inferencing-silabs-tb-sense-2-main/gecko_sdk_3.2.3/util/third_party/crypto/mbedtls/include/psa’ does not exist.
Resource ‘/example-standalone-inferencing-silabs-tb-sense-2-main/gecko_sdk_3.2.3/util/third_party/crypto/mbedtls/include/psa’ does not exist.
Resource ‘/example-standalone-inferencing-silabs-tb-sense-2-main/gecko_sdk_3.2.3/util/third_party/crypto/mbedtls/include/psa’ does not exist.
Resource ‘/example-standalone-inferencing-silabs-tb-sense-2-main/gecko_sdk_3.2.3/util/third_party/crypto/mbedtls/include/psa’ does not exist.
Resource ‘/example-standalone-inferencing-silabs-tb-sense-2-main/gecko_sdk_3.2.3/util/third_party/crypto/mbedtls/include/psa’ does not exist.
Resource ‘/example-standalone-inferencing-silabs-tb-sense-2-main/gecko_sdk_3.2.3/util/third_party/crypto/mbedtls/include/psa’ does not exist.
Resource ‘/example-standalone-inferencing-silabs-tb-sense-2-main/gecko_sdk_3.2.3/util/third_party/crypto/mbedtls/include/psa’ does not exist.
Resource ‘/example-standalone-inferencing-silabs-tb-sense-2-main/gecko_sdk_3.2.3/util/third_party/crypto/mbedtls/include/psa’ does not exist.
Resource ‘/example-standalone-inferencing-silabs-tb-sense-2-main/gecko_sdk_3.2.3/util/third_party/crypto/mbedtls/include/psa’ does not exist.
Resource ‘/example-standalone-inferencing-silabs-tb-sense-2-main/gecko_sdk_3.2.3/util/third_party/crypto/mbedtls/include/psa’ does not exist.
A resource already exists on disk ‘C:\Users\MASTER\SimplicityStudio\v5_workspace\example-standalone-inferencing-silabs-tb-sense-2-main\gecko_sdk_3.2.3\util\third_party\crypto\sl_component\sl_mbedtls_support\inc\sha256_alt.h’.
A resource already exists on disk ‘C:\Users\MASTER\SimplicityStudio\v5_workspace\example-standalone-inferencing-silabs-tb-sense-2-main\gecko_sdk_3.2.3\util\third_party\crypto\sl_component\sl_mbedtls_support\inc\sha512_alt.h’.
A resource already exists on disk ‘C:\Users\MASTER\SimplicityStudio\v5_workspace\example-standalone-inferencing-silabs-tb-sense-2-main\gecko_sdk_3.2.3\util\third_party\crypto\sl_component\sl_psa_driver\src\crypto_management.c’.
A resource already exists on disk ‘C:\Users\MASTER\SimplicityStudio\v5_workspace\example-standalone-inferencing-silabs-tb-sense-2-main\gecko_sdk_3.2.3\util\third_party\crypto\sl_component\sl_psa_driver\src\sli_crypto_transparent_driver_cipher.c’.
A resource already exists on disk ‘C:\Users\MASTER\SimplicityStudio\v5_workspace\example-standalone-inferencing-silabs-tb-sense-2-main\gecko_sdk_3.2.3\util\third_party\crypto\sl_component\sl_psa_driver\src\sli_crypto_transparent_driver_mac.c’.
A resource already exists on disk ‘C:\Users\MASTER\SimplicityStudio\v5_workspace\example-standalone-inferencing-silabs-tb-sense-2-main\gecko_sdk_3.2.3\util\third_party\crypto\sl_component\sl_psa_driver\inc’.
Resource ‘/example-standalone-inferencing-silabs-tb-sense-2-main/gecko_sdk_3.2.3/util/third_party/crypto/sl_component/sl_psa_driver/inc’ does not exist.
Resource ‘/example-standalone-inferencing-silabs-tb-sense-2-main/gecko_sdk_3.2.3/util/third_party/crypto/sl_component/sl_psa_driver/inc’ does not exist.
Resource ‘/example-standalone-inferencing-silabs-tb-sense-2-main/gecko_sdk_3.2.3/util/third_party/crypto/sl_component/sl_psa_driver/inc’ does not exist.
Problems encountered while deleting resources.

Hi @christian.franco

I still see ei-workspace still appears in the Studio, which it shouldn’t. I may have found the issue. Can you try the patch/fix here: https://github.com/edgeimpulse/example-standalone-inferencing-silabs-tb-sense-2/tree/update-slcp-win and let me know if this fixes your issue?

Hey @rjames , finally I could have a test on this. I can build now and program. Thank you.

In order to test the impulse, what are the steps I should follow? how can I insert some data?

Hi @christian.franco,

For standalone inferencing using the repo that @rjames pasted above, please copy/paste your raw features into this array, there is also a commented out link there for further instruction: https://github.com/edgeimpulse/example-standalone-inferencing-silabs-tb-sense-2/blob/update-slcp-win/ei-workspace/ei_main.cpp#L35-L38

– Jenny

Hi @jenny, The link seemd to be broken, that is why I asked…

Apologies @christian.franco, here is the correct link: https://docs.edgeimpulse.com/docs/running-your-impulse-locally-1

I will have this fixed in the GitHub repo as well.

Thank you very much !!

One question, in order to use the impulse over my own Simplicty Studio project, do I only need the files downloaded from the Edge Impulse web?.. I mean, just add these downloaded folders to my existing project and do the calls to the impulse function with the raw data filled?

The changes/fixes has been now merged to the main branche. https://github.com/edgeimpulse/example-standalone-inferencing-silabs-tb-sense-2