Skip to main content
Hrishikesh
Associate III
November 19, 2018
Question

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

  • November 19, 2018
  • 2 replies
  • 1295 views

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?

This topic has been closed for replies.

2 replies

Claire O.
Technical Moderator
November 27, 2018

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

Hrishikesh
Associate III
November 27, 2018

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.
Technical Moderator
November 27, 2018

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

Hrishikesh
Associate III
November 27, 2018

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

Best

Hrishikesh

Tesla DeLorean
Guru
November 27, 2018

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 VenmoUp vote any posts that you find helpful, it shows what's working..