4.104.115
Last change
on this file since 72798ee was
72798ee,
checked in by Joel Sherrill <joel.sherrill@…>, on 09/22/08 at 21:53:54
|
2008-09-22 Joel Sherrill <joel.sherrill@…>
- startup/bspreset.c: New file.
|
-
Property mode set to
100644
|
File size:
685 bytes
|
Line | |
---|
1 | /* |
---|
2 | * Copyright (c) 2007 by Ray Xu <rayx.cn@gmail.com> |
---|
3 | * |
---|
4 | * The license and distribution terms for this file may be |
---|
5 | * found in the file LICENSE in this distribution or at |
---|
6 | * http://www.rtems.com/license/LICENSE. |
---|
7 | * |
---|
8 | * $Id$ |
---|
9 | */ |
---|
10 | |
---|
11 | #include <bsp.h> |
---|
12 | #include <lpc22xx.h> |
---|
13 | |
---|
14 | void bsp_reset(void) |
---|
15 | { |
---|
16 | rtems_interrupt_level level; |
---|
17 | |
---|
18 | rtems_interrupt_disable(level); |
---|
19 | |
---|
20 | #ifdef __thumb__ |
---|
21 | int tmp; |
---|
22 | asm volatile (" .code 16 \n" \ |
---|
23 | "ldr %[tmp], =_start \n" \ |
---|
24 | "bx %[tmp] \n" \ |
---|
25 | "nop \n" \ |
---|
26 | : [tmp]"=&r" (tmp) ); |
---|
27 | #else |
---|
28 | asm volatile ("b _start"); |
---|
29 | #endif |
---|
30 | |
---|
31 | while(1); |
---|
32 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.