cancel
Showing results for 
Search instead for 
Did you mean: 

Trying to compile STemWin Demo code for L4R9I-DISCO in TrueStudio and failing miserably.

Carl Farrington
Associate III
Posted on July 13, 2018 at 00:50

Hi. I am trying to compile the STemWin Demo code for L4R9I-DISCO in TrueStudio and failing miserably.

Firstly I did the import procedure which is supposed to make it easy to get all the Cube demo stuff into True Studio. Well, it's taken  about an hour of constantly attempting to compile, and then having to search for .h files and add in new include paths.

but now my problem seems to be a bigger one.

STM32Cube_FW_L4_V1.12.0\Projects\32L4R9IDISCOVERY\Demonstrations\STemWin\Modules\iddmeasure\iddmeasure.c appears to call the following 3 functions, which as far as I can tell do not exist in any files anywhere within the distribution:

SystemClock_Config()

Init_RTC()

TIMER_Init()

I have grepped the whole STM32Cube_FW_L4_V1.12.0 directory and I don't see these functions being declared anywhere.

Please can somebody shed some light?

Here's the actual error output:

arm-atollic-eabi-gcc -c ..\Gui\Core\power_measurement\generated\modes\low_power_sleep_mode\low_power_sleep_mode_text.c -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -std=gnu11 -ID:\STM32Cube_FW_L4_V1.12.0\Middlewares\ST\STemWin\inc -ID:\STM32Cube_FW_L4_V1.12.0\Projects\32L4R9IDISCOVERY\Demonstrations\STemWin\Gui\Target -ID:\STM32Cube_FW_L4_V1.12.0\Projects\32L4R9IDISCOVERY\Demonstrations\STemWin\Core\Inc -ID:\STM32Cube_FW_L4_V1.12.0\Drivers\STM32L4xx_HAL_Driver\Inc -ID:\STM32Cube_FW_L4_V1.12.0\Projects\32L4R9IDISCOVERY\Demonstrations\STemWin\Binary\Config -ID:\STM32Cube_FW_L4_V1.12.0\Drivers\CMSIS\Device\ST\STM32L4xx\Include -ID:\STM32Cube_FW_L4_V1.12.0\Middlewares\Third_Party\FatFs\src -ID:\STM32Cube_FW_L4_V1.12.0\Drivers\CMSIS\Include -ID:\STM32Cube_FW_L4_V1.12.0\Drivers\BSP\STM32L4R9I-Discovery -ID:\STM32Cube_FW_L4_V1.12.0\Middlewares\Third_Party\FreeRTOS\Source\CMSIS_RTOS -ID:\STM32Cube_FW_L4_V1.12.0\Middlewares\Third_Party\FreeRTOS\Source\include -ID:\STM32Cube_FW_L4_V1.12.0\Middlewares\ST\STM32_USB_Device_Library\Core\Inc -ID:\STM32Cube_FW_L4_V1.12.0\Middlewares\Third_Party\FreeRTOS\Source\portable\GCC\ARM_CM4F -ID:\STM32Cube_FW_L4_V1.12.0\Projects\32L4R9IDISCOVERY\Demonstrations\STemWin\Gui\Core\generated -ID:\STM32Cube_FW_L4_V1.12.0\Projects\32L4R9IDISCOVERY\Demonstrations\STemWin\Modules\iddmeasure -ID:\STM32Cube_FW_L4_V1.12.0\Projects\32L4R9IDISCOVERY\Demonstrations\STemWin\Modules\audioplayer -O0 -g -fstack-usage -Wall -specs=nano.specs -o Gui\Core\power_measurement\generated\modes\low_power_sleep_mode\low_power_sleep_mode_text.o

..\Modules\iddmeasure\iddmeasure.c: In function 'Idd_LprRestore':

..\Modules\iddmeasure\iddmeasure.c:603:3: warning: implicit declaration of function 'SystemClock_Config' [-Wimplicit-function-declaration]

SystemClock_Config();

^~~~~~~~~~~~~~~~~~

..\Modules\iddmeasure\iddmeasure.c: In function 'SystemHardwareInit':

..\Modules\iddmeasure\iddmeasure.c:1133:3: warning: implicit declaration of function 'Init_RTC' [-Wimplicit-function-declaration]

Init_RTC();

^~~~~~~~

..\Modules\iddmeasure\iddmeasure.c:1135:3: warning: implicit declaration of function 'TIMER_Init' [-Wimplicit-function-declaration]

arm-atollic-eabi-gcc -c ..\Gui\Core\generated\fonts\RobotoCnBold48.c -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -std=gnu11 -ID:\STM32Cube_FW_L4_V1.12.0\Middlewares\ST\STemWin\inc -ID:\STM32Cube_FW_L4_V1.12.0\Projects\32L4R9IDISCOVERY\Demonstrations\STemWin\Gui\Target -ID:\STM32Cube_FW_L4_V1.12.0\Projects\32L4R9IDISCOVERY\Demonstrations\STemWin\Core\Inc -ID:\STM32Cube_FW_L4_V1.12.0\Drivers\STM32L4xx_HAL_Driver\Inc -ID:\STM32Cube_FW_L4_V1.12.0\Projects\32L4R9IDISCOVERY\Demonstrations\STemWin\Binary\Config -ID:\STM32Cube_FW_L4_V1.12.0\Drivers\CMSIS\Device\ST\STM32L4xx\Include -ID:\STM32Cube_FW_L4_V1.12.0\Middlewares\Third_Party\FatFs\src -ID:\STM32Cube_FW_L4_V1.12.0\Drivers\CMSIS\Include -ID:\STM32Cube_FW_L4_V1.12.0\Drivers\BSP\STM32L4R9I-Discovery -ID:\STM32Cube_FW_L4_V1.12.0\Middlewares\Third_Party\FreeRTOS\Source\CMSIS_RTOS -ID:\STM32Cube_FW_L4_V1.12.0\Middlewares\Third_Party\FreeRTOS\Source\include -ID:\STM32Cube_FW_L4_V1.12.0\Middlewares\ST\STM32_USB_Device_Library\Core\Inc -ID:\STM32Cube_FW_L4_V1.12.0\Middlewares\Third_Party\FreeRTOS\Source\portable\GCC\ARM_CM4F -ID:\STM32Cube_FW_L4_V1.12.0\Projects\32L4R9IDISCOVERY\Demonstrations\STemWin\Gui\Core\generated -ID:\STM32Cube_FW_L4_V1.12.0\Projects\32L4R9IDISCOVERY\Demonstrations\STemWin\Modules\iddmeasure -ID:\STM32Cube_FW_L4_V1.12.0\Projects\32L4R9IDISCOVERY\Demonstrations\STemWin\Modules\audioplayer -O0 -g -fstack-usage -Wall -specs=nano.specs -o Gui\Core\generated\fonts\RobotoCnBold48.o

