Error while using "Generate Code for Quantized LSTM Network and Deploy on Cortex-M Target" example.

5 views (last 30 days)
After using the command :
codegen -config cfg net_predict -args {coder.Constant('activityRecognisationNet.mat'),single(zeros(3,10))}
I get the error:
"C:/Users/Administrator/Documents/MATLAB/Examples/R2022a/deeplearning_shared/CodeGenerationForQuantizedDeepLearningNetworkOnCortexMExample/codegen/lib/net_predict/predict.c"
C:/Users/Administrator/Documents/MATLAB/Examples/R2022a/deeplearning_shared/CodeGenerationForQuantizedDeepLearningNetworkOnCortexMExample/codegen/lib/net_predict/predict.c:11:10: fatal error: arm_nnfunctions.h: No such file or directory
11 | #include "arm_nnfunctions.h"
| ^~~~~~~~~~~~~~~~~~~
compilation terminated.
gmake: *** [predict.o] Error 1
The make command returned an error of 2
Error(s) encountered while building "net_predict"
------------------------------------------------------------------------
??? Build error: C compiler produced errors. See the Build Log for further details.
More information
Code generation failed: View Error Report
It means my compiler can not find "arm_nnfunctions.h".I have installed the stm32 support packages.Does the compiler need to set include path?How to set the include path?
  1 Comment
liangmaokun liangmaokun
liangmaokun liangmaokun on 22 Apr 2022
After adding "cfg.CustomInclude = C:\ProgramData\MATLAB\SupportPackages\R2022a\3P.instrset\cmsis.instrset\CMSIS\NN\Include" to the cfg,the "fatal error: arm_nnfunctions.h: No such file or directory" bug has fix.But the new error occus like the following:
### Connectivity configuration for function 'net_predict': 'STM32 Microcontroller'
### COM port: COM3
### Baud rate: 115200
??? An error occurred while calling into the SIL or PIL target connectivity implementation.
Build process stopped at compile stage. Unable to find the following link-only objects that are specified in the build
information:
lib\libcmsisnn.a
Code generation failed: View Error Report
Error using codegen
I don't find the file named libcmsisnn.a in my computer.Does it means that I should creat it myself and how to creat it?

Sign in to comment.

Accepted Answer

Jack Ferrari
Jack Ferrari on 9 May 2022
Hi Liangmaokun,
The example you are trying to run requires the CMSIS-NN library to be built (this will give you the missing libcmsisnn.a file) and environment variables correctly set.
Feel free to follow-up on this thread or the one linked above if you have any questions.

More Answers (0)

Products


Release

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!