eLooM for STM32 application  v3.3.0
Loading...
Searching...
No Matches
Macros | Functions
sysdebug.h File Reference

Debug Log. More...

#include "services/eloom_sysbase.h"
#include <stdint.h>
#include "sysdebug_config.h"
+ Include dependency graph for sysdebug.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define SYS_DBG_LEVEL_ALL   0x00U
 All debug message are sent to the debug channel.
 
#define SYS_DBG_LEVEL_VERBOSE   0x01U
 A general message for system developers.
 
#define SYS_DBG_LEVEL_LLA   0x02U
 A message for system developers generated by a Low Level API function.
 
#define SYS_DBG_LEVEL_SL   0x03U
 A message for system developers generated by a Service Layer function.
 
#define SYS_DBG_LEVEL_DEFAULT   0x04U
 A message generated by application code.
 
#define SYS_DBG_LEVEL_WARNING   0x05U
 A message generated when a minor error occurs. The system is probably able to auto-recovers.
 
#define SYS_DBG_LEVEL_SEVERE   0x06U
 A message generated when a critical error occurs. The system probably hangs.
 
#define SYS_DBG_ON   0x80U
 Flag for SYS_DEBUGF control byte to enable the debug message for that module.
 
#define SYS_DBG_OFF   0x00U
 Flag for SYS_DEBUGF control byte to disable the debug message for that module.
 
#define SYS_DBG_HALT   0x08U
 Flag for SYS_DEBUGF control byte to halt after printing a debug message for that module.
 

Functions

int SysDebugHardwareInit (void)
 
int SysDebugInit (void)
 
void SysDebugStartRunTimeStatsTimer (void)
 
void SysDebugLogFreeHeapSize (void)
 

Detailed Description

Debug Log.

Author
STMicroelectronics - ST-Korea - MCD Team
Version
3.0.0
Date
Oct 10, 2016

This file implement a set of macro in order to provide a simple way to create a log when the application is compiled in DEBUG.

Attention

Copyright (c) 2016 STMicroelectronics. All rights reserved.

This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.

Macro Definition Documentation

◆ SYS_DBG_LEVEL_ALL

#define SYS_DBG_LEVEL_ALL   0x00U

All debug message are sent to the debug channel.

The lower three bits of the debug control byte specifies debug level according to the following convention:

  • 0 all
  • 1 verbose: a general message for system developers.
  • 2 low level api: a message for system developers generated by a Low Level API function.
  • 3 service layer: a message for system developers generated by a Service Layer function.
  • 4 default: a message generated by application code.
  • 5 warning: a message generated when a minor error occurs. The system is probably able to auto-recovers.
  • 6 severe: a message generated when a critical error occurs. The system probably hangs.

Function Documentation

◆ SysDebugHardwareInit()

int SysDebugHardwareInit ( void  )

Initialize the hardware of the debug communication port.

Returns
0 if success, an error code otherwise.

◆ SysDebugInit()

int SysDebugInit ( void  )

Initialize the debug support.

Returns
0 if success, an error code otherwise.

◆ SysDebugLogFreeHeapSize()

void SysDebugLogFreeHeapSize ( void  )

Display in the debug log the size of the available eLooM heap.

◆ SysDebugStartRunTimeStatsTimer()

void SysDebugStartRunTimeStatsTimer ( void  )

Enable the IRQ for the timer used as timebase in order to compute the FreeRTOS statistics about the MCU usage on per task basis.