TIMER_Init(TimerInitMode_Full, &RTCHandle);

^~~~~~~~~~

..\Modules\iddmeasure\iddmeasure.c:1135:14: error: 'TimerInitMode_Full' undeclared (first use in this function)

TIMER_Init(TimerInitMode_Full, &RTCHandle);

^~~~~~~~~~~~~~~~~~

..\Modules\iddmeasure\iddmeasure.c:1135:14: note: each undeclared identifier is reported only once for each function it appears in

..\Modules\iddmeasure\iddmeasure.c:1135:35: error: 'RTCHandle' undeclared (first use in this function)

TIMER_Init(TimerInitMode_Full, &RTCHandle);

^~~~~~~~~

arm-atollic-eabi-gcc -c ..\Gui\Core\power_measurement\generated\buttons\button_run\animation\cercle1\animation_circle1_opacity90.c -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -std=gnu11 -ID:\STM32Cube_FW_L4_V1.12.0\Middlewares\ST\STemWin\inc -ID:\STM32Cube_FW_L4_V1.12.0\Projects\32L4R9IDISCOVERY\Demonstrations\STemWin\Gui\Target -ID:\STM32Cube_FW_L4_V1.12.0\Projects\32L4R9IDISCOVERY\Demonstrations\STemWin\Core\Inc -ID:\STM32Cube_FW_L4_V1.12.0\Drivers\STM32L4xx_HAL_Driver\Inc -ID:\STM32Cube_FW_L4_V1.12.0\Projects\32L4R9IDISCOVERY\Demonstrations\STemWin\Binary\Config -ID:\STM32Cube_FW_L4_V1.12.0\Drivers\CMSIS\Device\ST\STM32L4xx\Include -ID:\STM32Cube_FW_L4_V1.12.0\Middlewares\Third_Party\FatFs\src -ID:\STM32Cube_FW_L4_V1.12.0\Drivers\CMSIS\Include -ID:\STM32Cube_FW_L4_V1.12.0\Drivers\BSP\STM32L4R9I-Discovery -ID:\STM32Cube_FW_L4_V1.12.0\Middlewares\Third_Party\FreeRTOS\Source\CMSIS_RTOS -ID:\STM32Cube_FW_L4_V1.12.0\Middlewares\Third_Party\FreeRTOS\Source\include -ID:\STM32Cube_FW_L4_V1.12.0\Middlewares\ST\STM32_USB_Device_Library\Core\Inc -ID:\STM32Cube_FW_L4_V1.12.0\Middlewares\Third_Party\FreeRTOS\Source\portable\GCC\ARM_CM4F -ID:\STM32Cube_FW_L4_V1.12.0\Projects\32L4R9IDISCOVERY\Demonstrations\STemWin\Gui\Core\generated -ID:\STM32Cube_FW_L4_V1.12.0\Projects\32L4R9IDISCOVERY\Demonstrations\STemWin\Modules\iddmeasure -ID:\STM32Cube_FW_L4_V1.12.0\Projects\32L4R9IDISCOVERY\Demonstrations\STemWin\Modules\audioplayer -O0 -g -fstack-usage -Wall -specs=nano.specs -o Gui\Core\power_measurement\generated\buttons\button_run\animation\cercle1\animation_circle1_opacity90.o

Info: Parallel threads used: 8
12 REPLIES 12
Dilbert K
Senior

I am using the AC6-System Workbench. I disassembled the code and GUI_Init is called...

But still nothing show up.

I do get the BSP display working : C:\stm32\STM32Cube_FW_L4_V1.12.0\Projects\32L4R9IDISCOVERY\Examples\BSP\SW4STM32

Just not the STemWin...

Dilbert K
Senior

Got the "Hello World" displayed using IAR (eval copy)

Have compared and both AC6 & IAR sharing all the files except Library & project file (as expected).

Anyone able to have AC6 release from ST working ??

Harvey Zhang
Associate

I got the AC6-System Workbench version working. The problem is that the frame buffer is not aligned to 32 bytes boundary. To archive this, the link script STM32L4R9AIIx_FLASH.ld under STM32Cube_FW_L4_V1.12.0\Projects\32L4R9IDISCOVERY\Applications\STemWin\HelloWorld\SW4STM32\STM32L4R9I-Discovery needs to be modifed. According to the source code in LCDConf.c the frame buffer should be put into a standalone section called ".FrameBufferSection". Add this section in the link script and section setting looks like this:

.FrameBufferSection :
  {
    . = ALIGN(32);
  } >RAM