cancel
Showing results for 
Search instead for 
Did you mean: 

Cube AI studio: build fails after editing .ioc file.

chanchal94
Senior

Whenever I am starting to make project  from scratch in STM32Cube AI studio, It gives complete structure with .ioc files as well as AI files, but as soon as I make changes in .ioc file and generate code after loading in CubeIDE, it changes the middlewares and build error comes . What is the solution for that? 

1. Should I first make the .ioc project and then make project in STM32Cube AI studio ( Import the existing project from STM32CubeMX or STM32Cube AI studio)

2. Another doubt is if I make project from preexisting .ioc, Do I need project in application mode for that as AI changes will work in application mode only ( but STM32N6 doesnt work without FSBL), what is your suggestion for Edge AI project building?

 

The error was :

Description Resource Path Location Type make: *** No rule to make target 'C:/Users/hp/.stm32cubeaistudio/workspace/Modified_STM32/Middlewares/ST/AI/Npu/ecloader.c', needed by 'Middlewares/ST/AI/Npu/ecloader.o'. Stop. Modified_STM32_Appli C/C++ Problem

 

Thanks & Regards

Chanchal

14 REPLIES 14
chanchal94
Senior

This is a kind reminder request to look into this issue.

Looking forward for your reply.

Thanks & Regards

Chanchal

Hello

We released an update for STM32Cube AI Studio.

Could you try again to see if it fixes the issue you had.

 

Best regards,

Yanis


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.

I am using V1.1.0 . I think that is the latest one, right?

hamitiya
ST Employee

Yes it is the latest one.

 


@chanchal94 wrote:

1. Should I first make the .ioc project and then make project in STM32Cube AI studio ( Import the existing project from STM32CubeMX or STM32Cube AI studio)



If you did not start any MCU / Board project, I suggest you to start from STM32Cube AI Studio.

 


@chanchal94 wrote:

2. Another doubt is if I make project from preexisting .ioc, Do I need project in application mode for that as AI changes will work in application mode only ( but STM32N6 doesnt work without FSBL), what is your suggestion for Edge AI project building?




When generating a project with STM32CubeMX, your project is either FullSecure (Appli / FSBL) or Secure/NonSecure (SecureNSecure). It generates FSBL, AppNS (Non-Secure mode), and AppS (Secure-mode)

I suggest working with FullSecure mode.

Also, you are right, STM32N6 project, if generated by STM32CubeMX, won't work without FSBL.

 

When regenerating using STM32CubeMX, please verify these settings:

image.png

 

Best regards

Yanis


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.

@hamitiya As suggested by you, I started the project in AI studio from scratch and generated the IDE project . I opened it in STM32 IDE and build the application code in it. It got built without any errors. Then I opened its Cube MX file to add the parameters I want for example ADC- I added it in application mode and took care of above settings in code generator . But after pressing generate code in its cube MX file, It still removed the AI headers from application and made changes automatically in studio AI files. 

This is the problem coming again and again. That is why I tried downloading only C code from studio also so that I can add my project with it, but that is also failing.

hamitiya
ST Employee

Hello

If you download only C code, you are in charge of the integration in your project, it includes:

- Manage "Include" paths

- Set which sources to use

- File tree

However, when regenerating with STM32CubeMX, you should only loss code which are not in "USER CODE". Do you loss all generated code ? Or only the one in main.c ?

 

Could you share the faulty project to look at it ?

 

Best regards,

Yanis


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.

I have attached the faulty project along with a Word document describing the issue. Kindly review them and provide your assistance.

 

Regards

Chanchal

hamitiya
ST Employee

Hello,

Interestingly, you lost the "Middlewares" folder, which should contain EXTMEM_LOADER as well as AI Middlewares.

What IPs did you remove during this update?

To work with STM32N6570-DK, you need to enable XSPIs, and XSPIM, and I see that they've been disabled.

Even FSBL is not compiling anymore:

make -j20 all

make: *** No rule to make target 'C:/Users/hamitiya/Downloads/AI_improved/Drivers/STM32N6xx_HAL_Driver/Src/stm32n6xx_hal_sdram.c', needed by 'Drivers/STM32N6xx_HAL_Driver/Src/stm32n6xx_hal_sdram.o'. Stop.

"make -j20 all" terminated with exit code 2. Build might be incomplete.

 

 

Seems not strictly related to STM32Cube AI Studio, but how STM32CubeMX manages some IP removal.

Best regards,

Yanis


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.

I have configured ADC1, DMA, USART1, and TIM3 in Application Mode so that they can be used along with AI modifications in the application files. I also removed the extra peripherals, similar to what I did in my previous ADC + DMA + Timer project.

However, I have a few doubts:

  • Should I avoid unchecking or removing the extra peripherals assigned in the configuration?

  • Should all my implementation be done in the Application main.c, or is there any need to work in the FSBL main.c as well?

I am currently confused about the correct approach and how to proceed. Kindly guide me on this.

 

Thanks & Regards

Chanchal