Skip to content

Commit a4c63e6

Browse files
authored
Merge pull request #14576 from marcuschangarm/trace_debug_color
Trace: Change tr_debug color from gray to bright blue
2 parents c02e101 + 6e4c02a commit a4c63e6

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

platform/mbed-trace/mbed_lib.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@
1919
"value": "malloc",
2020
"macro_name": "MEM_ALLOC"
2121
},
22+
"color-theme": {
23+
"help": "Set color theme. 0 for readable, 1 for unobtrusive.",
24+
"options": [0, 1],
25+
"macro_name": "MBED_TRACE_COLOR_THEME",
26+
"value": 0
27+
},
2228
"deallocator": {
2329
"value": "free",
2430
"macro_name": "MEM_FREE"

platform/mbed-trace/source/mbed_trace.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,17 @@
4949
#endif
5050
#endif /* YOTTA_CFG_MEMLIB */
5151

52+
#if defined(MBED_TRACE_COLOR_THEME) && (MBED_TRACE_COLOR_THEME == 1)
5253
#define VT100_COLOR_ERROR "\x1b[31m"
5354
#define VT100_COLOR_WARN "\x1b[33m"
5455
#define VT100_COLOR_INFO "\x1b[39m"
5556
#define VT100_COLOR_DEBUG "\x1b[90m"
57+
#else
58+
#define VT100_COLOR_ERROR "\x1b[31m"
59+
#define VT100_COLOR_WARN "\x1b[33m"
60+
#define VT100_COLOR_INFO "\x1b[39m"
61+
#define VT100_COLOR_DEBUG "\x1b[94m"
62+
#endif
5663

5764
/** default max trace line size in bytes */
5865
#ifdef MBED_TRACE_LINE_LENGTH

0 commit comments

Comments
 (0)