4.104.115
Line | |
---|
1 | /* |
---|
2 | * This is a simple test whose only purpose is to start the Monitor |
---|
3 | * task. The Monitor task can be used to obtain information about |
---|
4 | * a variety of RTEMS objects. |
---|
5 | * |
---|
6 | * COPYRIGHT (c) 1989-1999. |
---|
7 | * On-Line Applications Research Corporation (OAR). |
---|
8 | * |
---|
9 | * The license and distribution terms for this file may be |
---|
10 | * found in the file LICENSE in this distribution or at |
---|
11 | * http://www.rtems.com/license/LICENSE. |
---|
12 | * |
---|
13 | * $Id$ |
---|
14 | */ |
---|
15 | |
---|
16 | #define CONFIGURE_INIT |
---|
17 | #include "bsp.h" |
---|
18 | #include "system.h" |
---|
19 | |
---|
20 | #include <rtems/shell.h> |
---|
21 | #include <rtems/shellconfig.h> |
---|
22 | #define MAX_ARGS 128 |
---|
23 | |
---|
24 | char *Commands[] = { |
---|
25 | "task", |
---|
26 | "task 32", |
---|
27 | NULL |
---|
28 | }; |
---|
29 | rtems_task Init( |
---|
30 | rtems_task_argument argument |
---|
31 | ) |
---|
32 | { |
---|
33 | #if !BSP_SMALL_MEMORY |
---|
34 | int i; |
---|
35 | int argc; |
---|
36 | char *argv[MAX_ARGS]; |
---|
37 | char tmp[256]; |
---|
38 | |
---|
39 | puts( "\n*** START OF MONITOR02 ***\n"); |
---|
40 | |
---|
41 | for (i=0; i < MAX_ARGS && Commands[i] ; i++) { |
---|
42 | strcpy( tmp, Commands[i] ); |
---|
43 | if (!rtems_shell_make_args(tmp, &argc, argv, MAX_ARGS) ) { |
---|
44 | printf( "===> %s\n", Commands[i] ); |
---|
45 | rtems_shell_main_monitor(argc, argv); |
---|
46 | } |
---|
47 | } |
---|
48 | puts( "\n*** END OF MONITOR02 ***\n"); |
---|
49 | #else |
---|
50 | puts( "TARGET MEMORY TOO SMALL TO RUN\n\n"); |
---|
51 | #endif |
---|
52 | rtems_test_exit(0); |
---|
53 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.