1 | /* |
---|
2 | * This routine starts the application. It includes application, |
---|
3 | * board, and monitor specific initialization and configuration. |
---|
4 | * The generic CPU dependent initialization has been performed |
---|
5 | * before this routine is invoked. |
---|
6 | * |
---|
7 | * COPYRIGHT (c) 1989-1999. |
---|
8 | * On-Line Applications Research Corporation (OAR). |
---|
9 | * |
---|
10 | * The license and distribution terms for this file may be |
---|
11 | * found in the file LICENSE in this distribution or at |
---|
12 | * http://www.rtems.com/license/LICENSE. |
---|
13 | * |
---|
14 | * $Id$ |
---|
15 | */ |
---|
16 | |
---|
17 | #include <bsp.h> |
---|
18 | |
---|
19 | unsigned char *duart_base; |
---|
20 | extern struct duart_regs duart_info; |
---|
21 | |
---|
22 | #define DELAY 5000 |
---|
23 | |
---|
24 | void led_putnum(void); |
---|
25 | |
---|
26 | /* |
---|
27 | * bsp_start |
---|
28 | * |
---|
29 | * This routine does the bulk of the system initialization. |
---|
30 | */ |
---|
31 | void bsp_start( void ) |
---|
32 | { |
---|
33 | rtems_isr_entry *monitors_vector_table; |
---|
34 | int index; |
---|
35 | |
---|
36 | /* RAM size set in linker script */ |
---|
37 | duart_base = (unsigned char *)DUART_ADDR; |
---|
38 | |
---|
39 | /* |
---|
40 | * Set the VBR here to the monitor's default. |
---|
41 | */ |
---|
42 | monitors_vector_table = (rtems_isr_entry *)0; |
---|
43 | /* This is where you set vector base register = 0 */ |
---|
44 | m68k_set_vbr( monitors_vector_table ); |
---|
45 | |
---|
46 | /* The vector interrupt table for the 680x0 is in appendix B-2 |
---|
47 | * of the M68000 Family Programmer's reference table |
---|
48 | */ |
---|
49 | for ( index=2 ; index<=255 ; index++ ) |
---|
50 | M68Kvec[ index ] = monitors_vector_table[ 32 ]; |
---|
51 | |
---|
52 | M68Kvec[ 2 ] = monitors_vector_table[ 2 ]; /* bus error vector */ |
---|
53 | M68Kvec[ 4 ] = monitors_vector_table[ 4 ]; /* breakpoints vector */ |
---|
54 | M68Kvec[ 9 ] = monitors_vector_table[ 9 ]; /* trace vector */ |
---|
55 | |
---|
56 | /* |
---|
57 | * Set the VBR here if you do not want to use the monitor's vector table. |
---|
58 | */ |
---|
59 | |
---|
60 | m68k_set_vbr( &M68Kvec ); |
---|
61 | |
---|
62 | rtems_cache_enable_instruction(); |
---|
63 | rtems_cache_enable_data(); |
---|
64 | |
---|
65 | /* led_putnum('e'); * for debugging purposes only */ |
---|
66 | } |
---|