cancel
Showing results for 
Search instead for 
Did you mean: 

About the libneai.a file generated by NANOEDGE AI STUDIO Deployment

hashimoto_m
Associate III

I was able to run the Serial emulator in NANOEDGE AI STUDIO Validation, so as the next step, I run [COMPILE LIBRARY] in Deployment and don't know where to put the libneai.a file generated in Project Explore.
Also, please let me know if any other settings are required.
The evaluation board is B-L475E-IOT01A2.

1 ACCEPTED SOLUTION

Accepted Solutions
Julian E.
ST Employee

Hello @hashimoto_m,

 

Please replace libneai.a to neai:

JulianE_0-1734423943911.png

This should work.

 

 

Have a good day,

Julian


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

View solution in original post

4 REPLIES 4
Julian E.
ST Employee

Hello @hashimoto_m,

 

NanoEdge libraries are easy to add your embedded project. You need to:

  1. Include libneai.a and NanoEdgeAI.h in your project
  2. Also include knowledge.h if you use it (depends on the kind of project)
  3. Create some code to collect data with your sensor. The buffers need to be exactly the same as the ones you used to create the project
  4. Initialize the library (and the knowledge if used)
  5. Create a loop to log data and pass it through the model
  6. Lastly, you are free to treat the output of the model as you want

 

The logic for all kind of project is the same, so the integration is very similar. You can find example in these tutorials (near the end):

 

The documentation about the function for each kind of project can be found here:

 

We have example of code for some boards, sadly not yours, but you can still take a look at the main code to see what has been done: stm32ai-nanoedge-datalogger/Projects at main · stm32-hotspot/stm32ai-nanoedge-datalogger

 

Have a good day,

Julian


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

Hello Julian
Thank you for your reply.

I placed libneai.a generated by [COMPILELIBRARY] of [Deployment] of [NANOEDG EAI STUDIO]
in the core/src folder and linked libneai.a. (See attached image)
However, when I built it, the following error occurred.
I wonder if the link setting is wrong.

10:15:46 **** Incremental Build of configuration Debug for project HTS221_Sample_Deployment **** make -j8 all arm-none-eabi-gcc -o "HTS221_Sample_Deployment.elf" @"objects.list" -llibneai.a -mcpu=cortex-m4 -T"C:\ST\workspace2\HTS221_Sample_Deployment\STM32L475VGTX_FLASH.ld" --specs=nosys.specs -Wl,-Map ="HTS221_Sample_Deployment.map" -Wl,--gc-sections -static -L"C:\ST\workspace2\HTS221_Sample_Deployment\Core\Src" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -Wl,--start-group -lc -lm -Wl,--end-group C:/ST/STM32CubeIDE_1.16.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32 .12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/ bin/ld.exe: cannot find -llibneai.a: No such file or directory collect2.exe: error: ld returned 1 exit status make: *** [makefile:69: HTS221_Sample_Deployment.elf] Error 1 "make -j8 all" terminated with exit code 2. Build might be incomplete. 10:15:46 Build Failed. 2 errors, 0 warnings. (took 659ms)

Julian E.
ST Employee

Hello @hashimoto_m,

 

Please replace libneai.a to neai:

JulianE_0-1734423943911.png

This should work.

 

 

Have a good day,

Julian


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

Hello Julian
Thank you for your reply.
It worked, thank you.