126 #ifndef ti_sysbios_runtime_Error__include 127 #define ti_sysbios_runtime_Error__include 137 #define ti_sysbios_runtime_Error_long_names 138 #include "Error_defs.h" 163 #define Error_UNWIND 0 164 #define Error_TERMINATE 1 174 #define Error_E_memory "out of memory: heap=0x%x, size=%u" 190 #define Error_E_generic "error %s" 202 #define Error_IGNORE (&Error_ignore) 213 #define Error_ABORT NULL 267 extern void Error_raiseX(
Error_Block *eb,
int prefix,
const char *
id, intptr_t
a0, intptr_t
a1);
269 #if Error_retainStrings_D 270 #define Error_PLACE_STR_IN_SECTION(name, str) static const char name[] = (str); 272 #if defined(__IAR_SYSTEMS_ICC__) 273 #define Error_PLACE_STR_IN_SECTION(name, str) \ 274 __root static const char name[] @ ".error_str" = str; 275 #elif defined(__TI_COMPILER_VERSION__) || (defined(__clang__) && defined(__ti_version__)) || defined(__GNUC__) 276 #define Error_PLACE_STR_IN_SECTION(name, str) \ 277 static const char name[] __attribute__((used,section(".error_str"))) = str; 279 #error Incompatible compiler: Error/Assert is currently supported by the following \ 280 compilers: TI ARM Compiler, TI CLANG Compiler, GCC, IAR. Please migrate to a \ 281 a supported compiler. 285 #define Error_STR_NX(l) #l 286 #define Error_STR(l) Error_STR_NX(l) 288 #if Error_addFileLine_D 289 #define Error_raise(eb, id, a0, a1) do { \ 290 Error_PLACE_STR_IN_SECTION(err, id " (" __FILE__ ":" Error_STR(__LINE__) ")"); \ 291 Error_raiseX((eb), 0, err, (intptr_t)(a0), (intptr_t)(a1)); } while (0); 293 #define Error_raise(eb, id, a0, a1) do { \ 294 Error_PLACE_STR_IN_SECTION(err, id); \ 295 Error_raiseX((eb), 0, err, (intptr_t)(a0), (intptr_t)(a1)); } while (0); 298 #define Error_assert(id, a0, a1) do { \ 299 Error_PLACE_STR_IN_SECTION(err, id); \ 300 Error_raiseX(NULL, 1, err, (intptr_t)(a0), (intptr_t)(a1)); } while (0); 311 #undef ti_sysbios_runtime_Error_long_names 312 #include "Error_defs.h" bool Error_check(Error_Block *eb)
Return true if an error was raised.
void Error_init(Error_Block *eb)
Initialize an error block.
const char * id
Definition: Error.h:153
Error block.
Definition: Error.h:152
intptr_t a1
Definition: Error.h:155
void Error_print(Error_Block *eb)
Print error using System.printf()
void(* Error_HookFxn)(Error_Block *eb)
Definition: Error.h:158
intptr_t a0
Definition: Error.h:154
struct Error_Block Error_Block
Error block.