diff options
author | Fabio Utzig <utzig@utzig.org> | 2016-04-04 21:35:11 -0300 |
---|---|---|
committer | Fabio Utzig <utzig@utzig.org> | 2016-04-04 21:35:11 -0300 |
commit | 653c72ccc3c8ff29bb2f2cffa00d1898c96c8ecf (patch) | |
tree | 603b134b8ff03b4d85c81082c0f6a177c8d0ed41 /demos/TIVA/RT-TM4C123G-LAUNCHPAD | |
parent | 031d81ae18328625fef4f8a578648d9de3b869b0 (diff) | |
download | ChibiOS-Contrib-653c72ccc3c8ff29bb2f2cffa00d1898c96c8ecf.tar.gz ChibiOS-Contrib-653c72ccc3c8ff29bb2f2cffa00d1898c96c8ecf.tar.bz2 ChibiOS-Contrib-653c72ccc3c8ff29bb2f2cffa00d1898c96c8ecf.zip |
Fix tiva demos
Diffstat (limited to 'demos/TIVA/RT-TM4C123G-LAUNCHPAD')
-rw-r--r-- | demos/TIVA/RT-TM4C123G-LAUNCHPAD/Makefile | 6 | ||||
-rw-r--r-- | demos/TIVA/RT-TM4C123G-LAUNCHPAD/chconf.h | 25 | ||||
-rw-r--r-- | demos/TIVA/RT-TM4C123G-LAUNCHPAD/main.c | 11 |
3 files changed, 32 insertions, 10 deletions
diff --git a/demos/TIVA/RT-TM4C123G-LAUNCHPAD/Makefile b/demos/TIVA/RT-TM4C123G-LAUNCHPAD/Makefile index 47560db..92a608c 100644 --- a/demos/TIVA/RT-TM4C123G-LAUNCHPAD/Makefile +++ b/demos/TIVA/RT-TM4C123G-LAUNCHPAD/Makefile @@ -83,7 +83,7 @@ PROJECT = ch CHIBIOS = ../../../../ChibiOS-RT CHIBIOS_CONTRIB = $(CHIBIOS)/../ChibiOS-Contrib # Startup files. -include $(CHIBIOS_CONTRIB)/os/common/ports/ARMCMx/compilers/GCC/mk/startup_tm4c123x.mk +include $(CHIBIOS_CONTRIB)/os/common/startup/ARMCMx/compilers/GCC/mk/startup_tm4c123x.mk # HAL-OSAL files (optional). include $(CHIBIOS)/os/hal/hal.mk include $(CHIBIOS_CONTRIB)/os/hal/ports/TIVA/TM4C123x/platform.mk @@ -91,7 +91,7 @@ include $(CHIBIOS_CONTRIB)/os/hal/boards/TI_TM4C123G_LAUNCHPAD/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_v7m.mk +include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/port_v7m.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/demos/TIVA/RT-TM4C123G-LAUNCHPAD/chconf.h b/demos/TIVA/RT-TM4C123G-LAUNCHPAD/chconf.h index 25b16cc..5e7c63d 100644 --- a/demos/TIVA/RT-TM4C123G-LAUNCHPAD/chconf.h +++ b/demos/TIVA/RT-TM4C123G-LAUNCHPAD/chconf.h @@ -1,6 +1,8 @@ #ifndef _CHCONF_H_ #define _CHCONF_H_ +#define _CHIBIOS_RT_CONF_ + /*===========================================================================*/ /** * @name System timers settings @@ -414,6 +416,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. @@ -457,6 +473,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/TIVA/RT-TM4C123G-LAUNCHPAD/main.c b/demos/TIVA/RT-TM4C123G-LAUNCHPAD/main.c index 0a64adb..29a1b20 100644 --- a/demos/TIVA/RT-TM4C123G-LAUNCHPAD/main.c +++ b/demos/TIVA/RT-TM4C123G-LAUNCHPAD/main.c @@ -16,7 +16,7 @@ #include "ch.h" #include "hal.h" -#include "test.h" +#include "ch_test.h" typedef struct led_config { @@ -31,8 +31,7 @@ typedef struct led_config static THD_WORKING_AREA(waBlinkLedRed, 128); static THD_WORKING_AREA(waBlinkLedGreen, 128); static THD_WORKING_AREA(waBlinkLedBlue, 128); -static msg_t blinkLed(void *arg) -{ +static THD_FUNCTION(blinkLed, arg) { led_config_t *ledConfig = (led_config_t*) arg; chRegSetThreadName("Blinker"); @@ -43,8 +42,6 @@ static msg_t blinkLed(void *arg) chThdSleepMilliseconds(ledConfig->sleep); palTogglePad(ledConfig->port, ledConfig->pin); } - - return (msg_t) 0; } /* @@ -72,7 +69,7 @@ int main(void) sdStart(&SD1, NULL); if (!palReadPad(GPIOF, GPIOF_SW2)) { - TestThread(&SD1); + test_execute((BaseSequentialStream *)&SD1); } ledRed.port = GPIOF; @@ -101,6 +98,6 @@ int main(void) while (TRUE) { chThdSleepMilliseconds(100); } - + return 0; } |