@@ -61,10 +61,6 @@ void util_zero(volatile void* dst, size_t len);
61
61
// `out` must be of size in_len*2+1. Use BB_HEX_SIZE() to compute the size.
62
62
void util_uint8_to_hex (const uint8_t * in_bin , size_t in_len , char * out );
63
63
64
- // This function is only compiled when we compile with SEMIHOSTING, it is convenient when debugging
65
- // to print byte arrays as hex.
66
- char * util_uint8_to_hex_alloc (const uint8_t * in_bin , size_t in_len );
67
-
68
64
#define BB_HEX_SIZE (in_bin ) (sizeof((in_bin)) * 2 + 1)
69
65
70
66
void util_cleanup_str (char * * str );
@@ -85,38 +81,6 @@ void util_cleanup_64(uint8_t** buf);
85
81
uint8_t* __attribute__((__cleanup__(util_cleanup_64))) var##_clean __attribute__((unused)) = \
86
82
var;
87
83
88
- /**
89
- * Tracing tools. Only enabled in semihosting builds
90
- *
91
- * Since we are using C99 it is necessary to provide at least 1 argument to "...". To print a
92
- * string, provide the format string "%s" and your string as the second argument.
93
- *
94
- * "do {} while" is a hack to make a macro work like a function in some cases.
95
- *
96
- * stderr is not buffered and takes forever to print stdout is used instead.
97
- *
98
- * SOURCE_PATH_SIZE is a definition provided from the command line which is the length of the path
99
- * to the project directory.
100
- */
101
-
102
- #if defined(SEMIHOSTING )
103
- #define LOG_LEVEL 1
104
- #else
105
- #define LOG_LEVEL 0
106
- #endif
107
- #define FILENAME (&__FILE__[SOURCE_PATH_SIZE])
108
-
109
- #define trace (format , ...) \
110
- do { \
111
- if (LOG_LEVEL > 0) fprintf(stdout, "%s:%d: " format, FILENAME, __LINE__, __VA_ARGS__); \
112
- } while (0)
113
-
114
- #define traceln (format , ...) \
115
- do { \
116
- if (LOG_LEVEL > 0) \
117
- fprintf(stdout, "%s:%d: " format "\n", FILENAME, __LINE__, __VA_ARGS__); \
118
- } while (0)
119
-
120
84
/**
121
85
* Struct definining a rw buffer (buffer + length).
122
86
*/
0 commit comments