Include Madness
Hi Everbody
i am ripping my hair out to understand whats going on here...
i made a STM32CubeMX project for the STM32F769I-DISCO, with FreeRTOS, imported it,
added the Driver-Things and the Board-Files to the Source-Tree and after
solving some Initializing/Timing-problems with the LCD i got it working, yeah!
next step get stemwin to run, and i am running into some strange include issues...
notice: is there some possibility to post code without formating?
when in the main.c i have
#include “stm32f7xx_hal.h”
#include “cmsis_os.h”
#include “main.h”
/* USER CODE BEGIN Includes main.c*/
#include “stm32f769i_discovery.h”
#include “stm32f769i_discovery_lcd.h”
#include “stm32f769i_discovery_sdram.h”
#include “stm32f769i_discovery_ts.h”
/* USER CODE END Includes */
and the main.h file does not have any includes
it compiles and runs...
BUT...
when i put the includes in the main.h
#ifndef __MAIN_H
#define __MAIN_H
/* USER CODE BEGIN Includes main.h */
#include “stm32f769i_discovery.h”
#include “stm32f769i_discovery_lcd.h”
#include “stm32f769i_discovery_sdram.h”
#include “stm32f769i_discovery_ts.h”
/* USER CODE END Includes */
/* some GPIO-Defines */
#endif /* __MAIN_H */
and just have in main.c
#include “stm32f7xx_hal.h”
#include “cmsis_os.h”
#include “main.h”
i get really strange errors, from files that are not at all realted to main.h (not include from there)
In file included from D:/Arbeit/STM32F769/Workspace/lcd5/Inc/main.h:52:0,
from D:/Arbeit/STM32F769/Workspace/lcd5/Inc/stm32f7xx_hal_conf.h:43,
from D:/Arbeit/STM32F769/Workspace/lcd5/Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal.h:48,
from D:/Arbeit/STM32F769/Workspace/lcd5/Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal.c:54:
D:/Arbeit/STM32F769/Workspace/lcd5/SW4STM32/lcd5/Drivers/BSP/STM32F769I-Discovery/stm32f769i_discovery.h:307:1: error: unknown type name ‘uint32_t’
uint32_t BSP_GetVersion(void);
D:/Arbeit/STM32F769/Workspace/lcd5/SW4STM32/lcd5/Drivers/BSP/STM32F769I-Discovery/stm32f769i_discovery.h:315:1: error: unknown type name ‘uint32_t’
uint32_t BSP_PB_GetState(Button_TypeDef Button);
In file included from D:/Arbeit/STM32F769/Workspace/lcd5/SW4STM32/lcd5/Drivers/BSP/STM32F769I-Discovery/stm32f769i_discovery_lcd.h:56:0,
from D:/Arbeit/STM32F769/Workspace/lcd5/Inc/main.h:53,
from D:/Arbeit/STM32F769/Workspace/lcd5/Inc/stm32f7xx_hal_conf.h:43,
from D:/Arbeit/STM32F769/Workspace/lcd5/Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal.h:48,
from D:/Arbeit/STM32F769/Workspace/lcd5/Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal.c:54:
D:/Arbeit/STM32F769/Workspace/lcd5/SW4STM32/lcd5/Drivers/BSP/STM32F769I-Discovery/stm32f769i_discovery_sdram.h:136:27: error: unknown type name ‘FMC_SDRAM_CommandTypeDef’
uint8_t BSP_SDRAM_Sendcmd(FMC_SDRAM_CommandTypeDef *SdramCmd);
D:/Arbeit/STM32F769/Workspace/lcd5/SW4STM32/lcd5/Drivers/BSP/STM32F769I-Discovery/stm32f769i_discovery_sdram.h:140:27: error: unknown type name ‘SDRAM_HandleTypeDef’
void BSP_SDRAM_MspInit(SDRAM_HandleTypeDef *hsdram, void *Params);
D:/Arbeit/STM32F769/Workspace/lcd5/SW4STM32/lcd5/Drivers/BSP/STM32F769I-Discovery/stm32f769i_discovery_sdram.h:141:29: error: unknown type name ‘SDRAM_HandleTypeDef’
void BSP_SDRAM_MspDeInit(SDRAM_HandleTypeDef *hsdram, void *Params);
In file included from D:/Arbeit/STM32F769/Workspace/lcd5/Inc/main.h:53:0,
from D:/Arbeit/STM32F769/Workspace/lcd5/Inc/stm32f7xx_hal_conf.h:43,
from D:/Arbeit/STM32F769/Workspace/lcd5/Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal.h:48,
from D:/Arbeit/STM32F769/Workspace/lcd5/Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal.c:54:
D:/Arbeit/STM32F769/Workspace/lcd5/SW4STM32/lcd5/Drivers/BSP/STM32F769I-Discovery/stm32f769i_discovery_lcd.h:344:55: error: unknown type name ‘FunctionalState’
void BSP_LCD_SetLayerVisible(uint32_t LayerIndex, FunctionalState State);
D:/Arbeit/STM32F769/Workspace/lcd5/SW4STM32/lcd5/Drivers/BSP/STM32F769I-Discovery/stm32f769i_discovery_lcd.h:388:8: error: unknown type name ‘DMA2D_HandleTypeDef’
extern DMA2D_HandleTypeDef hdma2d_discovery;
make: *** Drivers/STM32F7xx_HAL_Driver/stm32f7xx_hal.o Error 1
the include-Directories are in the Include-searchpath
i am on Win7Pro X64,
ARM Compiler for MCU 1.13.2.201703061529 fr.ac6.feature.mcu.externaltools.armnone.feature.group Ac6
OpenOCD 1.13.1.201703061529 fr.ac6.feature.mcu.externaltools.openocd.feature.group Ac6
OpenSTM32 IDE 1.14.0.201703061529 fr.ac6.feature.mcu.ide.feature.group Ac6
fully updated
many thanks for any enlightment
styro