4.104.115
Last change
on this file since 4c4974e was
4c4974e,
checked in by Sebastian Huber <sebastian.huber@…>, on 05/20/10 at 13:15:35
|
2010-05-20 Sebastian Huber <sebastian.huber@…>
- make/custom/lpc32xx.inc, make/custom/lpc32xx_mzx_boot_int.cfg,
startup/linkcmds.lpc32xx_mzx_boot_int: New files.
- Makefile.am, configure.ac, preinstall.am, include/bsp.h,
include/bspopts.h.in, include/lpc32xx.h, irq/irq.c,
make/custom/lpc32xx_phycore.cfg, startup/bspstart.c,
startup/bspstarthooks.c: Changes throughout.
|
-
Property mode set to
100644
|
File size:
1.1 KB
|
Line | |
---|
1 | /** |
---|
2 | * @file |
---|
3 | * |
---|
4 | * @ingroup lpc32xx |
---|
5 | * |
---|
6 | * @brief Startup code. |
---|
7 | */ |
---|
8 | |
---|
9 | /* |
---|
10 | * Copyright (c) 2009, 2010 |
---|
11 | * embedded brains GmbH |
---|
12 | * Obere Lagerstr. 30 |
---|
13 | * D-82178 Puchheim |
---|
14 | * Germany |
---|
15 | * <rtems@embedded-brains.de> |
---|
16 | * |
---|
17 | * The license and distribution terms for this file may be |
---|
18 | * found in the file LICENSE in this distribution or at |
---|
19 | * http://www.rtems.com/license/LICENSE. |
---|
20 | */ |
---|
21 | |
---|
22 | #include <bsp.h> |
---|
23 | #include <bsp/bootcard.h> |
---|
24 | #include <bsp/irq-generic.h> |
---|
25 | #include <bsp/irq.h> |
---|
26 | #include <bsp/linker-symbols.h> |
---|
27 | #include <bsp/stackalloc.h> |
---|
28 | #include <bsp/lpc32xx.h> |
---|
29 | |
---|
30 | static void lpc32xx_timer_initialize(void) |
---|
31 | { |
---|
32 | volatile lpc_timer *timer = LPC32XX_STANDARD_TIMER; |
---|
33 | |
---|
34 | LPC32XX_TIMCLK_CTRL1 = (1U << 2) | (1U << 3); |
---|
35 | |
---|
36 | timer->tcr = LPC_TIMER_TCR_RST; |
---|
37 | timer->ctcr = 0x0; |
---|
38 | timer->pr = 0x0; |
---|
39 | timer->ir = 0xff; |
---|
40 | timer->mcr = 0x0; |
---|
41 | timer->ccr = 0x0; |
---|
42 | timer->tcr = LPC_TIMER_TCR_EN; |
---|
43 | } |
---|
44 | |
---|
45 | void bsp_start(void) |
---|
46 | { |
---|
47 | if (bsp_interrupt_initialize() != RTEMS_SUCCESSFUL) { |
---|
48 | _CPU_Fatal_halt(0xe); |
---|
49 | } |
---|
50 | |
---|
51 | bsp_stack_initialize( |
---|
52 | bsp_section_stack_begin, |
---|
53 | (uintptr_t) bsp_section_stack_size |
---|
54 | ); |
---|
55 | |
---|
56 | lpc32xx_timer_initialize(); |
---|
57 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.