From 99c3815a527585127b850f555078de4792ca7caf Mon Sep 17 00:00:00 2001 From: Fabio Utzig Date: Mon, 4 Apr 2016 23:37:20 -0300 Subject: Fix testhal demos (except for RNG) --- testhal/NRF51/NRF51822/ADC/Makefile | 6 +++--- testhal/NRF51/NRF51822/ADC/chconf.h | 25 +++++++++++++++++++++++++ testhal/NRF51/NRF51822/ADC/halconf.h | 7 +++++++ 3 files changed, 35 insertions(+), 3 deletions(-) (limited to 'testhal/NRF51/NRF51822/ADC') diff --git a/testhal/NRF51/NRF51822/ADC/Makefile b/testhal/NRF51/NRF51822/ADC/Makefile index ec06536..69d6e90 100644 --- a/testhal/NRF51/NRF51822/ADC/Makefile +++ b/testhal/NRF51/NRF51822/ADC/Makefile @@ -84,7 +84,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 @@ -92,7 +92,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 +207,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/testhal/NRF51/NRF51822/ADC/chconf.h b/testhal/NRF51/NRF51822/ADC/chconf.h index 5b0630c..71b3bb4 100644 --- a/testhal/NRF51/NRF51822/ADC/chconf.h +++ b/testhal/NRF51/NRF51822/ADC/chconf.h @@ -28,6 +28,8 @@ #ifndef _CHCONF_H_ #define _CHCONF_H_ +#define _CHIBIOS_RT_CONF_ + /*===========================================================================*/ /** * @name System timers settings @@ -444,6 +446,20 @@ /* Context switch code here.*/ \ } +/** + * @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 @@ -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/testhal/NRF51/NRF51822/ADC/halconf.h b/testhal/NRF51/NRF51822/ADC/halconf.h index c7ab1cd..dc055de 100644 --- a/testhal/NRF51/NRF51822/ADC/halconf.h +++ b/testhal/NRF51/NRF51822/ADC/halconf.h @@ -163,6 +163,13 @@ #define HAL_USE_USB FALSE #endif +/** + * @brief Enables the WDG subsystem. + */ +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif + /*===========================================================================*/ /* ADC driver related settings. */ /*===========================================================================*/ -- cgit v1.2.3