Skip to content

Commit 73aa8fc

Browse files
committed
chore(system): define USE_HAL_DRIVER on command line
this ensure to have the same behavior each time stm32yyxx.h is included. Signed-off-by: Frederic Pillon <[email protected]>
1 parent 91671d4 commit 73aa8fc

File tree

6 files changed

+3
-7
lines changed

6 files changed

+3
-7
lines changed

CI/update/templates/system_stm32yyxx.c

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#define USE_HAL_DRIVER
2-
31
{% for system in system_list %}
42
{% if loop.first %}
53
#ifdef {{system.serie}}

cmake/set_base_arduino_config.cmake

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ target_link_libraries(base_config INTERFACE
2222
gcc
2323
)
2424
target_compile_definitions(base_config INTERFACE
25+
USE_HAL_DRIVER
2526
USE_FULL_LL_DRIVER
2627
ARDUINO_ARCH_STM32
2728
)

cores/arduino/stm32/stm32_def.h

-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020
|(STM32_CORE_VERSION_PATCH << 8U )\
2121
|(STM32_CORE_VERSION_EXTRA))
2222

23-
#define USE_HAL_DRIVER
24-
2523
#if defined(STM32C0xx)
2624
#include "stm32c0xx.h"
2725
#elif defined(STM32F0xx)

libraries/SrcWrapper/src/stm32/system_stm32yyxx.c

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#define USE_HAL_DRIVER
2-
31
#ifdef STM32C0xx
42
#include "system_stm32c0xx.c"
53
#elif STM32F0xx

platform.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ compiler.objcopy.cmd=arm-none-eabi-objcopy
5858
compiler.elf2hex.cmd=arm-none-eabi-objcopy
5959
compiler.libraries.ldflags=
6060

61-
compiler.extra_flags=-mcpu={build.mcu} {build.fpu} {build.float-abi} -DVECT_TAB_OFFSET={build.flash_offset} -DUSE_FULL_LL_DRIVER -mthumb "@{build.opt.path}"
61+
compiler.extra_flags=-mcpu={build.mcu} {build.fpu} {build.float-abi} -DVECT_TAB_OFFSET={build.flash_offset} -DUSE_HAL_DRIVER -DUSE_FULL_LL_DRIVER -mthumb "@{build.opt.path}"
6262

6363
compiler.S.flags={compiler.extra_flags} -c -x assembler-with-cpp {compiler.stm.extra_include}
6464

tools/platformio/platformio-build.py

+1
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@ def get_arduino_board_id(board_config, mcu):
243243
"ARDUINO_%s" % board_id,
244244
("BOARD_NAME", '\\"%s\\"' % board_id),
245245
"HAL_UART_MODULE_ENABLED",
246+
"USE_HAL_DRIVER",
246247
"USE_FULL_LL_DRIVER",
247248
(
248249
"VARIANT_H",

0 commit comments

Comments
 (0)