diff options
author | Dominik Sliwa <dominik.sliwa@toradex.com> | 2018-09-11 15:35:14 +0200 |
---|---|---|
committer | Dominik Sliwa <dominik.sliwa@toradex.com> | 2018-09-11 15:35:14 +0200 |
commit | f3f54d37d7888235bccac1c0cddda1dd9b2323f4 (patch) | |
tree | bd68068e0b7889a09779973e0e494f5d73acd2ac /utilities/fsl_debug_console.h | |
parent | 4d7f3aebc85ff3928a25bd1567f94f2789d6437b (diff) |
implement SWO debugging
Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
Diffstat (limited to 'utilities/fsl_debug_console.h')
-rw-r--r-- | utilities/fsl_debug_console.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/utilities/fsl_debug_console.h b/utilities/fsl_debug_console.h index eb716d8..d617979 100644 --- a/utilities/fsl_debug_console.h +++ b/utilities/fsl_debug_console.h @@ -60,6 +60,8 @@ //#define SDK_DEBUGCONSOLE 1U #endif +//#define USE_SWO + #ifdef TESTER_BUILD #undef SDK_DEBUGCONSOLE #endif @@ -93,10 +95,17 @@ #define PUTCHAR DbgConsole_Putchar #define GETCHAR DbgConsole_Getchar #else /* Select printf, scanf, putchar, getchar of toolchain. */ +#ifdef USE_SWO +#define PRINTF SWO_Printf +#define SCANF(x...) +#define PUTCHAR SWO_Putchar +#define GETCHAR +#else #define PRINTF(x...) #define SCANF(x...) #define PUTCHAR #define GETCHAR +#endif #endif /* SDK_DEBUGCONSOLE */ /******************************************************************************* @@ -143,6 +152,12 @@ status_t DbgConsole_Init(uint32_t baseAddr, uint32_t baudRate, uint8_t device, u */ status_t DbgConsole_Deinit(void); +#ifdef USE_SWO +int SWO_Printf(const char *fmt_s, ...); + +int SWO_Putchar(int c); +#endif + #if SDK_DEBUGCONSOLE /*! * @brief Writes formatted output to the standard output stream. |