cancel
Showing results for 
Search instead for 
Did you mean: 

Cube MX 4.24.0 FreeRTOS Problem

Roger Heil
Associate II
Posted on January 30, 2018 at 16:59

Hi,

when I generate a example for the nucleo32 L432kc everything is fine, until I check the option freeRTOS

After this the includes are not correct anymore:

>>>>>

Src\freertos.o: In function `StartDefaultTask':

E:\Workspaces\Atollic9\432kcTest\Debug/..\Src/freertos.c:118: undefined reference to `HAL_GPIO_TogglePin'

E:\Workspaces\Atollic9\432kcTest\Debug/..\Src/freertos.c:119: undefined reference to `osDelay'

Src\freertos.o: In function `MX_FREERTOS_Init':

E:\Workspaces\Atollic9\432kcTest\Debug/..\Src/freertos.c:99: undefined reference to `osThreadCreate'

Src\gpio.o: In function `MX_GPIO_Init':

E:\Workspaces\Atollic9\432kcTest\Debug/..\Src/gpio.c:80: undefined reference to `HAL_GPIO_WritePin'

E:\Workspaces\Atollic9\432kcTest\Debug/..\Src/gpio.c:87: undefined reference to `HAL_GPIO_Init'

Src\main.o: In function `SystemClock_Config':

E:\Workspaces\Atollic9\432kcTest\Debug/..\Src/main.c:156: undefined reference to `HAL_RCC_OscConfig'

E:\Workspaces\Atollic9\432kcTest\Debug/..\Src/main.c:170: undefined reference to `HAL_RCC_ClockConfig'

E:\Workspaces\Atollic9\432kcTest\Debug/..\Src/main.c:177: undefined reference to `HAL_PWREx_ControlVoltageScaling'

E:\Workspaces\Atollic9\432kcTest\Debug/..\Src/main.c:184: undefined reference to `HAL_RCC_GetHCLKFreq'

E:\Workspaces\Atollic9\432kcTest\Debug/..\Src/main.c:184: undefined reference to `HAL_SYSTICK_Config'

E:\Workspaces\Atollic9\432kcTest\Debug/..\Src/main.c:188: undefined reference to `HAL_SYSTICK_CLKSourceConfig'

E:\Workspaces\Atollic9\432kcTest\Debug/..\Src/main.c:191: undefined reference to `HAL_NVIC_SetPriority'

Src\main.o: In function `main':

E:\Workspaces\Atollic9\432kcTest\Debug/..\Src/main.c:92: undefined reference to `HAL_Init'

E:\Workspaces\Atollic9\432kcTest\Debug/..\Src/main.c:115: undefined reference to `osKernelStart'

Src\stm32l4xx_it.o: In function `SysTick_Handler':

E:\Workspaces\Atollic9\432kcTest\Debug/..\Src/stm32l4xx_it.c:157: undefined reference to `osSystickHandler'

Src\stm32l4xx_it.o: In function `TIM7_IRQHandler':

E:\Workspaces\Atollic9\432kcTest\Debug/..\Src/stm32l4xx_it.c:178: undefined reference to `HAL_TIM_IRQHandler'

collect2.exe: error: ld returned 1 exit status

<<<<<<<<<<

when I copy the same sourcecode into a emtpy project, insert the symbols and directories, setup the mcu -->

Generate build reports...

Print size information

text data bss dec hex filename

52544 20 4044 56608 dd20 L432KC.elf

Print size information done

Generate listing file

Output sent to: L432KC.list

Generate listing file done

Generate build reports done

I think the includes are not linked correct.

regards

Roger

#cubemx-4.24 #atollic #freertos
1 ACCEPTED SOLUTION

Accepted Solutions
Jeanne Joly
Senior III
Posted on March 20, 2018 at 17:37

Hello

Heil.R

,

massicotte.mathieu

and

kelly.andrew

,

This issue is now fixed in the current CubeMX release.

Please, upgrade with CubeMX4.25 if not already done.

BR. Jeanne

View solution in original post

4 REPLIES 4
Posted on January 31, 2018 at 04:23

I'm experiencing what looks like the same after the 4.24.0 CubeMX update.

Create a new stm32f427ii project in CubeMX with the TrueStudio toolchain setting.

Generate code - open TrueSTudio and build the project .. everytyhing's fine.

Add FreeRTOS to the CubeMX project (use one of the MCU Timers for the SYS Timebase Source)

Generate code - open TrueStudio and build.  This time it fails to build with a heap of FreeRTOS and HAL calls broken.

If I go to the project in TrueStudio, the Drivers and Middlewares folder contents are incomplete ...

right-click on the Drivers directory and Delete it

right-click on the Middlewares directory and Delete it

I might need to right-click on the project and select Refresh, but often TrueStudio does its own refresh before I need to

TrueStudio reacquires the Drivers and Middlewares directories and their contents.

Build now works correctly ...... 

and the built s/w appears to be running correctly (I haven't yet run a full regression test though).

Mathieu Massicotte
Associate II
Posted on February 06, 2018 at 23:56

Same thing here.  Deleting the virtual folders seems to do the trick.

Imen.D
ST Employee
Posted on February 07, 2018 at 10:51

Hello,

We confirm this issue and 

raise it internally to CubeMX team for fix.

Sorry for any inconvenience it may bring for you.

Best Regards,

Imen.

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
Jeanne Joly
Senior III
Posted on March 20, 2018 at 17:37

Hello

Heil.R

,

massicotte.mathieu

and

kelly.andrew

,

This issue is now fixed in the current CubeMX release.

Please, upgrade with CubeMX4.25 if not already done.

BR. Jeanne