Or maybe is sim's up_assert() wrong to exit simulation? Thinking about it, 
doing up_assert() (which would just print the error) and exit() would indeed 
exit the app only.

What do you mean by exit the simulation.  It should exit the task that caused the assertion but the simulation should continue to run.

Hmm.. so yes, you are right.  the up_assert() implementation is wrong.  Compare to arch/arm/src/armv-7m/arm_assert.c.  For crash occurs only if:

   342 static void _up_assert(void)
   343 {
   344   /* Flush any buffered SYSLOG data */
   345
   346   syslog_flush();
   347
   348   /* Are we in an interrupt handler or the idle task? */
   349
   350   if (CURRENT_REGS || (running_task())->flink == NULL)
   351     {

Otherwise, it just returns (eventually) to __assert which calls exit().  That is the correct behavior.

Reply via email to