blob: b5e37d4c57cfda4b030b77a17e33cc5bb66cd3d1 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
/**
* @file bspstart.c
*
* This file contains the GBA BSP startup package.
* It includes application, board, and monitor specific initialization and
* configuration. The generic CPU dependent initialization has been
* performed before this routine is invoked.
*/
/*
* RTEMS GBA BSP
*
* Copyright (c) 2004 Markku Puro <markku.puro@kopteri.net>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.org/license/LICENSE.
*/
#include <stdio.h>
#include <bsp.h>
#include <bsp/irq-generic.h>
#include <rtems/bspIo.h>
#include <gba.h>
#include <conio.h>
/** Chip registers */
volatile unsigned int *Regs = (unsigned int *)GBA_IO_REGS_ADDR;
/**
* @brief BSP Start
*
* Called before main is invoked.
*
* @param None
* @return None
*/
static void bsp_start_default( void )
{
/* Init conio */
gba_textmode(CO60);
/* Init rtems exceptions management
* !!!!!GBA -- Can't use exception vectors in GBA because they are
* already in GBA ROM BIOS
*/
/* rtems_exception_init_mngt(); */
/* Init rtems interrupt management */
bsp_interrupt_initialize();
}
/**
* @brief weak alias for bsp_start_default
*
* By making this a weak alias for bsp_start_default, a brave soul
* can override the actual bsp_start routine used.
*/
void bsp_start (void) __attribute__ ((weak, alias("bsp_start_default")));
|