From 45c10e6137627bad010ebe7acf9c4d0d70f2415a Mon Sep 17 00:00:00 2001 From: Frederic Pillon Date: Mon, 6 Feb 2023 11:11:43 +0100 Subject: [PATCH 1/6] platform: moved from arm-none-eabi-gcc 10.3.1-2.3 to 12.2.1-1.2 See: https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack/releases/v12.2.1-1.2 Signed-off-by: Frederic Pillon --- platform.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform.txt b/platform.txt index 9cc2361786..5e0105449c 100644 --- a/platform.txt +++ b/platform.txt @@ -17,7 +17,7 @@ compiler.warning_flags.default= compiler.warning_flags.more=-Wall compiler.warning_flags.all=-Wall -Wextra -compiler.path={runtime.tools.xpack-arm-none-eabi-gcc-10.3.1-2.3.path}/bin/ +compiler.path={runtime.tools.xpack-arm-none-eabi-gcc-12.2.1-1.2.path}/bin/ compiler.S.cmd=arm-none-eabi-gcc compiler.c.cmd=arm-none-eabi-gcc From 522150cab30bf79d227d8741aad48d9a89c8dee5 Mon Sep 17 00:00:00 2001 From: Frederic Pillon Date: Mon, 6 Feb 2023 11:29:48 +0100 Subject: [PATCH 2/6] fix: add stdint.h as stdio.h providing only necessary types due to newlib version 4.2.0 provided within arm-none-eabi-gcc-12.2.1 See: https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git Title: In provide only necessary types Commit: 357d7fcc6ad1b0660e2b3131d09eb22e2559e46d Signed-off-by: Frederic Pillon --- cores/arduino/avr/dtostrf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/cores/arduino/avr/dtostrf.c b/cores/arduino/avr/dtostrf.c index eca8156354..6bd602d668 100644 --- a/cores/arduino/avr/dtostrf.c +++ b/cores/arduino/avr/dtostrf.c @@ -19,6 +19,7 @@ */ #include +#include #include #include From 794945c10abb2dc6a875c471bb9aa4cbb131e5a2 Mon Sep 17 00:00:00 2001 From: Frederic Pillon Date: Mon, 6 Feb 2023 16:16:34 +0100 Subject: [PATCH 3/6] chore: disable warning about rwx segments due to binutils version 2.39 provided within arm-none-eabi-gcc-12.2.1 Enabled by default since this version. Signed-off-by: Frederic Pillon --- platform.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform.txt b/platform.txt index 5e0105449c..b2ddd782bb 100644 --- a/platform.txt +++ b/platform.txt @@ -45,7 +45,7 @@ compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc, compiler.elf2bin.flags=-O binary compiler.elf2hex.flags=-O ihex -compiler.ldflags= +compiler.ldflags=-Wl,--no-warn-rwx-segments compiler.size.cmd=arm-none-eabi-size compiler.define=-DARDUINO= From 9c1195067fa9a4e5ab4cc4755e045698dd49e63e Mon Sep 17 00:00:00 2001 From: Frederic Pillon Date: Mon, 6 Feb 2023 17:44:42 +0100 Subject: [PATCH 4/6] feat: default language standards set to gnu C/C++17 Signed-off-by: Frederic Pillon --- platform.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/platform.txt b/platform.txt index b2ddd782bb..0f74672761 100644 --- a/platform.txt +++ b/platform.txt @@ -32,7 +32,7 @@ compiler.extra_flags=-mcpu={build.mcu} {build.fpu} {build.float-abi} -DUSE_FULL_ compiler.S.flags={compiler.extra_flags} -c -x assembler-with-cpp {compiler.stm.extra_include} -compiler.c.flags={compiler.extra_flags} -c {build.flags.optimize} {build.flags.debug} {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections --param max-inline-insns-single=500 -MMD {compiler.stm.extra_include} +compiler.c.flags={compiler.extra_flags} -c {build.flags.optimize} {build.flags.debug} {compiler.warning_flags} -std={compiler.c.std} -ffunction-sections -fdata-sections --param max-inline-insns-single=500 -MMD {compiler.stm.extra_include} compiler.cpp.flags={compiler.extra_flags} -c {build.flags.optimize} {build.flags.debug} {compiler.warning_flags} -std={compiler.cpp.std} -ffunction-sections -fdata-sections -fno-threadsafe-statics --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -fno-use-cxa-atexit -MMD {compiler.stm.extra_include} @@ -59,9 +59,10 @@ build.variant_h=variant_generic.h # These can be overridden in platform.local.txt compiler.c.st_extra_flags={build.peripheral_pins} compiler.c.extra_flags= +compiler.c.std=gnu17 compiler.c.elf.extra_flags= compiler.cpp.extra_flags= -compiler.cpp.std=gnu++14 +compiler.cpp.std=gnu++17 compiler.S.st_extra_flags={build.startup_file} compiler.S.extra_flags= compiler.ar.extra_flags= From 4a6c80b5f6a12a878662eb50d2aad89a1d6747f5 Mon Sep 17 00:00:00 2001 From: Frederic Pillon Date: Mon, 6 Feb 2023 17:45:34 +0100 Subject: [PATCH 5/6] ci(wrapper): update template to ignore register Signed-off-by: Frederic Pillon --- CI/update/templates/stm32yyxx_ll.h | 3 +++ CI/update/templates/stm32yyxx_ll_ppp.h | 3 +++ 2 files changed, 6 insertions(+) diff --git a/CI/update/templates/stm32yyxx_ll.h b/CI/update/templates/stm32yyxx_ll.h index 8145f0cac9..9e70477a84 100644 --- a/CI/update/templates/stm32yyxx_ll.h +++ b/CI/update/templates/stm32yyxx_ll.h @@ -4,6 +4,9 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#ifdef __cplusplus + #pragma GCC diagnostic ignored "-Wregister" +#endif /* Include Low Layers drivers */ {% for ll_header_name in ll_header_list %} diff --git a/CI/update/templates/stm32yyxx_ll_ppp.h b/CI/update/templates/stm32yyxx_ll_ppp.h index e6fa3a7f0d..2cf4c20e19 100644 --- a/CI/update/templates/stm32yyxx_ll_ppp.h +++ b/CI/update/templates/stm32yyxx_ll_ppp.h @@ -4,6 +4,9 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#ifdef __cplusplus + #pragma GCC diagnostic ignored "-Wregister" +#endif {% for serie in serieslist %} {% if loop.first %} From cfa31c038d2556ebab01bd603f249475c5df58d7 Mon Sep 17 00:00:00 2001 From: Frederic Pillon Date: Mon, 6 Feb 2023 17:46:20 +0100 Subject: [PATCH 6/6] chore: update wrapped files to ignore register warnings Signed-off-by: Frederic Pillon --- cores/arduino/stm32/LL/stm32yyxx_ll.h | 3 +++ cores/arduino/stm32/LL/stm32yyxx_ll_adc.h | 3 +++ cores/arduino/stm32/LL/stm32yyxx_ll_bdma.h | 3 +++ cores/arduino/stm32/LL/stm32yyxx_ll_bus.h | 3 +++ cores/arduino/stm32/LL/stm32yyxx_ll_comp.h | 3 +++ cores/arduino/stm32/LL/stm32yyxx_ll_cordic.h | 3 +++ cores/arduino/stm32/LL/stm32yyxx_ll_cortex.h | 3 +++ cores/arduino/stm32/LL/stm32yyxx_ll_crc.h | 3 +++ cores/arduino/stm32/LL/stm32yyxx_ll_crs.h | 3 +++ cores/arduino/stm32/LL/stm32yyxx_ll_dac.h | 3 +++ cores/arduino/stm32/LL/stm32yyxx_ll_dcache.h | 3 +++ cores/arduino/stm32/LL/stm32yyxx_ll_delayblock.h | 3 +++ cores/arduino/stm32/LL/stm32yyxx_ll_dlyb.h | 3 +++ cores/arduino/stm32/LL/stm32yyxx_ll_dma.h | 3 +++ cores/arduino/stm32/LL/stm32yyxx_ll_dma2d.h | 3 +++ cores/arduino/stm32/LL/stm32yyxx_ll_dmamux.h | 3 +++ cores/arduino/stm32/LL/stm32yyxx_ll_exti.h | 3 +++ cores/arduino/stm32/LL/stm32yyxx_ll_fmac.h | 3 +++ cores/arduino/stm32/LL/stm32yyxx_ll_fmc.h | 3 +++ cores/arduino/stm32/LL/stm32yyxx_ll_fmpi2c.h | 3 +++ cores/arduino/stm32/LL/stm32yyxx_ll_fsmc.h | 3 +++ cores/arduino/stm32/LL/stm32yyxx_ll_gpio.h | 3 +++ cores/arduino/stm32/LL/stm32yyxx_ll_hrtim.h | 3 +++ cores/arduino/stm32/LL/stm32yyxx_ll_hsem.h | 3 +++ cores/arduino/stm32/LL/stm32yyxx_ll_i2c.h | 3 +++ cores/arduino/stm32/LL/stm32yyxx_ll_icache.h | 3 +++ cores/arduino/stm32/LL/stm32yyxx_ll_ipcc.h | 3 +++ cores/arduino/stm32/LL/stm32yyxx_ll_iwdg.h | 3 +++ cores/arduino/stm32/LL/stm32yyxx_ll_lpgpio.h | 3 +++ cores/arduino/stm32/LL/stm32yyxx_ll_lptim.h | 3 +++ cores/arduino/stm32/LL/stm32yyxx_ll_lpuart.h | 3 +++ cores/arduino/stm32/LL/stm32yyxx_ll_mdma.h | 3 +++ cores/arduino/stm32/LL/stm32yyxx_ll_opamp.h | 3 +++ cores/arduino/stm32/LL/stm32yyxx_ll_pka.h | 3 +++ cores/arduino/stm32/LL/stm32yyxx_ll_pwr.h | 3 +++ cores/arduino/stm32/LL/stm32yyxx_ll_rcc.h | 3 +++ cores/arduino/stm32/LL/stm32yyxx_ll_rng.h | 3 +++ cores/arduino/stm32/LL/stm32yyxx_ll_rtc.h | 3 +++ cores/arduino/stm32/LL/stm32yyxx_ll_sdmmc.h | 3 +++ cores/arduino/stm32/LL/stm32yyxx_ll_spi.h | 3 +++ cores/arduino/stm32/LL/stm32yyxx_ll_swpmi.h | 3 +++ cores/arduino/stm32/LL/stm32yyxx_ll_system.h | 3 +++ cores/arduino/stm32/LL/stm32yyxx_ll_tim.h | 3 +++ cores/arduino/stm32/LL/stm32yyxx_ll_ucpd.h | 3 +++ cores/arduino/stm32/LL/stm32yyxx_ll_usart.h | 3 +++ cores/arduino/stm32/LL/stm32yyxx_ll_usb.h | 3 +++ cores/arduino/stm32/LL/stm32yyxx_ll_utils.h | 3 +++ cores/arduino/stm32/LL/stm32yyxx_ll_wwdg.h | 3 +++ 48 files changed, 144 insertions(+) diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll.h b/cores/arduino/stm32/LL/stm32yyxx_ll.h index 140d015b85..bba563cc13 100644 --- a/cores/arduino/stm32/LL/stm32yyxx_ll.h +++ b/cores/arduino/stm32/LL/stm32yyxx_ll.h @@ -4,6 +4,9 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#ifdef __cplusplus + #pragma GCC diagnostic ignored "-Wregister" +#endif /* Include Low Layers drivers */ #include "stm32yyxx_ll_adc.h" diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_adc.h b/cores/arduino/stm32/LL/stm32yyxx_ll_adc.h index 89d19a5057..42412d18eb 100644 --- a/cores/arduino/stm32/LL/stm32yyxx_ll_adc.h +++ b/cores/arduino/stm32/LL/stm32yyxx_ll_adc.h @@ -4,6 +4,9 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#ifdef __cplusplus + #pragma GCC diagnostic ignored "-Wregister" +#endif #ifdef STM32C0xx #include "stm32c0xx_ll_adc.h" diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_bdma.h b/cores/arduino/stm32/LL/stm32yyxx_ll_bdma.h index d38b938e8e..7dd3db671e 100644 --- a/cores/arduino/stm32/LL/stm32yyxx_ll_bdma.h +++ b/cores/arduino/stm32/LL/stm32yyxx_ll_bdma.h @@ -4,6 +4,9 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#ifdef __cplusplus + #pragma GCC diagnostic ignored "-Wregister" +#endif #ifdef STM32H7xx #include "stm32h7xx_ll_bdma.h" diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_bus.h b/cores/arduino/stm32/LL/stm32yyxx_ll_bus.h index b42e0d2206..5c844851f2 100644 --- a/cores/arduino/stm32/LL/stm32yyxx_ll_bus.h +++ b/cores/arduino/stm32/LL/stm32yyxx_ll_bus.h @@ -4,6 +4,9 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#ifdef __cplusplus + #pragma GCC diagnostic ignored "-Wregister" +#endif #ifdef STM32C0xx #include "stm32c0xx_ll_bus.h" diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_comp.h b/cores/arduino/stm32/LL/stm32yyxx_ll_comp.h index abc992f522..207d2b49a5 100644 --- a/cores/arduino/stm32/LL/stm32yyxx_ll_comp.h +++ b/cores/arduino/stm32/LL/stm32yyxx_ll_comp.h @@ -4,6 +4,9 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#ifdef __cplusplus + #pragma GCC diagnostic ignored "-Wregister" +#endif #ifdef STM32F0xx #include "stm32f0xx_ll_comp.h" diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_cordic.h b/cores/arduino/stm32/LL/stm32yyxx_ll_cordic.h index 60f2ead777..d70b4bf107 100644 --- a/cores/arduino/stm32/LL/stm32yyxx_ll_cordic.h +++ b/cores/arduino/stm32/LL/stm32yyxx_ll_cordic.h @@ -4,6 +4,9 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#ifdef __cplusplus + #pragma GCC diagnostic ignored "-Wregister" +#endif #ifdef STM32G4xx #include "stm32g4xx_ll_cordic.h" diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_cortex.h b/cores/arduino/stm32/LL/stm32yyxx_ll_cortex.h index e2ac7a89bc..20aa4094b2 100644 --- a/cores/arduino/stm32/LL/stm32yyxx_ll_cortex.h +++ b/cores/arduino/stm32/LL/stm32yyxx_ll_cortex.h @@ -4,6 +4,9 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#ifdef __cplusplus + #pragma GCC diagnostic ignored "-Wregister" +#endif #ifdef STM32C0xx #include "stm32c0xx_ll_cortex.h" diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_crc.h b/cores/arduino/stm32/LL/stm32yyxx_ll_crc.h index 918f5f6206..fd557b9500 100644 --- a/cores/arduino/stm32/LL/stm32yyxx_ll_crc.h +++ b/cores/arduino/stm32/LL/stm32yyxx_ll_crc.h @@ -4,6 +4,9 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#ifdef __cplusplus + #pragma GCC diagnostic ignored "-Wregister" +#endif #ifdef STM32C0xx #include "stm32c0xx_ll_crc.h" diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_crs.h b/cores/arduino/stm32/LL/stm32yyxx_ll_crs.h index 196ea97157..36f67b4b04 100644 --- a/cores/arduino/stm32/LL/stm32yyxx_ll_crs.h +++ b/cores/arduino/stm32/LL/stm32yyxx_ll_crs.h @@ -4,6 +4,9 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#ifdef __cplusplus + #pragma GCC diagnostic ignored "-Wregister" +#endif #ifdef STM32F0xx #include "stm32f0xx_ll_crs.h" diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_dac.h b/cores/arduino/stm32/LL/stm32yyxx_ll_dac.h index 44e4fb8fba..faf76d4ea5 100644 --- a/cores/arduino/stm32/LL/stm32yyxx_ll_dac.h +++ b/cores/arduino/stm32/LL/stm32yyxx_ll_dac.h @@ -4,6 +4,9 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#ifdef __cplusplus + #pragma GCC diagnostic ignored "-Wregister" +#endif #ifdef STM32F0xx #include "stm32f0xx_ll_dac.h" diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_dcache.h b/cores/arduino/stm32/LL/stm32yyxx_ll_dcache.h index e6350a74fc..b56068f8e9 100644 --- a/cores/arduino/stm32/LL/stm32yyxx_ll_dcache.h +++ b/cores/arduino/stm32/LL/stm32yyxx_ll_dcache.h @@ -4,6 +4,9 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#ifdef __cplusplus + #pragma GCC diagnostic ignored "-Wregister" +#endif #ifdef STM32U5xx #include "stm32u5xx_ll_dcache.h" diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_delayblock.h b/cores/arduino/stm32/LL/stm32yyxx_ll_delayblock.h index 3ba87dfab7..78023c1b9f 100644 --- a/cores/arduino/stm32/LL/stm32yyxx_ll_delayblock.h +++ b/cores/arduino/stm32/LL/stm32yyxx_ll_delayblock.h @@ -4,6 +4,9 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#ifdef __cplusplus + #pragma GCC diagnostic ignored "-Wregister" +#endif #ifdef STM32H7xx #include "stm32h7xx_ll_delayblock.h" diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_dlyb.h b/cores/arduino/stm32/LL/stm32yyxx_ll_dlyb.h index 26b0d9eb15..9e5c1b7bcc 100644 --- a/cores/arduino/stm32/LL/stm32yyxx_ll_dlyb.h +++ b/cores/arduino/stm32/LL/stm32yyxx_ll_dlyb.h @@ -4,6 +4,9 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#ifdef __cplusplus + #pragma GCC diagnostic ignored "-Wregister" +#endif #ifdef STM32U5xx #include "stm32u5xx_ll_dlyb.h" diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_dma.h b/cores/arduino/stm32/LL/stm32yyxx_ll_dma.h index 7bc7bf168c..5e73d672ab 100644 --- a/cores/arduino/stm32/LL/stm32yyxx_ll_dma.h +++ b/cores/arduino/stm32/LL/stm32yyxx_ll_dma.h @@ -4,6 +4,9 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#ifdef __cplusplus + #pragma GCC diagnostic ignored "-Wregister" +#endif #ifdef STM32C0xx #include "stm32c0xx_ll_dma.h" diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_dma2d.h b/cores/arduino/stm32/LL/stm32yyxx_ll_dma2d.h index 8544d8113c..7d77641095 100644 --- a/cores/arduino/stm32/LL/stm32yyxx_ll_dma2d.h +++ b/cores/arduino/stm32/LL/stm32yyxx_ll_dma2d.h @@ -4,6 +4,9 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#ifdef __cplusplus + #pragma GCC diagnostic ignored "-Wregister" +#endif #ifdef STM32F4xx #include "stm32f4xx_ll_dma2d.h" diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_dmamux.h b/cores/arduino/stm32/LL/stm32yyxx_ll_dmamux.h index 78cc071e08..2ea932be4f 100644 --- a/cores/arduino/stm32/LL/stm32yyxx_ll_dmamux.h +++ b/cores/arduino/stm32/LL/stm32yyxx_ll_dmamux.h @@ -4,6 +4,9 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#ifdef __cplusplus + #pragma GCC diagnostic ignored "-Wregister" +#endif #ifdef STM32C0xx #include "stm32c0xx_ll_dmamux.h" diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_exti.h b/cores/arduino/stm32/LL/stm32yyxx_ll_exti.h index e7f789d676..4a6a186906 100644 --- a/cores/arduino/stm32/LL/stm32yyxx_ll_exti.h +++ b/cores/arduino/stm32/LL/stm32yyxx_ll_exti.h @@ -4,6 +4,9 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#ifdef __cplusplus + #pragma GCC diagnostic ignored "-Wregister" +#endif #ifdef STM32C0xx #include "stm32c0xx_ll_exti.h" diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_fmac.h b/cores/arduino/stm32/LL/stm32yyxx_ll_fmac.h index dd742cd9ae..f4778bca50 100644 --- a/cores/arduino/stm32/LL/stm32yyxx_ll_fmac.h +++ b/cores/arduino/stm32/LL/stm32yyxx_ll_fmac.h @@ -4,6 +4,9 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#ifdef __cplusplus + #pragma GCC diagnostic ignored "-Wregister" +#endif #ifdef STM32G4xx #include "stm32g4xx_ll_fmac.h" diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_fmc.h b/cores/arduino/stm32/LL/stm32yyxx_ll_fmc.h index edf90bef04..13c8cc0189 100644 --- a/cores/arduino/stm32/LL/stm32yyxx_ll_fmc.h +++ b/cores/arduino/stm32/LL/stm32yyxx_ll_fmc.h @@ -4,6 +4,9 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#ifdef __cplusplus + #pragma GCC diagnostic ignored "-Wregister" +#endif #ifdef STM32F3xx #include "stm32f3xx_ll_fmc.h" diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_fmpi2c.h b/cores/arduino/stm32/LL/stm32yyxx_ll_fmpi2c.h index ed68d4eeb3..0db1039571 100644 --- a/cores/arduino/stm32/LL/stm32yyxx_ll_fmpi2c.h +++ b/cores/arduino/stm32/LL/stm32yyxx_ll_fmpi2c.h @@ -4,6 +4,9 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#ifdef __cplusplus + #pragma GCC diagnostic ignored "-Wregister" +#endif #ifdef STM32F4xx #include "stm32f4xx_ll_fmpi2c.h" diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_fsmc.h b/cores/arduino/stm32/LL/stm32yyxx_ll_fsmc.h index 95e87ef232..4aa01455b7 100644 --- a/cores/arduino/stm32/LL/stm32yyxx_ll_fsmc.h +++ b/cores/arduino/stm32/LL/stm32yyxx_ll_fsmc.h @@ -4,6 +4,9 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#ifdef __cplusplus + #pragma GCC diagnostic ignored "-Wregister" +#endif #ifdef STM32F1xx #include "stm32f1xx_ll_fsmc.h" diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_gpio.h b/cores/arduino/stm32/LL/stm32yyxx_ll_gpio.h index a5f2e8a4c4..71357b8026 100644 --- a/cores/arduino/stm32/LL/stm32yyxx_ll_gpio.h +++ b/cores/arduino/stm32/LL/stm32yyxx_ll_gpio.h @@ -4,6 +4,9 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#ifdef __cplusplus + #pragma GCC diagnostic ignored "-Wregister" +#endif #ifdef STM32C0xx #include "stm32c0xx_ll_gpio.h" diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_hrtim.h b/cores/arduino/stm32/LL/stm32yyxx_ll_hrtim.h index 3fb48e228d..282830a9b4 100644 --- a/cores/arduino/stm32/LL/stm32yyxx_ll_hrtim.h +++ b/cores/arduino/stm32/LL/stm32yyxx_ll_hrtim.h @@ -4,6 +4,9 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#ifdef __cplusplus + #pragma GCC diagnostic ignored "-Wregister" +#endif #ifdef STM32F3xx #include "stm32f3xx_ll_hrtim.h" diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_hsem.h b/cores/arduino/stm32/LL/stm32yyxx_ll_hsem.h index 08709339c9..042ef3e537 100644 --- a/cores/arduino/stm32/LL/stm32yyxx_ll_hsem.h +++ b/cores/arduino/stm32/LL/stm32yyxx_ll_hsem.h @@ -4,6 +4,9 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#ifdef __cplusplus + #pragma GCC diagnostic ignored "-Wregister" +#endif #ifdef STM32H7xx #include "stm32h7xx_ll_hsem.h" diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_i2c.h b/cores/arduino/stm32/LL/stm32yyxx_ll_i2c.h index aa71e4011d..487aaa6be4 100644 --- a/cores/arduino/stm32/LL/stm32yyxx_ll_i2c.h +++ b/cores/arduino/stm32/LL/stm32yyxx_ll_i2c.h @@ -4,6 +4,9 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#ifdef __cplusplus + #pragma GCC diagnostic ignored "-Wregister" +#endif #ifdef STM32C0xx #include "stm32c0xx_ll_i2c.h" diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_icache.h b/cores/arduino/stm32/LL/stm32yyxx_ll_icache.h index 0581570695..68fea8bb74 100644 --- a/cores/arduino/stm32/LL/stm32yyxx_ll_icache.h +++ b/cores/arduino/stm32/LL/stm32yyxx_ll_icache.h @@ -4,6 +4,9 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#ifdef __cplusplus + #pragma GCC diagnostic ignored "-Wregister" +#endif #ifdef STM32L5xx #include "stm32l5xx_ll_icache.h" diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_ipcc.h b/cores/arduino/stm32/LL/stm32yyxx_ll_ipcc.h index 41095d64a4..db4c1f4a36 100644 --- a/cores/arduino/stm32/LL/stm32yyxx_ll_ipcc.h +++ b/cores/arduino/stm32/LL/stm32yyxx_ll_ipcc.h @@ -4,6 +4,9 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#ifdef __cplusplus + #pragma GCC diagnostic ignored "-Wregister" +#endif #ifdef STM32MP1xx #include "stm32mp1xx_ll_ipcc.h" diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_iwdg.h b/cores/arduino/stm32/LL/stm32yyxx_ll_iwdg.h index 016e229c92..7069194b03 100644 --- a/cores/arduino/stm32/LL/stm32yyxx_ll_iwdg.h +++ b/cores/arduino/stm32/LL/stm32yyxx_ll_iwdg.h @@ -4,6 +4,9 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#ifdef __cplusplus + #pragma GCC diagnostic ignored "-Wregister" +#endif #ifdef STM32C0xx #include "stm32c0xx_ll_iwdg.h" diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_lpgpio.h b/cores/arduino/stm32/LL/stm32yyxx_ll_lpgpio.h index 702beccb86..474aaf182a 100644 --- a/cores/arduino/stm32/LL/stm32yyxx_ll_lpgpio.h +++ b/cores/arduino/stm32/LL/stm32yyxx_ll_lpgpio.h @@ -4,6 +4,9 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#ifdef __cplusplus + #pragma GCC diagnostic ignored "-Wregister" +#endif #ifdef STM32U5xx #include "stm32u5xx_ll_lpgpio.h" diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_lptim.h b/cores/arduino/stm32/LL/stm32yyxx_ll_lptim.h index 2a20a90fa8..924454f984 100644 --- a/cores/arduino/stm32/LL/stm32yyxx_ll_lptim.h +++ b/cores/arduino/stm32/LL/stm32yyxx_ll_lptim.h @@ -4,6 +4,9 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#ifdef __cplusplus + #pragma GCC diagnostic ignored "-Wregister" +#endif #ifdef STM32F4xx #include "stm32f4xx_ll_lptim.h" diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_lpuart.h b/cores/arduino/stm32/LL/stm32yyxx_ll_lpuart.h index 45a64a4a97..1d30d1b7fb 100644 --- a/cores/arduino/stm32/LL/stm32yyxx_ll_lpuart.h +++ b/cores/arduino/stm32/LL/stm32yyxx_ll_lpuart.h @@ -4,6 +4,9 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#ifdef __cplusplus + #pragma GCC diagnostic ignored "-Wregister" +#endif #ifdef STM32G0xx #include "stm32g0xx_ll_lpuart.h" diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_mdma.h b/cores/arduino/stm32/LL/stm32yyxx_ll_mdma.h index 37bfb212f4..c07b846521 100644 --- a/cores/arduino/stm32/LL/stm32yyxx_ll_mdma.h +++ b/cores/arduino/stm32/LL/stm32yyxx_ll_mdma.h @@ -4,6 +4,9 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#ifdef __cplusplus + #pragma GCC diagnostic ignored "-Wregister" +#endif #ifdef STM32H7xx #include "stm32h7xx_ll_mdma.h" diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_opamp.h b/cores/arduino/stm32/LL/stm32yyxx_ll_opamp.h index d76a87816c..9f291e65da 100644 --- a/cores/arduino/stm32/LL/stm32yyxx_ll_opamp.h +++ b/cores/arduino/stm32/LL/stm32yyxx_ll_opamp.h @@ -4,6 +4,9 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#ifdef __cplusplus + #pragma GCC diagnostic ignored "-Wregister" +#endif #ifdef STM32F3xx #include "stm32f3xx_ll_opamp.h" diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_pka.h b/cores/arduino/stm32/LL/stm32yyxx_ll_pka.h index c0c6c3e939..2fb4ce9b8d 100644 --- a/cores/arduino/stm32/LL/stm32yyxx_ll_pka.h +++ b/cores/arduino/stm32/LL/stm32yyxx_ll_pka.h @@ -4,6 +4,9 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#ifdef __cplusplus + #pragma GCC diagnostic ignored "-Wregister" +#endif #ifdef STM32L4xx #include "stm32l4xx_ll_pka.h" diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_pwr.h b/cores/arduino/stm32/LL/stm32yyxx_ll_pwr.h index fecb686d70..4194d10e55 100644 --- a/cores/arduino/stm32/LL/stm32yyxx_ll_pwr.h +++ b/cores/arduino/stm32/LL/stm32yyxx_ll_pwr.h @@ -4,6 +4,9 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#ifdef __cplusplus + #pragma GCC diagnostic ignored "-Wregister" +#endif #ifdef STM32C0xx #include "stm32c0xx_ll_pwr.h" diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_rcc.h b/cores/arduino/stm32/LL/stm32yyxx_ll_rcc.h index 74d3c69172..0a06ae9d5c 100644 --- a/cores/arduino/stm32/LL/stm32yyxx_ll_rcc.h +++ b/cores/arduino/stm32/LL/stm32yyxx_ll_rcc.h @@ -4,6 +4,9 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#ifdef __cplusplus + #pragma GCC diagnostic ignored "-Wregister" +#endif #ifdef STM32C0xx #include "stm32c0xx_ll_rcc.h" diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_rng.h b/cores/arduino/stm32/LL/stm32yyxx_ll_rng.h index 46c2b7134e..ed4cc972b6 100644 --- a/cores/arduino/stm32/LL/stm32yyxx_ll_rng.h +++ b/cores/arduino/stm32/LL/stm32yyxx_ll_rng.h @@ -4,6 +4,9 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#ifdef __cplusplus + #pragma GCC diagnostic ignored "-Wregister" +#endif #ifdef STM32F2xx #include "stm32f2xx_ll_rng.h" diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_rtc.h b/cores/arduino/stm32/LL/stm32yyxx_ll_rtc.h index 2006e9184e..28bba24817 100644 --- a/cores/arduino/stm32/LL/stm32yyxx_ll_rtc.h +++ b/cores/arduino/stm32/LL/stm32yyxx_ll_rtc.h @@ -4,6 +4,9 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#ifdef __cplusplus + #pragma GCC diagnostic ignored "-Wregister" +#endif #ifdef STM32C0xx #include "stm32c0xx_ll_rtc.h" diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_sdmmc.h b/cores/arduino/stm32/LL/stm32yyxx_ll_sdmmc.h index 4540a3a098..c786d3b75f 100644 --- a/cores/arduino/stm32/LL/stm32yyxx_ll_sdmmc.h +++ b/cores/arduino/stm32/LL/stm32yyxx_ll_sdmmc.h @@ -4,6 +4,9 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#ifdef __cplusplus + #pragma GCC diagnostic ignored "-Wregister" +#endif #ifdef STM32F1xx #include "stm32f1xx_ll_sdmmc.h" diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_spi.h b/cores/arduino/stm32/LL/stm32yyxx_ll_spi.h index 2f8d37c5fd..ff287bd7be 100644 --- a/cores/arduino/stm32/LL/stm32yyxx_ll_spi.h +++ b/cores/arduino/stm32/LL/stm32yyxx_ll_spi.h @@ -4,6 +4,9 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#ifdef __cplusplus + #pragma GCC diagnostic ignored "-Wregister" +#endif #ifdef STM32C0xx #include "stm32c0xx_ll_spi.h" diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_swpmi.h b/cores/arduino/stm32/LL/stm32yyxx_ll_swpmi.h index 0619deeb1c..a1da1f1456 100644 --- a/cores/arduino/stm32/LL/stm32yyxx_ll_swpmi.h +++ b/cores/arduino/stm32/LL/stm32yyxx_ll_swpmi.h @@ -4,6 +4,9 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#ifdef __cplusplus + #pragma GCC diagnostic ignored "-Wregister" +#endif #ifdef STM32H7xx #include "stm32h7xx_ll_swpmi.h" diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_system.h b/cores/arduino/stm32/LL/stm32yyxx_ll_system.h index f4cc0f4153..d7b78b1498 100644 --- a/cores/arduino/stm32/LL/stm32yyxx_ll_system.h +++ b/cores/arduino/stm32/LL/stm32yyxx_ll_system.h @@ -4,6 +4,9 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#ifdef __cplusplus + #pragma GCC diagnostic ignored "-Wregister" +#endif #ifdef STM32C0xx #include "stm32c0xx_ll_system.h" diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_tim.h b/cores/arduino/stm32/LL/stm32yyxx_ll_tim.h index 63fd1f148b..68e4833a96 100644 --- a/cores/arduino/stm32/LL/stm32yyxx_ll_tim.h +++ b/cores/arduino/stm32/LL/stm32yyxx_ll_tim.h @@ -4,6 +4,9 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#ifdef __cplusplus + #pragma GCC diagnostic ignored "-Wregister" +#endif #ifdef STM32C0xx #include "stm32c0xx_ll_tim.h" diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_ucpd.h b/cores/arduino/stm32/LL/stm32yyxx_ll_ucpd.h index fa1afae272..8a384150b9 100644 --- a/cores/arduino/stm32/LL/stm32yyxx_ll_ucpd.h +++ b/cores/arduino/stm32/LL/stm32yyxx_ll_ucpd.h @@ -4,6 +4,9 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#ifdef __cplusplus + #pragma GCC diagnostic ignored "-Wregister" +#endif #ifdef STM32G0xx #include "stm32g0xx_ll_ucpd.h" diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_usart.h b/cores/arduino/stm32/LL/stm32yyxx_ll_usart.h index 202525e1fc..97b9e2930b 100644 --- a/cores/arduino/stm32/LL/stm32yyxx_ll_usart.h +++ b/cores/arduino/stm32/LL/stm32yyxx_ll_usart.h @@ -4,6 +4,9 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#ifdef __cplusplus + #pragma GCC diagnostic ignored "-Wregister" +#endif #ifdef STM32C0xx #include "stm32c0xx_ll_usart.h" diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_usb.h b/cores/arduino/stm32/LL/stm32yyxx_ll_usb.h index d3abfbb061..538e51a488 100644 --- a/cores/arduino/stm32/LL/stm32yyxx_ll_usb.h +++ b/cores/arduino/stm32/LL/stm32yyxx_ll_usb.h @@ -4,6 +4,9 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#ifdef __cplusplus + #pragma GCC diagnostic ignored "-Wregister" +#endif #ifdef STM32F0xx #include "stm32f0xx_ll_usb.h" diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_utils.h b/cores/arduino/stm32/LL/stm32yyxx_ll_utils.h index 5d95021604..3baed94eb6 100644 --- a/cores/arduino/stm32/LL/stm32yyxx_ll_utils.h +++ b/cores/arduino/stm32/LL/stm32yyxx_ll_utils.h @@ -4,6 +4,9 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#ifdef __cplusplus + #pragma GCC diagnostic ignored "-Wregister" +#endif #ifdef STM32C0xx #include "stm32c0xx_ll_utils.h" diff --git a/cores/arduino/stm32/LL/stm32yyxx_ll_wwdg.h b/cores/arduino/stm32/LL/stm32yyxx_ll_wwdg.h index f3159380b2..053323ddb3 100644 --- a/cores/arduino/stm32/LL/stm32yyxx_ll_wwdg.h +++ b/cores/arduino/stm32/LL/stm32yyxx_ll_wwdg.h @@ -4,6 +4,9 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#ifdef __cplusplus + #pragma GCC diagnostic ignored "-Wregister" +#endif #ifdef STM32C0xx #include "stm32c0xx_ll_wwdg.h"