From 6812299dcf045e53ab4803670c24fe04480c44f0 Mon Sep 17 00:00:00 2001 From: Henrik Schondorff Date: Mon, 14 Dec 2020 08:28:56 +0100 Subject: [PATCH] Add STL32L496 support --- Makefile | 6 ++++++ demo/stm32l496xg.ld | 13 +++++++++++++ inc/usb.h | 2 +- 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 demo/stm32l496xg.ld diff --git a/Makefile b/Makefile index 0c9290b..e873b1d 100644 --- a/Makefile +++ b/Makefile @@ -183,6 +183,12 @@ stm32l476xg 32l476rg-nucleo: clean DEFINES='STM32L4 STM32L476xx USBD_SOF_DISABLED' \ CFLAGS='-mcpu=cortex-m4' +stm32l496xg: clean + @$(MAKE) demo STARTUP='$(CMSISDEV)/ST/STM32L4xx/Source/Templates/gcc/startup_stm32l496xx.s' \ + LDSCRIPT='demo/stm32l496xg.ld' \ + DEFINES='STM32L4 STM32L496xx USBD_SOF_DISABLED' \ + CFLAGS='-mcpu=cortex-m4' + stm32f429xi 32f429zi-nucleo: clean @$(MAKE) demo STARTUP='$(CMSISDEV)/ST/STM32F4xx/Source/Templates/gcc/startup_stm32f429xx.s' \ LDSCRIPT='demo/stm32f429xi.ld' \ diff --git a/demo/stm32l496xg.ld b/demo/stm32l496xg.ld new file mode 100644 index 0000000..2241aff --- /dev/null +++ b/demo/stm32l496xg.ld @@ -0,0 +1,13 @@ +ENTRY(Reset_Handler) +MEMORY +{ + ROM (rx): ORIGIN = 0x08000000, LENGTH = 1024K + BANK0 (rx): ORIGIN = 0x08000000, LENGTH = 512K + BANK1 (rx): ORIGIN = 0x08080000, LENGTH = 512K + RAM (rwx): ORIGIN = 0x20000000, LENGTH = 256K + RAM2 (rwx): ORIGIN = 0x10000000, LENGTH = 64K + SRAM1 (rwx): ORIGIN = 0x20000000, LENGTH = 256K + SRAM2 (rwx): ORIGIN = 0x2001C000, LENGTH = 64K +} + +INCLUDE sections.ld diff --git a/inc/usb.h b/inc/usb.h index 5c3e589..c2afb69 100644 --- a/inc/usb.h +++ b/inc/usb.h @@ -75,7 +75,7 @@ #endif #endif -#elif defined(STM32L475xx) || defined(STM32L476xx) +#elif defined(STM32L475xx) || defined(STM32L476xx) || defined(STM32L496xx) #define USBD_STM32L476