Re: Debug access without reset?
Posted: Sun Jun 29, 2014 3:13 pm
I have been trying to get my own Assert going, but something is wrong.
I have defined mine as:at the end of chconf.h. But when I compile I get the error: "volatile assert_errors kfly_assert_errors;" is declared in main.c (hence the extern).
Could you point out my error?
Brest Regards
Emil
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

