source: rtems/c/src/lib/libbsp/arm/nds/startup/bspstart.c @ 7b46d7a

4.115
Last change on this file since 7b46d7a was 7b46d7a, checked in by Sebastian Huber <sebastian.huber@…>, on Aug 15, 2011 at 8:12:49 AM

2011-08-15 Julien Delange <julien.delange@…>

  • irq/irq.c: Removed printk() before the interrupt initialization because it somehow destroys the interrupt context.
  • make/custom/nds.cfg: Enable Thumb interwork.
  • startup/bspstart.c: Set default exception handler.
  • Property mode set to 100644
File size: 1.5 KB
Line 
1/*
2 * RTEMS for Nintendo DS platform initialization.
3 *
4 * Copyright (c) 2008 by Matthieu Bucchianeri <mbucchia@gmail.com>
5 *
6 * The license and distribution terms for this file may be
7 * found in the file LICENSE in this distribution or at
8 *
9 * http://www.rtems.com/license/LICENSE
10 *
11 * $Id$
12 */
13
14#include <bsp.h>
15#include <bsp/bootcard.h>
16#include <bsp/linker-symbols.h>
17#include <nds.h>
18
19extern void defaultExceptionHandler ();
20extern void BSP_rtems_irq_mngt_init (void);
21/*
22 * start the platform.
23 */
24
25void bsp_start (void)
26{
27  /* initialize irq management */
28  BSP_rtems_irq_mngt_init ();
29
30  /* setup console mode for lower screen */
31  irqEnable (IRQ_VBLANK);
32  videoSetMode (0);
33  videoSetModeSub (MODE_0_2D | DISPLAY_BG0_ACTIVE);
34  vramSetBankC (VRAM_C_SUB_BG);
35
36  SUB_BG0_CR = BG_MAP_BASE (31);
37  BG_PALETTE_SUB[255] = RGB15 (31, 31, 31);
38  consoleInitDefault ((u16 *) SCREEN_BASE_BLOCK_SUB (31),
39                      (u16 *) CHAR_BASE_BLOCK_SUB (0), 16);
40
41  /* print status message */
42  printk ("[+] kernel console started\n");
43
44  /* set the cpu mode to system user */
45  arm_cpu_mode = 0x1f;
46
47  /* configure clock period */
48  Configuration.microseconds_per_tick = 10000;  /* us */
49
50  defaultExceptionHandler ();
51}
52
53/*
54 * reset bss area.
55 */
56
57void
58bss_reset (void)
59{
60
61  memset (bsp_section_bss_begin, 0, (size_t) bsp_section_bss_size);
62}
63
64/*
65 * A few symbols needed by libnds but not used.
66 */
67
68#include "../include/sys/iosupport.h"
69const devoptab_t *devoptab_list[STD_MAX];
70void *punixTime;
Note: See TracBrowser for help on using the repository browser.