From 631660116597bf80cc90d4aed5235cb4b46e2b27 Mon Sep 17 00:00:00 2001 From: Theodore Ateba Date: Fri, 14 Jul 2017 21:52:58 +0000 Subject: Add NIL support for AVR Tiny architecture. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10332 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/common/ports/AVR/chcore.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'os/common') diff --git a/os/common/ports/AVR/chcore.c b/os/common/ports/AVR/chcore.c index ca70ccc5f..77f6ace9f 100644 --- a/os/common/ports/AVR/chcore.c +++ b/os/common/ports/AVR/chcore.c @@ -150,7 +150,12 @@ void _port_thread_start(void) { asm volatile ("movw r24, r4"); asm volatile ("movw r30, r2"); asm volatile ("icall"); - asm volatile ("call chSysHalt"); +#if defined(_CHIBIOS_RT_) + asm volatile ("call chThdExit"); /* Used for avr5 Architecture. */ +#endif +#if defined(_CHIBIOS_NIL_) + asm volatile ("call chSysHalt"); /* Used for avr5 Architecture. */ +#endif } /** @} */ -- cgit v1.2.3