cancel
Showing results for 
Search instead for 
Did you mean: 

Warning after code generation

Tmasin
Associate

Hi,

 

I got the following warning after generating the code for evspin32g4:

Description Resource Path Location Type
array subscript 1 is above array bounds of 'PWMC_Handle_t *[1]' {aka 'struct PWMC_Handle *[1]'} [-Warray-bounds] mc_tasks.c /xxx/Application/User line 831 C/C++ Problem

Code line on 831 is:

CodeReturn |= PWMC_IsFaultOccurred(pwmcHandle[bMotor]); /* check for fault. It return MC_OVER_CURR or MC_NO_FAULTS

Versions applications:

motorcontrol workbench: 6.2.1

STM32CubeMX: 6.11.0

STM32CubeIDE: 1.15.0

I did not added only code yet. Only thing I did yet is converting the code from c to c++. If I convert back the warning is still there after building. Could someone help me please with this warning?

 

4 REPLIES 4
AScha.3
Chief

Hi,

and if you make new project (same), with standard settings (C code.) - what then : warning also ?

If you feel a post has answered your question, please click "Accept as Solution".

Hi,

With new project and no changes (C code), I still has the same problem

Gael A
ST Employee

Hello Tmasin,

Thank you for your report. We will start working on a fix and we will come back to you shortly once we know more about it.

In the meantime, know that this warning should not prevent you from running the code successfully. 

If you agree with my answer, please consider accepting it by clicking on 'Accept as solution'.

Hope this will help,
Gaël A.
amina safy
ST Employee

Hello,

This issue has been fixed in our new MCSDK 6.3.0 release,
so feel free to download it and try if it solved correctly your issue reported in this post.

Kind Regards.

Amina.

If you agree with my answer, please accept it by clicking on 'Accept as solution'.