Skip to content

Commit f6075d4

Browse files
author
Jamie Smith
committed
Disable LL driver
1 parent d98b17c commit f6075d4

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

targets/TARGET_STM/TARGET_STM32H5/STM32Cube_FW/CMSIS/stm32h5xx.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
* is using in the C source code, usually in main.c. This file contains:
99
* - Configuration section that allows to select:
1010
* - The STM32H5xx device used in the target application
11-
* - To use or not the peripheral’s drivers in application code(i.e.
12-
* code will be based on direct access to peripheral’s registers
11+
* - To use or not the peripheral drivers in application code(i.e.
12+
* code will be based on direct access to peripherals' registers
1313
* rather than drivers API), this option is controlled by
1414
* "#define USE_HAL_DRIVER"
1515
*

targets/TARGET_STM/TARGET_STM32H5/STM32Cube_FW/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ target_sources(mbed-stm32h5cube-fw
9797
STM32H5xx_HAL_Driver/stm32h5xx_ll_fmc.c
9898
STM32H5xx_HAL_Driver/stm32h5xx_ll_gpio.c
9999
STM32H5xx_HAL_Driver/stm32h5xx_ll_i2c.c
100-
STM32H5xx_HAL_Driver/stm32h5xx_ll_i3c.c
101100
STM32H5xx_HAL_Driver/stm32h5xx_ll_icache.c
102101
STM32H5xx_HAL_Driver/stm32h5xx_ll_lptim.c
103102
STM32H5xx_HAL_Driver/stm32h5xx_ll_lpuart.c
@@ -114,6 +113,9 @@ target_sources(mbed-stm32h5cube-fw
114113
STM32H5xx_HAL_Driver/stm32h5xx_ll_usb.c
115114
STM32H5xx_HAL_Driver/stm32h5xx_ll_utils.c
116115
STM32H5xx_HAL_Driver/stm32h5xx_util_i3c.c
116+
117+
# NOTE: Don't compile stm32h5xx_ll_i3c.c, it does not build if the
118+
# HAL driver for i3c is enabled due to a circular include issue.
117119
)
118120

119121
# Silence warning

targets/TARGET_STM/TARGET_STM32H5/STM32Cube_FW/stm32h5xx_hal_conf.h

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -422,12 +422,9 @@ in voltage and temperature.*/
422422
#include "stm32h5xx_hal_i2s.h"
423423
#endif /* HAL_I2S_MODULE_ENABLED */
424424

425-
// Mbed patch to prevent circular include: ll_i3c.h includes this header, but hal_i3c.h needs ll_i3c.h to compile.
426-
// Boom.
427-
// So, don't include hal_i3c.h from this header.
428-
// #ifdef HAL_I3C_MODULE_ENABLED
429-
// #include "stm32h5xx_hal_i3c.h"
430-
// #endif /* HAL_I3C_MODULE_ENABLED */
425+
#ifdef HAL_I3C_MODULE_ENABLED
426+
#include "stm32h5xx_hal_i3c.h"
427+
#endif /* HAL_I3C_MODULE_ENABLED */
431428

432429
#ifdef HAL_IWDG_MODULE_ENABLED
433430
#include "stm32h5xx_hal_iwdg.h"

0 commit comments

Comments
 (0)