Merge pull request #14576 from marcuschangarm/trace_debug_color

Trace: Change tr_debug color from gray to bright blue
pull/14661/head
Martin Kojtal 2021-05-12 10:48:44 +02:00 committed by GitHub
commit a4c63e6fdb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 0 deletions

View File

@ -19,6 +19,12 @@
"value": "malloc",
"macro_name": "MEM_ALLOC"
},
"color-theme": {
"help": "Set color theme. 0 for readable, 1 for unobtrusive.",
"options": [0, 1],
"macro_name": "MBED_TRACE_COLOR_THEME",
"value": 0
},
"deallocator": {
"value": "free",
"macro_name": "MEM_FREE"

View File

@ -49,10 +49,17 @@
#endif
#endif /* YOTTA_CFG_MEMLIB */
#if defined(MBED_TRACE_COLOR_THEME) && (MBED_TRACE_COLOR_THEME == 1)
#define VT100_COLOR_ERROR "\x1b[31m"
#define VT100_COLOR_WARN "\x1b[33m"
#define VT100_COLOR_INFO "\x1b[39m"
#define VT100_COLOR_DEBUG "\x1b[90m"
#else
#define VT100_COLOR_ERROR "\x1b[31m"
#define VT100_COLOR_WARN "\x1b[33m"
#define VT100_COLOR_INFO "\x1b[39m"
#define VT100_COLOR_DEBUG "\x1b[94m"
#endif
/** default max trace line size in bytes */
#ifdef MBED_TRACE_LINE_LENGTH