Sapphire SoC DS Sapphire SoC UG Sapphire HP SoC DS Sapphire HP SoC UG RISC-V Embedded IDE UG Board Support Package
Loading...
Searching...
No Matches
Debug Driver

Overview

Used to log/assert for debug purpose.

This module provides functions to configure and control debug level, logging and assertion.

Note
User may find the configuration in userDef.h.

Efinity IDE Will create userDef.h automatically when user create a new project or import a project that doesn't have userDef.h unless user's project already its own userDef.h

userDef.h

// --- DEBUG_MODE ---
// 0 = Asserts OFF, Logs removed
// 1 = Asserts ON, Logs filtered
#define DEBUG_MODE 1
// --- ACTIVE_DEBUG_MOD --- This is the list of available module to debug
// DBG_MOD_SYS
// DBG_MOD_FAULT
// DBG_MOD_UART
// DBG_MOD_I2C
// DBG_MOD_SPI
// DBG_MOD_SPI_FLASH
// DBG_MOD_RTC
// DBG_MOD_SENSOR
// DBG_MOD_ALL
#define ACTIVE_DEBUG_MOD DBG_MOD_ALL
// --- ACTIVE_MIN_LVL ---
// DBG_LVL_ALL 0 // Info, Warn, Error
// DBG_LVL_WARN 1 // Warn, Error
// DBG_LVL_ERR 2 // Error only
// DBG_LVL_NONE 3 // Silence
#define ACTIVE_MIN_LVL DBG_LVL_ALL

Topics

 Configuration & Macros
 User Configuration and Logic Macros.
 Constants & Definitions
 Register bitmasks, ANSI colors, and Debug Levels.