cancel
Showing results for 
Search instead for 
Did you mean: 

HAL_LockTypeDef type error

GreenGuy
Senior III
Posted on May 28, 2016 at 09:58

I am compiling code for STM32F746G discovery and I am stuck on an error that makes no sense.  The error occurs in stm32f7xx_hal_dma2d.h when in line 190 is declared:

  HAL_LockTypeDef             Lock;

The compiler complains, unknown type name 'HAL_LockTypeDef' but the type is defined in #include ''stm32f7xx_hal_def.h'' on line 47 and in stm32f7xx_hal_def.h the typedef is:

typedef enum {

  HAL_UNLOCKED = 0x00,

  HAL_LOCKED   = 0x01  

} HAL_LockTypeDef;

This should be straight forward but I cannot see reason for the error.

All of the file mentioned are in the latest version of Repo for stm32f7.

I tried using the typedef just below the declaration and it works.

I tried moving the test declaration just after the include and it generates the error as if the include was not included.  The paths are all there and the include call does not fail for file not found.  Why within the scope of the ...dma2d.h file would the definition be lost after the include of the ..._hal_def.h file?

 
1 REPLY 1
Walid FTITI_O
Senior II
Posted on May 30, 2016 at 15:33

Hi greenwood.greg,

I have test the DMA2D examples in STM32CubeF7 V1.4.0 and everything is fine .

Ensure that you use the last version of toolchain indicated in the release note of the package.

-Hannibal-