TrueSTUDIO 8.1 Error "first defined here"

Discuss how to use the features of Atollic TrueSTUDIO, including the editor, assembler, C/C++ compiler, linker, debugger, static code analysis and team collaboration tools.

Moderators: Markus Girdland, Mattias Norlander

haweneu
Posts: 2
Joined: Tue Nov 28, 2017 8:22 am

TrueSTUDIO 8.1 Error "first defined here"

Postby haweneu » Tue Nov 28, 2017 8:50 am

Hello,
i made with CUBEMX a project (STM32F746DISCOVERY) for USB CDC with LTDC support and imported it in TrueSTUDIO 8.1.0.
It works well!

Then i wanted to add LCD and Touchscreen support and so i added inside TrueSTUDIO some "C-Folders" with "BSP" (LCD Drivers).
I added the Include Path.

Here are the exported settings after i set the include pathes!
<includepath workspace_path="true">/${ProjName}/BSP/STM32746G-Discovery</includepath>
<includepath workspace_path="true">/${ProjName}/Utilities/Fonts</includepath>
<includepath workspace_path="true">/${ProjName}/Drivers/STM32F7xx_HAL_Driver/Inc</includepath>
<includepath workspace_path="true">/${ProjName}/Drivers/CMSIS/Device/ST/STM32F7xx/Include</includepath>
<includepath workspace_path="true">/${ProjName}/Drivers/CMSIS/Include</includepath>
<includepath workspace_path="true">/${ProjName}/Middlewares/ST/STM32_USB_Device_Library/Core/Inc</includepath>
<includepath workspace_path="true">/${ProjName}/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc</includepath>
<includepath workspace_path="true">/${ProjName}/Inc</includepath>

If i compile, i see the error "first defined here".

It is from the following line in file "stm32746g_discovery_lcd.c"
__HAL_RCC_LTDC_CLK_ENABLE();

At top of "stm32746g_discovery_lcd.c" i have this include:
#include "stm32f7xx_hal_rcc_ex.h"


If i right click at the error line and select "open declaration", the editor finds the function in the source file "stm32f7xx_hal_rcc_ex.h" and displays this:
#define __HAL_RCC_LTDC_CLK_ENABLE() do { \
__IO uint32_t tmpreg; \
SET_BIT(RCC->APB2ENR, RCC_APB2ENR_LTDCEN);\
/* Delay after an RCC peripheral clock enabling */ \
tmpreg = READ_BIT(RCC->APB2ENR, RCC_APB2ENR_LTDCEN);\
UNUSED(tmpreg); \
} while(0)

So the editor finds the function but the compiler not! Very strange!

I cannot find any solution! Please help me.

Best regards
Werner

haweneu
Posts: 2
Joined: Tue Nov 28, 2017 8:22 am

Re: TrueSTUDIO 8.1 Error "first defined here"

Postby haweneu » Wed Nov 29, 2017 4:59 pm

Hi all,
no solution for me?

Best regards
Werner

hibiscus
Posts: 1
Joined: Fri Feb 21, 2020 10:15 am

Re: TrueSTUDIO 8.1 Error "first defined here"

Postby hibiscus » Fri Feb 21, 2020 10:16 am

You have something defined twice.

kumarip
Posts: 1
Joined: Thu Feb 27, 2020 5:39 am

Re: TrueSTUDIO 8.1 Error "first defined here"

Postby kumarip » Thu Feb 27, 2020 5:42 am

Thanks for the information.


Return to “Atollic TrueSTUDIO tool discussions”

Who is online

Users browsing this forum: No registered users and 5 guests