cancel
Showing results for 
Search instead for 
Did you mean: 

H7 firmware v1.11.2 conflicting types in stm32h7xx_hal_hcd.c and in stm32h7xx_ll_usb.c

I upgraded from v1.11.1 to v1.11.2. Now it won't even compile due to bugs in ST code:

 

../Core/Src/USB/stm32h7xx_hal_hcd.c:1070:18: error: conflicting types for 'HAL_HCD_GetState'; have 'HCD_StateTypeDef(HCD_HandleTypeDef *)'
../Core/Src/USB/stm32h7xx_hal_hcd.c:1089:21: error: conflicting types for 'HAL_HCD_HC_GetURBState'; have 'HCD_URBStateTypeDef(HCD_HandleTypeDef *, uint8_t)' {aka 'USB_URBStateTypeDef(HCD_HandleTypeDef *, unsigned char)'}
../Core/Src/USB/stm32h7xx_hal_hcd.c:1102:10: error: conflicting types for 'HAL_HCD_HC_GetXferCount'; have 'uint32_t(HCD_HandleTypeDef *, uint8_t)' {aka 'long unsigned int(HCD_HandleTypeDef *, unsigned char)'}
../Core/Src/USB/stm32h7xx_hal_hcd.c:1124:21: error: conflicting types for 'HAL_HCD_HC_GetState'; have 'HCD_HCStateTypeDef(HCD_HandleTypeDef *, uint8_t)' {aka 'USB_HCStateTypeDef(HCD_HandleTypeDef *, unsigned char)'}
../Core/Src/USB/stm32h7xx_ll_usb.c:551:19: error: conflicting types for 'USB_SetDevSpeed'; have 'HAL_StatusTypeDef(USB_OTG_GlobalTypeDef *, uint8_t)' {aka 'HAL_StatusTypeDef(USB_OTG_GlobalTypeDef *, unsigned char)'}
../Core/Src/USB/stm32h7xx_ll_usb.c:567:9: error: conflicting types for 'USB_GetDevSpeed'; have 'uint8_t(USB_OTG_GlobalTypeDef *)' {aka 'unsigned char(USB_OTG_GlobalTypeDef *)'}
../Core/Src/USB/stm32h7xx_ll_usb.c:596:19: error: conflicting types for 'USB_ActivateEndpoint'; have 'HAL_StatusTypeDef(USB_OTG_GlobalTypeDef *, USB_OTG_EPTypeDef *)' {aka 'HAL_StatusTypeDef(USB_OTG_GlobalTypeDef *, USB_EPTypeDef *)'}
../Core/Src/USB/stm32h7xx_ll_usb.c:634:19: error: conflicting types for 'USB_ActivateDedicatedEndpoint'; have 'HAL_StatusTypeDef(USB_OTG_GlobalTypeDef *, USB_OTG_EPTypeDef *)' {aka 'HAL_StatusTypeDef(USB_OTG_GlobalTypeDef *, USB_EPTypeDef *)'}
../Core/Src/USB/stm32h7xx_ll_usb.c:673:19: error: conflicting types for 'USB_DeactivateEndpoint'; have 'HAL_StatusTypeDef(USB_OTG_GlobalTypeDef *, USB_OTG_EPTypeDef *)' {aka 'HAL_StatusTypeDef(USB_OTG_GlobalTypeDef *, USB_EPTypeDef *)'}
../Core/Src/USB/stm32h7xx_ll_usb.c:720:19: error: conflicting types for 'USB_DeactivateDedicatedEndpoint'; have 'HAL_StatusTypeDef(USB_OTG_GlobalTypeDef *, USB_OTG_EPTypeDef *)' {aka 'HAL_StatusTypeDef(USB_OTG_GlobalTypeDef *, USB_EPTypeDef *)'}
../Core/Src/USB/stm32h7xx_ll_usb.c:934:19: error: conflicting types for 'USB_EPStopXfer'; have 'HAL_StatusTypeDef(USB_OTG_GlobalTypeDef *, USB_OTG_EPTypeDef *)' {aka 'HAL_StatusTypeDef(USB_OTG_GlobalTypeDef *, USB_EPTypeDef *)'}
../Core/Src/USB/stm32h7xx_ll_usb.c:998:19: error: conflicting types for 'USB_WritePacket'; have 'HAL_StatusTypeDef(USB_OTG_GlobalTypeDef *, uint8_t *, uint8_t,  uint16_t,  uint8_t)' {aka 'HAL_StatusTypeDef(USB_OTG_GlobalTypeDef *, unsigned char *, unsigned char,  short unsigned int,  unsigned char)'}
../Core/Src/USB/stm32h7xx_ll_usb.c:1029:7: error: conflicting types for 'USB_ReadPacket'; have 'void *(USB_OTG_GlobalTypeDef *, uint8_t *, uint16_t)' {aka 'void *(USB_OTG_GlobalTypeDef *, unsigned char *, short unsigned int)'}
../Core/Src/USB/stm32h7xx_ll_usb.c:1071:19: error: conflicting types for 'USB_EPSetStall'; have 'HAL_StatusTypeDef(USB_OTG_GlobalTypeDef *, USB_OTG_EPTypeDef *)' {aka 'HAL_StatusTypeDef(USB_OTG_GlobalTypeDef *, USB_EPTypeDef *)'}
../Core/Src/USB/stm32h7xx_ll_usb.c:1102:19: error: conflicting types for 'USB_EPClearStall'; have 'HAL_StatusTypeDef(USB_OTG_GlobalTypeDef *, USB_OTG_EPTypeDef *)' {aka 'HAL_StatusTypeDef(USB_OTG_GlobalTypeDef *, USB_EPTypeDef *)'}
../Core/Src/USB/stm32h7xx_ll_usb.c:1172:19: error: conflicting types for 'USB_SetDevAddress'; have 'HAL_StatusTypeDef(USB_OTG_GlobalTypeDef *, uint8_t)' {aka 'HAL_StatusTypeDef(USB_OTG_GlobalTypeDef *, unsigned char)'}
../Core/Src/USB/stm32h7xx_ll_usb.c:1187:19: error: conflicting types for 'USB_DevConnect'; have 'HAL_StatusTypeDef(USB_OTG_GlobalTypeDef *)'
../Core/Src/USB/stm32h7xx_ll_usb.c:1204:19: error: conflicting types for 'USB_DevDisconnect'; have 'HAL_StatusTypeDef(USB_OTG_GlobalTypeDef *)'
../Core/Src/USB/stm32h7xx_ll_usb.c:1221:10: error: conflicting types for 'USB_ReadInterrupts'; have 'uint32_t(USB_OTG_GlobalTypeDef *)' {aka 'long unsigned int(USB_OTG_GlobalTypeDef *)'}
../Core/Src/USB/stm32h7xx_ll_usb.c:1237:10: error: conflicting types for 'USB_ReadChInterrupts'; have 'uint32_t(USB_OTG_GlobalTypeDef *, uint8_t)' {aka 'long unsigned int(USB_OTG_GlobalTypeDef *, unsigned char)'}
../Core/Src/USB/stm32h7xx_ll_usb.c:1253:10: error: conflicting types for 'USB_ReadDevAllOutEpInterrupt'; have 'uint32_t(USB_OTG_GlobalTypeDef *)' {aka 'long unsigned int(USB_OTG_GlobalTypeDef *)'}
../Core/Src/USB/stm32h7xx_ll_usb.c:1269:10: error: conflicting types for 'USB_ReadDevAllInEpInterrupt'; have 'uint32_t(USB_OTG_GlobalTypeDef *)' {aka 'long unsigned int(USB_OTG_GlobalTypeDef *)'}
../Core/Src/USB/stm32h7xx_ll_usb.c:1287:10: error: conflicting types for 'USB_ReadDevOutEPInterrupt'; have 'uint32_t(USB_OTG_GlobalTypeDef *, uint8_t)' {aka 'long unsigned int(USB_OTG_GlobalTypeDef *, unsigned char)'}
../Core/Src/USB/stm32h7xx_ll_usb.c:1305:10: error: conflicting types for 'USB_ReadDevInEPInterrupt'; have 'uint32_t(USB_OTG_GlobalTypeDef *, uint8_t)' {aka 'long unsigned int(USB_OTG_GlobalTypeDef *, unsigned char)'}
../Core/Src/USB/stm32h7xx_ll_usb.c:1339:10: error: conflicting types for 'USB_GetMode'; have 'uint32_t(USB_OTG_GlobalTypeDef *)' {aka 'long unsigned int(USB_OTG_GlobalTypeDef *)'}
../Core/Src/USB/stm32h7xx_ll_usb.c:1349:19: error: conflicting types for 'USB_ActivateSetup'; have 'HAL_StatusTypeDef(USB_OTG_GlobalTypeDef *)'
../Core/Src/USB/stm32h7xx_ll_usb.c:1371:19: error: conflicting types for 'USB_EP0_OutStart'; have 'HAL_StatusTypeDef(USB_OTG_GlobalTypeDef *, uint8_t,  uint8_t *)' {aka 'HAL_StatusTypeDef(USB_OTG_GlobalTypeDef *, unsigned char,  unsigned char *)'}
../Core/Src/USB/stm32h7xx_ll_usb.c:1542:19: error: conflicting types for 'USB_InitFSLSPClkSel'; have 'HAL_StatusTypeDef(USB_OTG_GlobalTypeDef *, uint8_t)' {aka 'HAL_StatusTypeDef(USB_OTG_GlobalTypeDef *, unsigned char)'}
../Core/Src/USB/stm32h7xx_ll_usb.c:1572:19: error: conflicting types for 'USB_ResetPort'; have 'HAL_StatusTypeDef(USB_OTG_GlobalTypeDef *)'
../Core/Src/USB/stm32h7xx_ll_usb.c:1638:19: error: conflicting types for 'USB_DriveVbus'; have 'HAL_StatusTypeDef(USB_OTG_GlobalTypeDef *, uint8_t)' {aka 'HAL_StatusTypeDef(USB_OTG_GlobalTypeDef *, unsigned char)'}
../Core/Src/USB/stm32h7xx_ll_usb.c:1668:10: error: conflicting types for 'USB_GetHostSpeed'; have 'uint32_t(USB_OTG_GlobalTypeDef *)' {aka 'long unsigned int(USB_OTG_GlobalTypeDef *)'}
../Core/Src/USB/stm32h7xx_ll_usb.c:1682:10: error: conflicting types for 'USB_GetCurrentFrame'; have 'uint32_t(USB_OTG_GlobalTypeDef *)' {aka 'long unsigned int(USB_OTG_GlobalTypeDef *)'}
../Core/Src/USB/stm32h7xx_ll_usb.c:1979:10: error: conflicting types for 'USB_HC_ReadInterrupt'; have 'uint32_t(USB_OTG_GlobalTypeDef *)' {aka 'long unsigned int(USB_OTG_GlobalTypeDef *)'}
../Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_usb.h:548:19: note: previous declaration of 'USB_HC_ReadInterrupt' with type 'uint32_t(const USB_OTG_GlobalTypeDef *)' {aka 'long unsigned int(const USB_OTG_GlobalTypeDef *)'}
../Core/Src/USB/stm32h7xx_ll_usb.c:1993:19: error: conflicting types for 'USB_HC_Halt'; have 'HAL_StatusTypeDef(USB_OTG_GlobalTypeDef *, uint8_t)' {aka 'HAL_StatusTypeDef(USB_OTG_GlobalTypeDef *, unsigned char)'}
../Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_usb.h:549:19: note: previous declaration of 'USB_HC_Halt' with type 'HAL_StatusTypeDef(const USB_OTG_GlobalTypeDef *, uint8_t)' {aka 'HAL_StatusTypeDef(const USB_OTG_GlobalTypeDef *, unsigned char)'}
../Core/Src/USB/stm32h7xx_ll_usb.c:2068:19: error: conflicting types for 'USB_DoPing'; have 'HAL_StatusTypeDef(USB_OTG_GlobalTypeDef *, uint8_t)' {aka 'HAL_StatusTypeDef(USB_OTG_GlobalTypeDef *, unsigned char)'}
../Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_usb.h:550:19: note: previous declaration of 'USB_DoPing' with type 'HAL_StatusTypeDef(const USB_OTG_GlobalTypeDef *, uint8_t)' {aka 'HAL_StatusTypeDef(const USB_OTG_GlobalTypeDef *, unsigned char)'}
../Core/Src/USB/stm32h7xx_ll_usb.c:2157:19: error: conflicting types for 'USB_ActivateRemoteWakeup'; have 'HAL_StatusTypeDef(USB_OTG_GlobalTypeDef *)'
../Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_ll_usb.h:552:19: note: previous declaration of 'USB_ActivateRemoteWakeup' with type 'HAL_StatusTypeDef(const USB_OTG_GlobalTypeDef *)'
../Core/Src/USB/stm32h7xx_ll_usb.c:2175:19: error: conflicting types for 'USB_DeActivateRemoteWakeup'; have 'HAL_StatusTypeDef(USB_OTG_GlobalTypeDef *)'

