I have defined mine as:
Code: Select all
typedef struct {
const char *reason;
const char *function;
} assert_errors;
#define chDbgAssert(c, r) do { \
if (CH_DBG_ENABLE_ASSERTS && !(c)) { \
extern volatile assert_errors kfly_assert_errors; \
kfly_assert_errors.reason = r; \
kfly_assert_errors.function = __func__; \
chSysHalt(__func__); \
} \
} while (0)Code: Select all
Compiling chcoreasm_v7m.s
Compiling chcore.c
./chconf.h: Assembler messages:
./chconf.h:498: Error: bad instruction `typedef struct {'
./chconf.h:499: Error: bad instruction `const char*reason'
./chconf.h:500: Error: bad instruction `const char*function'
./chconf.h:501: Error: junk at end of line, first unrecognized character is `}'
make: *** [build/obj/chcoreasm_v7m.o] Error 1
make: *** Waiting for unfinished jobs....Could you point out my error?
Brest Regards
Emil

