From 0714e7283d1e207bcbcb06cb6fce90ec581bb2d9 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Tue, 26 Dec 2017 10:51:37 +0000 Subject: Serial port working. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@11189 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- demos/STM32/RT-STM32H743I-NUCLEO144/Makefile | 8 ++++---- ...RT-STM32H743I-NUCLEO144 (OpenOCD, Flash and Run).launch | 2 +- demos/STM32/RT-STM32H743I-NUCLEO144/halconf.h | 2 +- demos/STM32/RT-STM32H743I-NUCLEO144/main.c | 14 ++++++-------- demos/STM32/RT-STM32H743I-NUCLEO144/mcuconf.h | 4 ++-- 5 files changed, 14 insertions(+), 16 deletions(-) (limited to 'demos/STM32/RT-STM32H743I-NUCLEO144') diff --git a/demos/STM32/RT-STM32H743I-NUCLEO144/Makefile b/demos/STM32/RT-STM32H743I-NUCLEO144/Makefile index fd027130d..1a4112fba 100644 --- a/demos/STM32/RT-STM32H743I-NUCLEO144/Makefile +++ b/demos/STM32/RT-STM32H743I-NUCLEO144/Makefile @@ -5,7 +5,7 @@ # Compiler options here. ifeq ($(USE_OPT),) - USE_OPT = -O0 -ggdb -fomit-frame-pointer -falign-functions=16 + USE_OPT = -O2 -ggdb -fomit-frame-pointer -falign-functions=16 endif # C specific options here (added to USE_OPT). @@ -111,9 +111,9 @@ include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk # Auto-build files in ./source recursively. include $(CHIBIOS)/tools/mk/autobuild.mk # Other files (optional). -#include $(CHIBIOS)/test/lib/test.mk -#include $(CHIBIOS)/test/rt/rt_test.mk -#include $(CHIBIOS)/test/oslib/oslib_test.mk +include $(CHIBIOS)/test/lib/test.mk +include $(CHIBIOS)/test/rt/rt_test.mk +include $(CHIBIOS)/test/oslib/oslib_test.mk # Define linker script file here LDSCRIPT= $(STARTUPLD)/STM32H743xI.ld diff --git a/demos/STM32/RT-STM32H743I-NUCLEO144/debug/RT-STM32H743I-NUCLEO144 (OpenOCD, Flash and Run).launch b/demos/STM32/RT-STM32H743I-NUCLEO144/debug/RT-STM32H743I-NUCLEO144 (OpenOCD, Flash and Run).launch index c69b25933..9c728ae73 100644 --- a/demos/STM32/RT-STM32H743I-NUCLEO144/debug/RT-STM32H743I-NUCLEO144 (OpenOCD, Flash and Run).launch +++ b/demos/STM32/RT-STM32H743I-NUCLEO144/debug/RT-STM32H743I-NUCLEO144 (OpenOCD, Flash and Run).launch @@ -33,7 +33,7 @@ - + diff --git a/demos/STM32/RT-STM32H743I-NUCLEO144/halconf.h b/demos/STM32/RT-STM32H743I-NUCLEO144/halconf.h index 5aec384f3..d7793e22c 100644 --- a/demos/STM32/RT-STM32H743I-NUCLEO144/halconf.h +++ b/demos/STM32/RT-STM32H743I-NUCLEO144/halconf.h @@ -146,7 +146,7 @@ * @brief Enables the SERIAL subsystem. */ #if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL FALSE +#define HAL_USE_SERIAL TRUE #endif /** diff --git a/demos/STM32/RT-STM32H743I-NUCLEO144/main.c b/demos/STM32/RT-STM32H743I-NUCLEO144/main.c index 13849bd2b..71ade98e0 100644 --- a/demos/STM32/RT-STM32H743I-NUCLEO144/main.c +++ b/demos/STM32/RT-STM32H743I-NUCLEO144/main.c @@ -16,8 +16,8 @@ #include "ch.h" #include "hal.h" -//#include "rt_test_root.h" -//#include "oslib_test_root.h" +#include "rt_test_root.h" +#include "oslib_test_root.h" /* * This is a periodic thread that does absolutely nothing except flashing @@ -54,7 +54,7 @@ int main(void) { /* * Activates the serial driver 1 using the driver default configuration. */ -// sdStart(&SD1, NULL); + sdStart(&SD3, NULL); /* * Creates the example thread. @@ -66,12 +66,10 @@ int main(void) { * sleeping in a loop and check the button state. */ while (1) { -#if 0 - if (palReadLine(LINE_BUTTON_USER)) { - test_execute((BaseSequentialStream *)&SD1, &rt_test_suite); - test_execute((BaseSequentialStream *)&SD1, &oslib_test_suite); + if (palReadLine(LINE_BUTTON)) { + test_execute((BaseSequentialStream *)&SD3, &rt_test_suite); + test_execute((BaseSequentialStream *)&SD3, &oslib_test_suite); } -#endif chThdSleepMilliseconds(500); } } diff --git a/demos/STM32/RT-STM32H743I-NUCLEO144/mcuconf.h b/demos/STM32/RT-STM32H743I-NUCLEO144/mcuconf.h index b347e8c83..4a1b10dcf 100644 --- a/demos/STM32/RT-STM32H743I-NUCLEO144/mcuconf.h +++ b/demos/STM32/RT-STM32H743I-NUCLEO144/mcuconf.h @@ -332,9 +332,9 @@ /* * SERIAL driver system settings. */ -#define STM32_SERIAL_USE_USART1 TRUE +#define STM32_SERIAL_USE_USART1 FALSE #define STM32_SERIAL_USE_USART2 FALSE -#define STM32_SERIAL_USE_USART3 FALSE +#define STM32_SERIAL_USE_USART3 TRUE #define STM32_SERIAL_USE_UART4 FALSE #define STM32_SERIAL_USE_UART5 FALSE #define STM32_SERIAL_USE_USART6 FALSE -- cgit v1.2.3