mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-24 06:35:36 +08:00
2008-02-15 Joel Sherrill <joel.sherrill@OARcorp.com>
* console/console.c: Do not have BSP specific __assert.
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
2008-02-15 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||
|
||||
* console/console.c: Do not have BSP specific __assert.
|
||||
|
||||
2007-12-11 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||
|
||||
* clock/clockdrv.c, include/bsp.h, startup/bspstart.c: Eliminate copies
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <bsp.h>
|
||||
@@ -29,9 +28,6 @@
|
||||
#include <gba.h>
|
||||
#include <conio.h>
|
||||
|
||||
#undef __assert
|
||||
void __assert (const char *file, int line, const char *msg);
|
||||
|
||||
extern void rtemsReboot(void);
|
||||
|
||||
|
||||
@@ -83,35 +79,6 @@ BSP_output_char_function_type BSP_output_char = (BSP_output_char_function_ty
|
||||
/** BSP_poll_char for printk support */
|
||||
BSP_polling_getchar_function_type BSP_poll_char = (BSP_polling_getchar_function_type) gba_getch;
|
||||
|
||||
|
||||
/**
|
||||
* @brief assert function
|
||||
*
|
||||
* @param *file file name
|
||||
* @param line line number
|
||||
* @param *msg assert message
|
||||
* @return None
|
||||
*/
|
||||
void __assert (const char *file, int line, const char *msg)
|
||||
{
|
||||
static const char exit_msg[] = "EXECUTIVE SHUTDOWN! Any button to reboot...";
|
||||
/*
|
||||
* Note we cannot call exit or printf from here,
|
||||
* assert can fail inside ISR too
|
||||
*/
|
||||
close(2); /* Close console */
|
||||
close(1);
|
||||
close(0);
|
||||
|
||||
printk("\nassert failed: %s: ", file);
|
||||
printk("%d: ", line);
|
||||
printk("%s\n\n", msg);
|
||||
printk("%s",exit_msg);
|
||||
while ( !GBA_ANY_KEY(GBA_KEY_ALL) );
|
||||
printk("\n\n");
|
||||
rtemsReboot();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Console device driver INITIALIZE entry point
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user