Ejemplo n.º 1
0
void up_assert(void)
#endif
{
#if CONFIG_TASK_NAME_SIZE > 0
  struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
#endif

  board_led_on(LED_ASSERTION);

#ifdef CONFIG_HAVE_FILENAME
#if CONFIG_TASK_NAME_SIZE > 0
  lldbg("Assertion failed at file:%s line: %d task: %s\n",
        filename, lineno, rtcb->name);
#else
  lldbg("Assertion failed at file:%s line: %d\n",
        filename, lineno);
#endif
#else
#if CONFIG_TASK_NAME_SIZE > 0
  lldbg("Assertion failed: task: %s\n", rtcb->name);
#else
  lldbg("Assertion failed\n");
#endif
#endif

  up_stackdump();
  REGISTER_DUMP();
 _up_assert(EXIT_FAILURE);
}
Ejemplo n.º 2
0
void up_assert(void)
#endif
{
#if CONFIG_TASK_NAME_SIZE > 0
  struct tcb_s *rtcb = this_task();
#endif

  board_autoled_on(LED_ASSERTION);

#ifdef CONFIG_HAVE_FILENAME
#if CONFIG_TASK_NAME_SIZE > 0
  lldbg("Assertion failed at file:%s line: %d task: %s\n",
        filename, lineno, rtcb->name);
#else
  lldbg("Assertion failed at file:%s line: %d\n",
        filename, lineno);
#endif
#else
#if CONFIG_TASK_NAME_SIZE > 0
  lldbg("Assertion failed: task: %s\n", rtcb->name);
#else
  lldbg("Assertion failed\n");
#endif
#endif

  up_stackdump();
  REGISTER_DUMP();

#ifdef CONFIG_ARCH_USBDUMP
  /* Dump USB trace data */

  (void)usbtrace_enumerate(assert_tracecallback, NULL);
#endif

#ifdef CONFIG_BOARD_CRASHDUMP
  board_crashdump(up_getsp(), this_task(), filename, lineno);
#endif

  _up_assert(EXIT_FAILURE);
}