aboutsummaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
Diffstat (limited to 'demos')
-rw-r--r--demos/NRF51/RT-WVSHARE_BLE400/Makefile12
-rw-r--r--demos/NRF51/RT-WVSHARE_BLE400/chconf.h25
-rw-r--r--demos/NRF51/RT-WVSHARE_BLE400/main.c4
-rw-r--r--demos/NRF51/RT-WVSHARE_BLE400/mcuconf.h3
4 files changed, 39 insertions, 5 deletions
diff --git a/demos/NRF51/RT-WVSHARE_BLE400/Makefile b/demos/NRF51/RT-WVSHARE_BLE400/Makefile
index ffa30f4..1b4f545 100644
--- a/demos/NRF51/RT-WVSHARE_BLE400/Makefile
+++ b/demos/NRF51/RT-WVSHARE_BLE400/Makefile
@@ -43,6 +43,12 @@ ifeq ($(USE_VERBOSE_COMPILE),)
USE_VERBOSE_COMPILE = no
endif
+# If enabled, this option makes the build process faster by not compiling
+# modules not used in the current configuration.
+ifeq ($(USE_SMART_BUILD),)
+ USE_SMART_BUILD = yes
+endif
+
#
# Build global options
##############################################################################
@@ -83,7 +89,7 @@ PROJECT = ch
CHIBIOS = ../../../../ChibiOS-RT
CHIBIOS_CONTRIB = $(CHIBIOS)/../ChibiOS-Contrib
# Startup files.
-include $(CHIBIOS_CONTRIB)/os/common/ports/ARMCMx/compilers/GCC/mk/startup_nrf51.mk
+include $(CHIBIOS_CONTRIB)/os/common/startup/ARMCMx/compilers/GCC/mk/startup_nrf51.mk
# HAL-OSAL files (optional).
include $(CHIBIOS)/os/hal/hal.mk
include $(CHIBIOS_CONTRIB)/os/hal/ports/NRF51/NRF51822/platform.mk
@@ -91,7 +97,7 @@ include $(CHIBIOS_CONTRIB)/os/hal/boards/WVSHARE_BLE400/board.mk
include $(CHIBIOS)/os/hal/osal/rt/osal.mk
# RTOS files (optional).
include $(CHIBIOS)/os/rt/rt.mk
-include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_v6m.mk
+include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/port_v6m.mk
# Other files (optional).
include $(CHIBIOS)/test/rt/test.mk
@@ -207,5 +213,5 @@ ULIBS =
# End of user defines
##############################################################################
-RULESPATH = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC
+RULESPATH = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC
include $(RULESPATH)/rules.mk
diff --git a/demos/NRF51/RT-WVSHARE_BLE400/chconf.h b/demos/NRF51/RT-WVSHARE_BLE400/chconf.h
index fc9a52b..a753ec9 100644
--- a/demos/NRF51/RT-WVSHARE_BLE400/chconf.h
+++ b/demos/NRF51/RT-WVSHARE_BLE400/chconf.h
@@ -28,6 +28,8 @@
#ifndef _CHCONF_H_
#define _CHCONF_H_
+#define _CHIBIOS_RT_CONF_
+
/*===========================================================================*/
/**
* @name System timers settings
@@ -445,6 +447,20 @@
}
/**
+ * @brief ISR enter hook.
+ */
+#define CH_CFG_IRQ_PROLOGUE_HOOK() { \
+ /* IRQ prologue code here.*/ \
+}
+
+/**
+ * @brief ISR exit hook.
+ */
+#define CH_CFG_IRQ_EPILOGUE_HOOK() { \
+ /* IRQ epilogue code here.*/ \
+}
+
+/**
* @brief Idle thread enter hook.
* @note This hook is invoked within a critical zone, no OS functions
* should be invoked from here.
@@ -488,6 +504,15 @@
/* System halt code here.*/ \
}
+/**
+ * @brief Trace hook.
+ * @details This hook is invoked each time a new record is written in the
+ * trace buffer.
+ */
+#define CH_CFG_TRACE_HOOK(tep) { \
+ /* Trace code here.*/ \
+}
+
/** @} */
/*===========================================================================*/
diff --git a/demos/NRF51/RT-WVSHARE_BLE400/main.c b/demos/NRF51/RT-WVSHARE_BLE400/main.c
index d0b18cc..6b25a64 100644
--- a/demos/NRF51/RT-WVSHARE_BLE400/main.c
+++ b/demos/NRF51/RT-WVSHARE_BLE400/main.c
@@ -16,7 +16,7 @@
#include "ch.h"
#include "hal.h"
-#include "test.h"
+#include "ch_test.h"
static THD_WORKING_AREA(waThread1, 64);
static THD_FUNCTION(Thread1, arg) {
@@ -63,7 +63,7 @@ int main(void) {
*/
chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL);
- TestThread(&SD1);
+ test_execute((BaseSequentialStream *)&SD1);
while (1) {
chThdSleepMilliseconds(500);
}
diff --git a/demos/NRF51/RT-WVSHARE_BLE400/mcuconf.h b/demos/NRF51/RT-WVSHARE_BLE400/mcuconf.h
index aaf9473..cef47aa 100644
--- a/demos/NRF51/RT-WVSHARE_BLE400/mcuconf.h
+++ b/demos/NRF51/RT-WVSHARE_BLE400/mcuconf.h
@@ -21,5 +21,8 @@
* HAL driver system settings.
*/
#define NRF51_SERIAL_USE_UART0 TRUE
+#define NRF51_ST_USE_RTC0 TRUE
+#define NRF51_ST_USE_RTC1 FALSE
+#define NRF51_ST_USE_TIMER0 FALSE
#endif /* _MCUCONF_H_ */