cancel
Showing results for 
Search instead for 
Did you mean: 

Trying to compile an example project from Motor Control WorkBench but getting build errors

Hrishikesh
Senior

I'm trying to build an example project for the STSPIN32F0A in TrueStudio but I'm getting a few errors. I was hoping someone here might be able to help me. I picked out the STEVAL-SPIN3202 - BullRunning project and didn't make any changes. It seemed to save this project in my 'Users' folder and not my Workspace. I then opened the project in TrueStudio using File > Open projects from file system and then pointed it to the folder under C:\Users\,username.

Once I could see it in my list in TS, I then rebuilt the index and then refreshed all files. I then tried building the project and here are the errors that I see:

region `RAM' overflowed by 240 bytes	STEVAL-SPIN3202 - BullRunning		 	C/C++ Problem
STEVAL-SPIN3202 - BullRunning.elf section `._user_heap_stack' will not fit in region `RAM'	STEVAL-SPIN3202 - BullRunning		 	C/C++ Problem
'OverVoltageFlag' may be used uninitialized in this function [-Wmaybe-uninitialized]	mc_tasks.c	/STEVAL-SPIN3202 - BullRunning/Application/User	line 814	C/C++ Problem

The last one is a warning. I'm guessing the error is an RAM overflow error but I have no idea how to fix it so any help would be appreciated. Also, is this the right process to open a Motor Workbench Project into TrueStudio?

7 REPLIES 7
Claire O.
ST Employee

Hello Hrishikesh B,

Did you see the following limitation in the Release note?:

  • "With STM32CubeMx 4.26.0: Projects generated for Atollic TrueSTUDIO do not have the correct optimization level. Optimization level is set to "None (-O0)" although it should be "Optimize for Speed (-Ofast)". This needs to be changed manually, in TrueSTUDIO, Project's Build Settings, Tool Settings, C Compiler, Optimization"

I hope it can help you,

Thanks and best regards,

Claire

Hello Claire,

Thanks. Could you please point me to these release notes? Also, is this fixed in STM32CUbeMX 5?

I've changed it to "Optimize for Speed (-Ofast)", however, I'm still seeing the same error. Please see the attached screenshot. I tried "OPtimize for size (-Os)" and that too shows the error.

Best

Hrishikesh

Claire O.
ST Employee

Hello Hrishikesh B,

I was referring of the x-cube-mcsdk version 5.2 release note that you can find here:

https://www.st.com/content/st_com/en/products/embedded-software/mcus-embedded-software/stm32-embedded-software/stm32cube-expansion-packages/x-cube-mcsdk.html

The release note is accessible directly from the MC workbench if you click on documentation field.

After discussing with the team, we found out that there is a known problem with  Atollic TrueSTUDIO and STM32F0. It will be corrected with next MCSDK release arriving in few weeks and working with STM32CubeMx 5.

Best regards,

Claire

I see. Let me try SW4STM32. Any particular IDE you would recommend for this particular SDK?

Best

Hrishikesh

Keil has a free license for ST CM0(+) parts, that's likely to be better supported and less amateurish that some of the alternatives, especially when fighting issues specific to GNU/GCC and Eclipse based stuff.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

I agree with Clive Two.Zero. Keil or IAR are more safe IDE (and with different compiler). Please check in the release note with which version the MCSDK has been tested.

Claire

Thank you, that helped.