Features Supported
- APIs to log strings to the selected console
- APIs to assert if a expression evaluates to 0
- Before asserting, it will log the file and line number to console
- Ability to disable assert's and logging via a pre-processor define
- The following console options are supported
- Log to CCS IDE console via JTAG
- Log to UART terminal
- SysCfg support for below,
- SysCfg can be used to select the log console
- When UART log is selected, SysCfg allows to select the UART instance and its properties (baud rate etc) to use.
- SysCfg option to enable shared memory reader task
- APIs to read line as string and/or format input in scanf style from UART console.
Features NOT Supported
- Log APIs should not be called from ISR context. When called in ISR the APIs have no effect.
Important Usage Guidelines
UART logging
- Make sure the selected UART driver is opened for the logs to be output to UART.
- When enabled via SysCfg, calling the function
Drivers_open
opens and initializes the UART for logging.
Other guidelines
- Log and assert APIs should not be called from ISR context.
- The assert and logging APIs are task or thread safe, i.e they can be called from multiple tasks without the output getting mixed.
- The cores on which CCS or UART console logging is enabled can use either NORTOS or FreeRTOS.
Example Usage
Include the below file to access the APIs,
Example usage for assert,
Example usage for logs,
char *
str =
"Hello, world !!!";
Example usage for scanf,
uint32_t value32;
value32 = 0;
API
APIs for Debug log's and assert's