cancel
Showing results for 
Search instead for 
Did you mean: 

FP-AI-VISION1 compile issue

cvd_pony
Associate

Hi ST professional team

 

Following the documentation  instructions & opterating

How to use Teachable Machine to create an image classification application on STM32

 

https://wiki.stmicroelectronics.cn/stm32mcu/wiki/AI:How_to_use_Teachable_Machine_to_create_an_image_classification_application_on_STM32

 

How to resolve compilation error messages:

 

111.jpg

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Imen.D
ST Employee

Hello @cvd_pony and welcome to the STM32 Community :) 

Check your builder settings.

Make sure to configure your project properly and build the workspace in the right path.

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

View solution in original post

5 REPLIES 5
Imen.D
ST Employee

Hello @cvd_pony and welcome to the STM32 Community :) 

Check your builder settings.

Make sure to configure your project properly and build the workspace in the right path.

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
cvd_pony
Associate

I'll try it, thank you

Nicolas_V
ST Employee

I did the Wiki again on my side and did not face any issue.

For your case and would verify two steps :

Delete the following files and replace them with the ones from workspace/stm32ai_output:

In Src:

  • network.c
  • network_data.c
  • network_data_params.c (for X-CUBE-AI v7.2 and above)

In Inc:

  • network.h
  • network_data.h
  • network_config.h
  • network_data_params.h (for X-CUBE-AI v7.2 and above)

 

Updating to a newer version of X-CUBE-AI

FP-AI-VISION1 v3.1.0 is based on X-Cube-AI version 7.1.0, You can check your version of Cube.AI by running stm32ai --version. If the c-model files were generated with a newer version of X-Cube-AI (> 7.1.0), you need also to update the X-CUBE-AI library (NetworkRuntime720_CM7_GCC.a for X-CUBE-AI version 7.2).

Go to workspace/FP-AI-VISION1_V3.1.0/Middlewares/ST/STM32_AI_Runtime then for a Windows command prompt:

copy %X_CUBE_AI_DIR%\Middlewares\ST\AI\Inc\*  .\Inc\
 copy %X_CUBE_AI_DIR%\Middlewares\ST\AI\Lib\GCC\ARMCortexM7\NetworkRuntime720_CM7_GCC.a .\lib\NetworkRuntime710_CM7_GCC.a

 

 

magnus_lindhe
Associate II

Hi,

I had a similar problem when following the tutorial above, as well as this one:

How to use transfer learning to perform image classification on STM32

Specifically, I got a linker error saying that some function related to NT35510 could not be found (some file names are removed):

 

undefined reference to `NT35510_RegisterBusIO'
undefined reference to `NT35510_ReadID'
in function `BSP_LCD_InitEx':
undefined reference to `NT35510_LCD_Driver'
collect2.exe: error: ld returned 1 exit status

 

 

I had followed the instructions in step 3.3 of the tutorial above (same as step 3.1.4 in the tutorial you mentioned) and moved the two files nt35510.c and nt35510_reg.c to the folder workspace/FP-AI-VISION1_V3.1.0/Drivers/BSP/Components, but the linker still didn't find them.

Solution: After a few hours of googling and trial and error, I realized that much of the project file tree is mirrored as a sub-tree of the STM32 project in the STM32Cube IDE file tree, and that I needed to drag and drop the two C-files into the sub-folder Components of the project tree. The image below shows the incorrect folder in red and the correct one in green:

FP-AI-VISION file tree.png

I held the Ctrl key while dragging and dropping the files, to do a copy. I then got a dialog asking if I wanted to copy or link the files, and I selected linking. This seemed to update the build system so the files were included in the compilation, and solved the linking problem.

I think this should be updated in the instructions of both tutorials.

Hope it helps someone else!

 

Thank you Magnus,

you are right. This is the correct way of doing it.

I am reworking the wiki, to make it easier. Stay tune !

With Kind Regards,

Nicolas,