From fc82f1e556141a6737e391303b8f722df42d85f6 Mon Sep 17 00:00:00 2001 From: Thibault RICHARD Date: Sat, 28 Apr 2012 19:58:40 +0200 Subject: [PATCH] [SAM] Fixing SysTick handler issue --- hardware/arduino/sam/cores/sam/main.cpp | 9 +++++++++ hardware/arduino/sam/cores/sam/wiring.c | 6 +++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/hardware/arduino/sam/cores/sam/main.cpp b/hardware/arduino/sam/cores/sam/main.cpp index 7888c4cb9..4c6b43a0d 100644 --- a/hardware/arduino/sam/cores/sam/main.cpp +++ b/hardware/arduino/sam/cores/sam/main.cpp @@ -19,6 +19,15 @@ #define ARDUINO_MAIN #include "Arduino.h" +/* + * Cortex-M3 Systick IT handler + */ +extern void SysTick_Handler( void ) +{ + // Increment tick count each ms + TimeTick_Increment() ; +} + /* * \brief Main entry point of Arduino application */ diff --git a/hardware/arduino/sam/cores/sam/wiring.c b/hardware/arduino/sam/cores/sam/wiring.c index e0d9dbbd8..4e88e2752 100644 --- a/hardware/arduino/sam/cores/sam/wiring.c +++ b/hardware/arduino/sam/cores/sam/wiring.c @@ -55,13 +55,13 @@ void delayMicroseconds( uint32_t dwUs ) } /* - * Cortex-M3 Systick IT handler + * Cortex-M3 Systick IT handler: MOVED TO MAIN DUE TO WEAK SYMBOL ISSUE NOT RESOLVED */ -extern void SysTick_Handler( void ) +/*extern void SysTick_Handler( void ) { // Increment tick count each ms TimeTick_Increment() ; -} +}*/ #if defined ( __ICCARM__ ) /* IAR Ewarm 5.41+ */ extern signed int putchar( signed int c ) ;