From 730cfec66cd10afbbdb61c784d8f61e29e0b74dd Mon Sep 17 00:00:00 2001 From: Mateusz Myalski Date: Mon, 7 Oct 2024 19:10:47 +0200 Subject: [PATCH] Add IRQ handlers and missing Makefile FP flags --- include/libopencm3/stm32/u5/irq.json | 2 +- include/libopencmsis/dispatch/irqhandlers.h | 2 ++ lib/stm32/u5/Makefile | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/include/libopencm3/stm32/u5/irq.json b/include/libopencm3/stm32/u5/irq.json index 199026fe..3b2b9c05 100644 --- a/include/libopencm3/stm32/u5/irq.json +++ b/include/libopencm3/stm32/u5/irq.json @@ -142,7 +142,7 @@ "gfxtim", "jpeg" ], - "partname_humanreadable": "STM32 u5 series", + "partname_humanreadable": "STM32 U5 series", "partname_doxygen": "STM32U5", "includeguard": "LIBOPENCM3_STM32_U5_NVIC_H" } diff --git a/include/libopencmsis/dispatch/irqhandlers.h b/include/libopencmsis/dispatch/irqhandlers.h index 907b2474..b7511973 100644 --- a/include/libopencmsis/dispatch/irqhandlers.h +++ b/include/libopencmsis/dispatch/irqhandlers.h @@ -16,6 +16,8 @@ # include #elif defined(STM32L4) # include +#elif defined(STM32U5) +# include #elif defined(STM32G0) # include #elif defined(STM32G4) diff --git a/lib/stm32/u5/Makefile b/lib/stm32/u5/Makefile index 54e7a548..621873b9 100644 --- a/lib/stm32/u5/Makefile +++ b/lib/stm32/u5/Makefile @@ -19,6 +19,7 @@ LIBNAME = libopencm3_stm32u5 SRCLIBDIR ?= ../.. +FP_FLAGS ?= -mfloat-abi=hard -mfpu=fpv5-sp-d16 CC = $(PREFIX)gcc AR = $(PREFIX)ar @@ -27,7 +28,7 @@ TGT_CFLAGS = -Os \ -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes \ -Wundef -Wshadow \ -I../../../include -fno-common \ - -mcpu=cortex-m0 $(FP_FLAGS) -mthumb -Wstrict-prototypes \ + -mcpu=cortex-m33 $(FP_FLAGS) -mthumb -Wstrict-prototypes \ -ffunction-sections -fdata-sections -MD -DSTM32U5 TGT_CFLAGS += $(DEBUG_FLAGS) TGT_CFLAGS += $(STANDARD_FLAGS)