From 62ca44fa9a4687ebbc04ad4126cacc92e244fee9 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Sun, 7 Jul 2019 06:54:50 +0000 Subject: [PATCH] git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@12875 27425a3e-05d8-49a3-a47f-9c15f0e5edd8 --- demos/STM32/RT-STM32G071RB-NUCLEO64/.project | 2 +- demos/STM32/RT-STM32G071RB-NUCLEO64/Makefile | 2 +- .../RT-STM32G071RB-NUCLEO64/cfg/mcuconf.h | 3 + ...B-NUCLEO64 (OpenOCD, Flash and Run).launch | 104 +++++++++--------- os/hal/ports/STM32/STM32G0xx/hal_lld.c | 6 +- os/hal/ports/STM32/STM32G0xx/platform.mk | 12 +- 6 files changed, 65 insertions(+), 64 deletions(-) diff --git a/demos/STM32/RT-STM32G071RB-NUCLEO64/.project b/demos/STM32/RT-STM32G071RB-NUCLEO64/.project index ce8a6063e..b99cc4252 100644 --- a/demos/STM32/RT-STM32G071RB-NUCLEO64/.project +++ b/demos/STM32/RT-STM32G071RB-NUCLEO64/.project @@ -27,7 +27,7 @@ board 2 - CHIBIOS/os/hal/boards/ST_NUCLEO64_L476RG + CHIBIOS/os/hal/boards/ST_NUCLEO64_G071RB os diff --git a/demos/STM32/RT-STM32G071RB-NUCLEO64/Makefile b/demos/STM32/RT-STM32G071RB-NUCLEO64/Makefile index 6a131091d..c0f7f7db0 100644 --- a/demos/STM32/RT-STM32G071RB-NUCLEO64/Makefile +++ b/demos/STM32/RT-STM32G071RB-NUCLEO64/Makefile @@ -5,7 +5,7 @@ # Compiler options here. ifeq ($(USE_OPT),) - USE_OPT = -O2 -ggdb -fomit-frame-pointer -falign-functions=16 + USE_OPT = -O0 -ggdb -fomit-frame-pointer -falign-functions=16 endif # C specific options here (added to USE_OPT). diff --git a/demos/STM32/RT-STM32G071RB-NUCLEO64/cfg/mcuconf.h b/demos/STM32/RT-STM32G071RB-NUCLEO64/cfg/mcuconf.h index d050681b7..681fd528a 100644 --- a/demos/STM32/RT-STM32G071RB-NUCLEO64/cfg/mcuconf.h +++ b/demos/STM32/RT-STM32G071RB-NUCLEO64/cfg/mcuconf.h @@ -155,6 +155,9 @@ #define STM32_SERIAL_USE_LPUART1 TRUE #define STM32_SERIAL_USART1_PRIORITY 3 #define STM32_SERIAL_USART2_PRIORITY 3 +#define STM32_SERIAL_USART3_PRIORITY 3 +#define STM32_SERIAL_UART4_PRIORITY 3 +#define STM32_SERIAL_LPUART1_PRIORITY 3 /* * SPI driver system settings. diff --git a/demos/STM32/RT-STM32G071RB-NUCLEO64/debug/RT-STM32G071RB-NUCLEO64 (OpenOCD, Flash and Run).launch b/demos/STM32/RT-STM32G071RB-NUCLEO64/debug/RT-STM32G071RB-NUCLEO64 (OpenOCD, Flash and Run).launch index 751d6c152..7a3b3d7b8 100644 --- a/demos/STM32/RT-STM32G071RB-NUCLEO64/debug/RT-STM32G071RB-NUCLEO64 (OpenOCD, Flash and Run).launch +++ b/demos/STM32/RT-STM32G071RB-NUCLEO64/debug/RT-STM32G071RB-NUCLEO64 (OpenOCD, Flash and Run).launch @@ -1,52 +1,52 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/os/hal/ports/STM32/STM32G0xx/hal_lld.c b/os/hal/ports/STM32/STM32G0xx/hal_lld.c index 58217a71e..d7f51c05c 100644 --- a/os/hal/ports/STM32/STM32G0xx/hal_lld.c +++ b/os/hal/ports/STM32/STM32G0xx/hal_lld.c @@ -104,9 +104,7 @@ static void hal_lld_backup_domain_init(void) { */ void hal_lld_init(void) { - /* Reset of all peripherals. - Note, GPIOs are not reset because initialized before this point in - board files.*/ + /* Reset of all peripherals.*/ rccResetAHB(~0); rccResetAPBR1(~RCC_APBRSTR1_PWRRST); rccResetAPBR2(~0); @@ -219,7 +217,7 @@ void stm32_clock_init(void) { STM32_TIM15SEL | STM32_TIM1SEL | STM32_LPTIM2SEL | STM32_LPTIM1SEL | STM32_I2S1SEL | STM32_I2C1SEL | STM32_CECSEL | STM32_USART2SEL | STM32_USART1SEL | - STM32_LPUART1SEL;; + STM32_LPUART1SEL; /* Set flash WS's for SYSCLK source */ FLASH->ACR = FLASH_ACR_ICEN | FLASH_ACR_PRFTEN | STM32_FLASHBITS; diff --git a/os/hal/ports/STM32/STM32G0xx/platform.mk b/os/hal/ports/STM32/STM32G0xx/platform.mk index 7b30477f4..bc9e2b3d5 100644 --- a/os/hal/ports/STM32/STM32G0xx/platform.mk +++ b/os/hal/ports/STM32/STM32G0xx/platform.mk @@ -25,14 +25,14 @@ else endif # Drivers compatible with the platform. -include $(CHIBIOS)/os/hal/ports/STM32/LLD/ADCv1/driver.mk -include $(CHIBIOS)/os/hal/ports/STM32/LLD/DACv1/driver.mk +#include $(CHIBIOS)/os/hal/ports/STM32/LLD/ADCv1/driver.mk +#include $(CHIBIOS)/os/hal/ports/STM32/LLD/DACv1/driver.mk include $(CHIBIOS)/os/hal/ports/STM32/LLD/DMAv1/driver.mk -include $(CHIBIOS)/os/hal/ports/STM32/LLD/EXTIv1/driver.mk +#include $(CHIBIOS)/os/hal/ports/STM32/LLD/EXTIv1/driver.mk include $(CHIBIOS)/os/hal/ports/STM32/LLD/GPIOv2/driver.mk -include $(CHIBIOS)/os/hal/ports/STM32/LLD/I2Cv2/driver.mk -include $(CHIBIOS)/os/hal/ports/STM32/LLD/RTCv2/driver.mk -include $(CHIBIOS)/os/hal/ports/STM32/LLD/SPIv2/driver.mk +#include $(CHIBIOS)/os/hal/ports/STM32/LLD/I2Cv2/driver.mk +#include $(CHIBIOS)/os/hal/ports/STM32/LLD/RTCv2/driver.mk +#include $(CHIBIOS)/os/hal/ports/STM32/LLD/SPIv2/driver.mk include $(CHIBIOS)/os/hal/ports/STM32/LLD/TIMv1/driver.mk include $(CHIBIOS)/os/hal/ports/STM32/LLD/USARTv2/driver.mk include $(CHIBIOS)/os/hal/ports/STM32/LLD/xWDGv1/driver.mk