@@ -105,6 +105,8 @@ void initVariant(void)
105105 * NOTE: vApplicationIdleHook() MUST NOT, UNDER ANY CIRCUMSTANCES, CALL A FUNCTION THAT MIGHT BLOCK.
106106 *
107107 */
108+ void vApplicationIdleHook ( void ) __attribute__((weak));
109+
108110void vApplicationIdleHook ( void )
109111{
110112 loop (); // the normal Arduino loop() function is run here.
@@ -131,6 +133,8 @@ void vApplicationIdleHook( void )
131133 This routine will never return.
132134 This routine is referenced in the task.c file of FreeRTOS as an extern.
133135\*---------------------------------------------------------------------------*/
136+ void vApplicationMallocFailedHook ( void ) __attribute__((weak));
137+
134138void vApplicationMallocFailedHook ( void )
135139{
136140#if defined(__AVR_ATmega640__) || defined(__AVR_ATmega1280__) || defined(__AVR_ATmega1281__) || defined(__AVR_ATmega2560__) || defined(__AVR_ATmega2561__) // Arduino Mega with 2560
@@ -192,7 +196,9 @@ void vApplicationMallocFailedHook( void )
192196 This routine will never return.
193197 This routine is referenced in the task.c file of FreeRTOS as an extern.
194198\*---------------------------------------------------------------------------*/
195- void vApplicationStackOverflowHook ( TaskHandle_t xTask __attribute__ ((unused)), portCHAR *pcTaskName __attribute__((unused)) )
199+ void vApplicationStackOverflowHook ( TaskHandle_t xTask __attribute__ ((unused)), portCHAR *pcTaskName __attribute__((unused)) ) __attribute__((weak));
200+
201+ void vApplicationStackOverflowHook ( TaskHandle_t xTask, portCHAR *pcTaskName )
196202{
197203#if defined(__AVR_ATmega640__) || defined(__AVR_ATmega1280__) || defined(__AVR_ATmega1281__) || defined(__AVR_ATmega2560__) || defined(__AVR_ATmega2561__) // Arduino Mega with 2560
198204 DDRB |= _BV (DDB7);
0 commit comments