cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4 discovery kit: cannot build example projects

fabio239955
Associate II
Posted on February 25, 2015 at 16:00

Hello

I've purchased the STM32F4 discovery kit for STM32F429 and downloaded the most recent version V1.4.0 of STM32Cube.

I have IAR ARM Embedded Workbench v6.70.3.

I've opened the workspace D:\vt3\canview4-TM32Cube_FW_F4_V1.4.0\Projects\STM32F429I-Discovery\Demonstrations\EWARM\Project.eww

When I try to build the example, the compiler reports many errors like:

Fatal Error[Pe1696]: cannot open source file ''dialog.h'' D:\vt3\canview4-wican\STM32Cube_FW_F4_V1.4.0\Projects\STM32F429I-Discovery\Demonstrations\Modules\benchmark\benchmark_win.c 29 

In fact, there is no file named ''dialog.h'' inside TM32Cube_FW_F4_V1.4.0 and all subdirectories. Many other header files are missing. Some header files are there but the compiler do not find because the include path is not configured in the IAR project.

Many other projects under TM32Cube_FW_F4_V1.4.0 fail to compile with similar errors. A lot of header files are missing!

Maybe I am doing something wrong here. Can anybody explain?

#stm32f4-discovery-include
2 REPLIES 2
Posted on February 25, 2015 at 16:53

When the compiler throws a lot of messages about include files you need to double check the project settings, especially the ''Include Paths'' these tend to be relative paths, so that could give some issues if the compiler/project spans several drives.

Not sure about dialog.h, I might presume it has to do with STemwin, or it's otherwise in the compilers include directory, etc.

Can't really help you with Cube or IAR

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
fabio239955
Associate II
Posted on February 25, 2015 at 19:13

Thanks Clive

so, the project TM32Cube_FW_F4_V1.4.0 are made with IAR version 7.10.3.6927.

I have version 6.70.3.6347 which does not import the project files quite well - the include paths and preprocessor defines get lost in the process.

The correct include paths:

$PROJ_DIR$\..\Core\inc

$PROJ_DIR$\..\Config

$PROJ_DIR$\..\..\..\..\Utilities\CPU

$PROJ_DIR$\..\..\..\..\Drivers\CMSIS\Device\ST\STM32F4xx\Include

$PROJ_DIR$\..\..\..\..\Drivers\STM32F4xx_HAL_Driver\Inc

$PROJ_DIR$\..\..\..\..\Drivers\BSP\STM32F429I-Discovery

$PROJ_DIR$\..\..\..\..\Drivers\BSP\Components\Common

$PROJ_DIR$\..\..\..\..\Middlewares\ST\STM32_USB_Host_Library\Core\Inc

$PROJ_DIR$\..\..\..\..\Middlewares\ST\STM32_USB_Host_Library\Class\MSC\Inc

$PROJ_DIR$\..\..\..\..\Middlewares\ST\STemWin\inc

$PROJ_DIR$\..\..\..\..\Middlewares\Third_Party\FatFs\src

$PROJ_DIR$\..\..\..\..\Middlewares\Third_Party\FatFs\src\drivers

$PROJ_DIR$\..\..\..\..\Middlewares\Third_Party\FreeRTOS\Source\portable\IAR\ARM_CM4F

$PROJ_DIR$\..\..\..\..\Middlewares\Third_Party\FreeRTOS\Source\include

$PROJ_DIR$\..\..\..\..\Middlewares\Third_Party\FreeRTOS\Source\CMSIS_RTOS

$PROJ_DIR$\..\..\..\..\Middlewares\Third_Party\LwIP\src\include\

$PROJ_DIR$\..\..\..\..\Middlewares\Third_Party\LwIP\src\include\ipv4

$PROJ_DIR$\..\..\..\..\Middlewares\Third_Party\LwIP\system

The correct preprocessor defines:

USE_HAL_DRIVER

STM32F439xx

USE_STM32F429I_DISCO

USE_USB_HS

With the above changes I was able to build and run the demo on the discovery board