- added IODevice support
- fixed some issues with the logger and stack sizes git-svn-id: https://svn.vbchaos.nl/svn/hsb/trunk@216 05563f52-14a8-4384-a975-3d1654cca0fa
This commit is contained in:
@@ -25,11 +25,13 @@
|
||||
// Include files
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
#include <FreeRTOSFixes.h>
|
||||
#include <unistd.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "freeRTOSFixes.h"
|
||||
#include "Logger.h"
|
||||
#include "led.h"
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Constant and macro definitions
|
||||
@@ -65,12 +67,12 @@ void OS_logTaskInfo(xTaskHandle taskHandle)
|
||||
unsigned portBASE_TYPE highWaterMark;
|
||||
char text[128];
|
||||
|
||||
snprintf(text, sizeof(text), "Task %s\n", pcTaskGetTaskName(taskHandle));
|
||||
// Shell_sendString(text);
|
||||
snprintf(text, sizeof(text), "***** Task %s", pcTaskGetTaskName(taskHandle));
|
||||
LOGGER_INFO(text);
|
||||
|
||||
highWaterMark = uxTaskGetStackHighWaterMark(taskHandle);
|
||||
snprintf(text, sizeof(text), "Stack high water mark : %lu long words\n", highWaterMark);
|
||||
// Shell_sendString(text);
|
||||
snprintf(text, sizeof(text), "***** Stack high water mark : %lu long words", highWaterMark);
|
||||
LOGGER_INFO(text);
|
||||
}
|
||||
|
||||
// Implementation for libc, needed for printf related functions.
|
||||
@@ -93,7 +95,8 @@ caddr_t _sbrk(int incr)
|
||||
// Stack overflow hook
|
||||
void vApplicationStackOverflowHook(xTaskHandle xTask, signed portCHAR* pcTaskName)
|
||||
{
|
||||
// Logger_fatal(FATALCODE_STACKOVERFLOW);
|
||||
LED_turnOn(ledGreen);
|
||||
LOGGER_ERROR("STACK OVERFLOW IN TASK %s", pcTaskName);
|
||||
}
|
||||
|
||||
// Malloc failed hook
|
||||
|
||||
Reference in New Issue
Block a user