From 91c33f902c9b108a44924891d58ab416eebc8d28 Mon Sep 17 00:00:00 2001 From: cinsights Date: Thu, 22 Jul 2021 10:18:08 +0000 Subject: [PATCH] Add L4P/Q5 to mucconf updater and demo mcuconfs git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@14607 27425a3e-05d8-49a3-a47f-9c15f0e5edd8 --- demos/STM32/RT-STM32L4R5ZI-NUCLEO144/cfg/mcuconf.h | 2 ++ demos/STM32/RT-STM32L4R9-DISCOVERY/cfg/mcuconf.h | 2 ++ os/common/startup/ARMCMx/compilers/GCC/ld/STM32L4P5xG.ld | 6 +++--- os/hal/ports/STM32/LLD/SYSTICKv1/hal_st_lld.c | 2 +- os/hal/ports/STM32/LLD/SYSTICKv1/hal_st_lld.h | 2 +- testhal/STM32/multi/ADC/cfg/stm32l4r5zi_nucleo144/mcuconf.h | 2 ++ testhal/STM32/multi/DAC/cfg/stm32l4r5zi_nucleo144/mcuconf.h | 2 ++ testhal/STM32/multi/RTC/cfg/stm32l4r5_nucleo144/mcuconf.h | 2 ++ testhal/STM32/multi/SPI/cfg/stm32l4r5_nucleo144/mcuconf.h | 2 ++ .../STM32/multi/TRNG/cfg/stm32l4r5zi_nucleo144/mcuconf.h | 2 ++ .../STM32/multi/USB_CDC/cfg/stm32l4r5_nucleo144/mcuconf.h | 2 ++ .../STM32/multi/WSPI-MFS/cfg/stm32l4r9_discovery/mcuconf.h | 2 ++ tools/updater/update_mcuconf_stm32l4rxxx.sh | 2 +- 13 files changed, 24 insertions(+), 6 deletions(-) diff --git a/demos/STM32/RT-STM32L4R5ZI-NUCLEO144/cfg/mcuconf.h b/demos/STM32/RT-STM32L4R5ZI-NUCLEO144/cfg/mcuconf.h index b435927b4..1f16178db 100644 --- a/demos/STM32/RT-STM32L4R5ZI-NUCLEO144/cfg/mcuconf.h +++ b/demos/STM32/RT-STM32L4R5ZI-NUCLEO144/cfg/mcuconf.h @@ -32,6 +32,8 @@ #define MCUCONF_H #define STM32L4xx_MCUCONF +#define STM32L4P5_MCUCONF +#define STM32L4Q5_MCUCONF #define STM32L4R5_MCUCONF #define STM32L4S5_MCUCONF #define STM32L4R7_MCUCONF diff --git a/demos/STM32/RT-STM32L4R9-DISCOVERY/cfg/mcuconf.h b/demos/STM32/RT-STM32L4R9-DISCOVERY/cfg/mcuconf.h index 2d5b9f0d9..4c73f14cc 100644 --- a/demos/STM32/RT-STM32L4R9-DISCOVERY/cfg/mcuconf.h +++ b/demos/STM32/RT-STM32L4R9-DISCOVERY/cfg/mcuconf.h @@ -32,6 +32,8 @@ #define MCUCONF_H #define STM32L4xx_MCUCONF +#define STM32L4P5_MCUCONF +#define STM32L4Q5_MCUCONF #define STM32L4R5_MCUCONF #define STM32L4S5_MCUCONF #define STM32L4R7_MCUCONF diff --git a/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L4P5xG.ld b/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L4P5xG.ld index 0841575be..7523ab8e4 100644 --- a/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L4P5xG.ld +++ b/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L4P5xG.ld @@ -27,10 +27,10 @@ MEMORY flash5 : org = 0x00000000, len = 0 flash6 : org = 0x00000000, len = 0 flash7 : org = 0x00000000, len = 0 - ram0 : org = 0x20000000, len = 320k /* SRAM1+SRAM2 */ + ram0 : org = 0x20000000, len = 320k /* SRAM1+SRAM2+SRAM3 */ ram1 : org = 0x20000000, len = 128k /* SRAM1 */ - ram2 : org = 0x20030000, len = 128k /* SRAM2 */ - ram3 : org = 0x00000000, len = 0 + ram2 : org = 0x20020000, len = 64k /* SRAM2 */ + ram3 : org = 0x20030000, len = 128k /* SRAM3 */ ram4 : org = 0x10000000, len = 64k /* SRAM2 alias */ ram5 : org = 0x00000000, len = 0 ram6 : org = 0x00000000, len = 0 diff --git a/os/hal/ports/STM32/LLD/SYSTICKv1/hal_st_lld.c b/os/hal/ports/STM32/LLD/SYSTICKv1/hal_st_lld.c index 27de5ada6..238754b00 100644 --- a/os/hal/ports/STM32/LLD/SYSTICKv1/hal_st_lld.c +++ b/os/hal/ports/STM32/LLD/SYSTICKv1/hal_st_lld.c @@ -15,7 +15,7 @@ */ /** - * @file TIMv1/hal_st_lld.c + * @file SYSTICKv1/hal_st_lld.c * @brief ST Driver subsystem low level driver code. * * @addtogroup ST diff --git a/os/hal/ports/STM32/LLD/SYSTICKv1/hal_st_lld.h b/os/hal/ports/STM32/LLD/SYSTICKv1/hal_st_lld.h index d2ee5fbfc..04a9e3d32 100644 --- a/os/hal/ports/STM32/LLD/SYSTICKv1/hal_st_lld.h +++ b/os/hal/ports/STM32/LLD/SYSTICKv1/hal_st_lld.h @@ -15,7 +15,7 @@ */ /** - * @file TIMv1/hal_st_lld.h + * @file SYSTICKv1/hal_st_lld.h * @brief ST Driver subsystem low level driver header. * @details This header is designed to be include-able without having to * include other files from the HAL. diff --git a/testhal/STM32/multi/ADC/cfg/stm32l4r5zi_nucleo144/mcuconf.h b/testhal/STM32/multi/ADC/cfg/stm32l4r5zi_nucleo144/mcuconf.h index 47a05e6d5..60ef6f35c 100644 --- a/testhal/STM32/multi/ADC/cfg/stm32l4r5zi_nucleo144/mcuconf.h +++ b/testhal/STM32/multi/ADC/cfg/stm32l4r5zi_nucleo144/mcuconf.h @@ -32,6 +32,8 @@ #define MCUCONF_H #define STM32L4xx_MCUCONF +#define STM32L4P5_MCUCONF +#define STM32L4Q5_MCUCONF #define STM32L4R5_MCUCONF #define STM32L4S5_MCUCONF #define STM32L4R7_MCUCONF diff --git a/testhal/STM32/multi/DAC/cfg/stm32l4r5zi_nucleo144/mcuconf.h b/testhal/STM32/multi/DAC/cfg/stm32l4r5zi_nucleo144/mcuconf.h index 85cc71cbc..b72d64c84 100644 --- a/testhal/STM32/multi/DAC/cfg/stm32l4r5zi_nucleo144/mcuconf.h +++ b/testhal/STM32/multi/DAC/cfg/stm32l4r5zi_nucleo144/mcuconf.h @@ -32,6 +32,8 @@ #define MCUCONF_H #define STM32L4xx_MCUCONF +#define STM32L4P5_MCUCONF +#define STM32L4Q5_MCUCONF #define STM32L4R5_MCUCONF #define STM32L4S5_MCUCONF #define STM32L4R7_MCUCONF diff --git a/testhal/STM32/multi/RTC/cfg/stm32l4r5_nucleo144/mcuconf.h b/testhal/STM32/multi/RTC/cfg/stm32l4r5_nucleo144/mcuconf.h index 33eddce08..7224d710d 100644 --- a/testhal/STM32/multi/RTC/cfg/stm32l4r5_nucleo144/mcuconf.h +++ b/testhal/STM32/multi/RTC/cfg/stm32l4r5_nucleo144/mcuconf.h @@ -32,6 +32,8 @@ #define MCUCONF_H #define STM32L4xx_MCUCONF +#define STM32L4P5_MCUCONF +#define STM32L4Q5_MCUCONF #define STM32L4R5_MCUCONF #define STM32L4S5_MCUCONF #define STM32L4R7_MCUCONF diff --git a/testhal/STM32/multi/SPI/cfg/stm32l4r5_nucleo144/mcuconf.h b/testhal/STM32/multi/SPI/cfg/stm32l4r5_nucleo144/mcuconf.h index f12b7e082..f9f59b3ad 100644 --- a/testhal/STM32/multi/SPI/cfg/stm32l4r5_nucleo144/mcuconf.h +++ b/testhal/STM32/multi/SPI/cfg/stm32l4r5_nucleo144/mcuconf.h @@ -32,6 +32,8 @@ #define MCUCONF_H #define STM32L4xx_MCUCONF +#define STM32L4P5_MCUCONF +#define STM32L4Q5_MCUCONF #define STM32L4R5_MCUCONF #define STM32L4S5_MCUCONF #define STM32L4R7_MCUCONF diff --git a/testhal/STM32/multi/TRNG/cfg/stm32l4r5zi_nucleo144/mcuconf.h b/testhal/STM32/multi/TRNG/cfg/stm32l4r5zi_nucleo144/mcuconf.h index d3664bcc4..5af31cd7f 100644 --- a/testhal/STM32/multi/TRNG/cfg/stm32l4r5zi_nucleo144/mcuconf.h +++ b/testhal/STM32/multi/TRNG/cfg/stm32l4r5zi_nucleo144/mcuconf.h @@ -32,6 +32,8 @@ #define MCUCONF_H #define STM32L4xx_MCUCONF +#define STM32L4P5_MCUCONF +#define STM32L4Q5_MCUCONF #define STM32L4R5_MCUCONF #define STM32L4S5_MCUCONF #define STM32L4R7_MCUCONF diff --git a/testhal/STM32/multi/USB_CDC/cfg/stm32l4r5_nucleo144/mcuconf.h b/testhal/STM32/multi/USB_CDC/cfg/stm32l4r5_nucleo144/mcuconf.h index b33ea7e6a..4ce45752a 100644 --- a/testhal/STM32/multi/USB_CDC/cfg/stm32l4r5_nucleo144/mcuconf.h +++ b/testhal/STM32/multi/USB_CDC/cfg/stm32l4r5_nucleo144/mcuconf.h @@ -32,6 +32,8 @@ #define MCUCONF_H #define STM32L4xx_MCUCONF +#define STM32L4P5_MCUCONF +#define STM32L4Q5_MCUCONF #define STM32L4R5_MCUCONF #define STM32L4S5_MCUCONF #define STM32L4R7_MCUCONF diff --git a/testhal/STM32/multi/WSPI-MFS/cfg/stm32l4r9_discovery/mcuconf.h b/testhal/STM32/multi/WSPI-MFS/cfg/stm32l4r9_discovery/mcuconf.h index 0261b2c26..e4f0c3119 100644 --- a/testhal/STM32/multi/WSPI-MFS/cfg/stm32l4r9_discovery/mcuconf.h +++ b/testhal/STM32/multi/WSPI-MFS/cfg/stm32l4r9_discovery/mcuconf.h @@ -32,6 +32,8 @@ #define MCUCONF_H #define STM32L4xx_MCUCONF +#define STM32L4P5_MCUCONF +#define STM32L4Q5_MCUCONF #define STM32L4R5_MCUCONF #define STM32L4S5_MCUCONF #define STM32L4R7_MCUCONF diff --git a/tools/updater/update_mcuconf_stm32l4rxxx.sh b/tools/updater/update_mcuconf_stm32l4rxxx.sh index c62d20e2e..dd99b1cd6 100644 --- a/tools/updater/update_mcuconf_stm32l4rxxx.sh +++ b/tools/updater/update_mcuconf_stm32l4rxxx.sh @@ -10,7 +10,7 @@ if [ $# -eq 2 ] elif [ $# -eq 1 ] then declare conffile=$(<$1) - if egrep -q "STM32L4R5_MCUCONF" <<< "$conffile" || egrep -q "STM32L4S5_MCUCONF" <<< "$conffile" || egrep -q "STM32L4R7_MCUCONF" <<< "$conffile" || egrep -q "STM32L4S7_MCUCONF" <<< "$conffile" || egrep -q "STM32L4R9_MCUCONF" <<< "$conffile" || egrep -q "STM32L4S9_MCUCONF" <<< "$conffile" + if egrep -q "STM32L4P5_MCUCONF" <<< "$conffile" || "STM32L4Q5_MCUCONF" <<< "$conffile" || "STM32L4R5_MCUCONF" <<< "$conffile" || egrep -q "STM32L4S5_MCUCONF" <<< "$conffile" || egrep -q "STM32L4R7_MCUCONF" <<< "$conffile" || egrep -q "STM32L4S7_MCUCONF" <<< "$conffile" || egrep -q "STM32L4R9_MCUCONF" <<< "$conffile" || egrep -q "STM32L4S9_MCUCONF" <<< "$conffile" then echo Processing: $1 egrep -e "\#define\s+[a-zA-Z0-9_()]*\s+[^\s]" <<< "$conffile" | sed -r 's/\#define\s+([a-zA-Z0-9_]*)(\([^)]*\))?\s+/\1=/g' > ./values.txt