source: rtems/c/src/lib/libbsp/m68k/idp/startup/bspstart.c @ c499856

4.115
Last change on this file since c499856 was c499856, checked in by Chris Johns <chrisj@…>, on Mar 20, 2014 at 9:10:47 PM

Change all references of rtems.com to rtems.org.

  • Property mode set to 100644
File size: 1.7 KB
Line 
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.org/license/LICENSE.
13 */
14
15#include <bsp.h>
16
17unsigned char *duart_base;
18extern struct duart_regs duart_info;
19
20#define DELAY 5000
21
22void led_putnum(void);
23
24/*
25 *  bsp_start
26 *
27 *  This routine does the bulk of the system initialization.
28 */
29void bsp_start( void )
30{
31  rtems_isr_entry       *monitors_vector_table;
32  int                   index;
33
34  /* RAM size set in linker script */
35  duart_base    = (unsigned char *)DUART_ADDR;
36
37  /*
38   *  Set the VBR here to the monitor's default.
39   */
40  monitors_vector_table = (rtems_isr_entry *)0;
41   /* This is where you set vector base register = 0 */
42  m68k_set_vbr( monitors_vector_table );
43
44  /* The vector interrupt table for the 680x0 is in appendix B-2
45   *  of the M68000 Family Programmer's reference table
46   */
47  for ( index=2 ; index<=255 ; index++ )
48    M68Kvec[ index ] = monitors_vector_table[ 32 ];
49
50  M68Kvec[  2 ] = monitors_vector_table[  2 ];   /* bus error vector */
51  M68Kvec[  4 ] = monitors_vector_table[  4 ];   /* breakpoints vector */
52  M68Kvec[  9 ] = monitors_vector_table[  9 ];   /* trace vector */
53
54  /*
55   *  Set the VBR here if you do not want to use the monitor's vector table.
56   */
57
58  m68k_set_vbr( &M68Kvec );
59
60  rtems_cache_enable_instruction();
61  rtems_cache_enable_data();
62
63/*  led_putnum('e'); * for debugging purposes only */
64}
Note: See TracBrowser for help on using the repository browser.