Hello,
I am currently trying out the assert mechanism of Zephyr.
I have added CONFIG_ASSERT=y to my prj.conf file and included "sys/__assert.h" in my main.c.
My program looks something like this:
void main(void) { console_getline_init(); char * line; while (1) { line = console_getline(); uint16_t len = strlen(line); if(len == 1) { if(*line == 'a') { __ASSERT(false, "Assert test"); } else { // ... } } else if (len == 0) { printk("getline() returned empty line\n"); } else { // ... } } }
I am using Putty on my PC to communicate with the Thingy-91.
If I am debugging my application by starting the debug context in SEGGER Embedded Studio (Debug->Go), I don't get the assert message in Putty.
I either get nothing or it says UART FRAMING ERROR! CHECK BAUDRATE!
But if I am running the application without the debug context, I receive the assert message in Putty plus the UART Framing error message, which is correct for these situations I guess.
Why don't I get the assert message while debugging the application?