添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
豪情万千的风衣  ·  AddItIn | SOLIDWORKS·  1 月前    · 
仗义的莲藕  ·  Can't install ...·  4 月前    · 
腼腆的水龙头  ·  5 個常見的 POWER BI ...·  7 月前    · 

I have obtained a model by using Google Colab and translate it through TF Lite. I could apply validate on target and validate on desktop process and I did not get any error. However, once CubeAI generated related .h files and I used them, I got two errors, the errors are attached.

0693W00000NpyAoQAJ.jpg 0693W00000NpyAjQAJ.jpg 0693W00000NpyAeQAJ.jpg 0693W00000NpyAZQAZ.jpg 0693W00000NpyAUQAZ.jpg Please note that the errors are due to the files that are generated by CubeAI.

Thx for your responses.

Hey, I had the same problem. The error occured when running this code:

ai_network_params ai_params ={
		AI_CLASSIFYSPEED_DATA_WEIGHTS(ai_MODELNAME_data_weights_get()),
		AI_CLASSIFYSPEED_DATA_ACTIVATIONS(activations)
	};

The problem was that the code was not inside a function, which means it has to be an initializer - which is assigned only when the item is declared - which means it must be a constant value at compile time!

So to solve the issue I just put the code above inside a function!

I hope it helps!

Hey RU.1,

the problem occured in my case because I tried to run the code from my first post outside of a function. To fix the error i created a function and ran the code in there. That fixed the issue. I hope you understand what I mean. Ill post a code snippet to clarify.

/*
 * Test.c
 *  Created on: Jun 20, 2022
 *      Author: Cbapt
// The error occurs when you try to call the code from the first post outside of a c function
// The following Code shows the error
// Outside Funktion Call --> Causes Initializer Error! 
ai_network_params ai_params ={
		AI_CLASSIFYSPEED_DATA_WEIGHTS(ai_classifyspeed_data_weights_get()),
		AI_CLASSIFYSPEED_DATA_ACTIVATIONS(activations)
//This fixed it --> Just create a function around the call
ai_error AI_INIT(void)
	ai_network_params ai_params ={
		AI_CLASSIFYSPEED_DATA_WEIGHTS(ai_classifyspeed_data_weights_get()),
		AI_CLASSIFYSPEED_DATA_ACTIVATIONS(activations)
}

I hope it helps.

Best Regards,

cbapt

As I mentioned, the problem is STM32CubeIDE somehow didn't adjust the compiler and linker settings. Once you compile the code, the compiler cannot find the header and source file of XCUBEAI. Therefore, you need to say to compiler that these files are actually source files. You can this by following Right click your project name -> Properties -> C/C++ General -> Paths and Symbols -> Includes(TAB). You than add source files by clicking Add->Workspace buttons.

After that, Right click your project name -> Properties -> C/C++ Build -> MCU GCC Linker -> Libraries, add NetworkRuntime720_CM7_GCC.a here, which can be found under Middlewares -> ST -> Lib directory.

0693W00000SuRBFQA3.png 0693W00000SuRBKQA3.png

Those images might help you to find the tabs and files to be added. Hope this helps.

SDK 6.3 Hall Initialization Failing and Missing mp_hall_tuning.c File in STM32 MCUs Motor control stm32mp131fae7 Baremetal Fall into a busy state after QuadSPI Dual initialization. in STM32 MPUs Solutions