I looked at the code for version v1.11.3 on github and it looks like it is fixed, but that version hasn't been released yet. So when can we expect a fix?

Kudo posts if you have the same problem and kudo replies if the solution works.
Click "Accept as Solution" if a reply solved your problem. If no solution was posted please answer with your own.
1 ACCEPTED SOLUTION

Accepted Solutions

@unsigned_char_array There's mismatch between versions of H7 HAL drivers repo and the "jumbo package".

As you can see on github, the jumbo pack 1.11.2 of Mar, 11 contains HAL drivers 1.11.3

STM32CubeH7 jumbo package 1.11.3 is not available on github yet.

You're not the 1st person confused by this ))

PavelA_1-1715703092512.png

 

 

PavelA_0-1715703036859.png

 

View solution in original post

4 REPLIES 4
STTwo-32
ST Employee

Hello @unsigned_char_array 

Sometimes the GitHub version is updated before the release on the CubeMX or the ST Website. The Next update will be done on the same time with one of the coming Cube Tools releases. If you find that the GitHub version will solve your issue. You may think about Cloning this GitHub repository and use it for your development.  

Best Regards.

STTwo-32

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

The github H7 version v1.11.3 was released on 2024-03-19 while STM32CubeMX 6.11.1 was released on 2024-04-25. So why wasn't that version included in that version? When can I expect that release? 

Kudo posts if you have the same problem and kudo replies if the solution works.
Click "Accept as Solution" if a reply solved your problem. If no solution was posted please answer with your own.

@unsigned_char_array There's mismatch between versions of H7 HAL drivers repo and the "jumbo package".

As you can see on github, the jumbo pack 1.11.2 of Mar, 11 contains HAL drivers 1.11.3

STM32CubeH7 jumbo package 1.11.3 is not available on github yet.

You're not the 1st person confused by this ))

PavelA_1-1715703092512.png

 

 

PavelA_0-1715703036859.png

 

Version v1.12.0 of Jumbo pack is now available (1.11.3 was skipped): https://github.com/STMicroelectronics/STM32CubeH7/tags

STM32CubeMX_V6.13.0 is available too.

I've downloaded them. It turns out we made some modifications in the USB library to make it non-blocking and to fix some bugs. Due to updated header files the source files needed to me merged. I added comments in the modified section to make merging easier and then merged them with the new files. Now everything works. It looks like the new USB library has some fixes.

 

Kudo posts if you have the same problem and kudo replies if the solution works.
Click "Accept as Solution" if a reply solved your problem. If no solution was posted please answer with your own.