aboutsummaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
Diffstat (limited to 'demos')
-rw-r--r--demos/STM32/NASA-OSAL-STM32F407-DISCOVERY/Makefile2
-rw-r--r--demos/STM32/NASA-OSAL-STM32F407-DISCOVERY/main.c6
2 files changed, 5 insertions, 3 deletions
diff --git a/demos/STM32/NASA-OSAL-STM32F407-DISCOVERY/Makefile b/demos/STM32/NASA-OSAL-STM32F407-DISCOVERY/Makefile
index 87ddba648..8a4a876f1 100644
--- a/demos/STM32/NASA-OSAL-STM32F407-DISCOVERY/Makefile
+++ b/demos/STM32/NASA-OSAL-STM32F407-DISCOVERY/Makefile
@@ -98,7 +98,7 @@ include $(CHIBIOS)/os/hal/osal/rt/osal.mk
include $(CHIBIOS)/os/rt/rt.mk
include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk
# Other files (optional).
-include $(CHIBIOS)/test/rt/test.mk
+include $(CHIBIOS)/test/nasa_osal/test.mk
include $(CHIBIOS)/os/common/abstractions/nasa_osal/nasa_osal.mk
# Define linker script file here
diff --git a/demos/STM32/NASA-OSAL-STM32F407-DISCOVERY/main.c b/demos/STM32/NASA-OSAL-STM32F407-DISCOVERY/main.c
index ba102be73..c17109ff1 100644
--- a/demos/STM32/NASA-OSAL-STM32F407-DISCOVERY/main.c
+++ b/demos/STM32/NASA-OSAL-STM32F407-DISCOVERY/main.c
@@ -15,6 +15,7 @@
*/
#include "hal.h"
+#include "ch_test.h"
#include "osapi.h"
/*
@@ -62,9 +63,10 @@ int main(void) {
/* In the ChibiOS/RT OSAL implementation the main() function is an
usable thread with priority 128 (NORMALPRIO), here we just sleep
- in a loop printing a message on the serial port.*/
+ waiting for a button event, then the test suite is executed.*/
while (true) {
- sdWrite(&SD2, (uint8_t *)"Hello World!\r\n", 14);
+ if (palReadLine(LINE_BUTTON))
+ test_execute((BaseSequentialStream *)&SD2);
OS_TaskDelay(500);
}
}