source: rtems/c/src/lib/libbsp/arm/rtl22xx/startup/bspreset.c @ df40cc9

4.115
Last change on this file since df40cc9 was c499856, checked in by Chris Johns <chrisj@…>, on 03/20/14 at 21:10:47

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

  • Property mode set to 100644
File size: 818 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.org/license/LICENSE.
7 */
8
9#include <bsp.h>
10#include <lpc22xx.h>
11
12void bsp_reset(void)
13{
14#if ON_SKYEYE == 1
15  #define SKYEYE_MAGIC_ADDRESS (*(volatile unsigned int *)(0xb0000000))
16
17  SKYEYE_MAGIC_ADDRESS = 0xff;
18#else
19    rtems_interrupt_level level;
20
21    rtems_interrupt_disable(level);
22
23  #ifdef __thumb__
24    int tmp;
25    __asm__ volatile (" .code 16            \n" \
26                  "ldr %[tmp], =_start  \n" \
27                  "bx  %[tmp]           \n" \
28                  "nop                  \n" \
29                  : [tmp]"=&r" (tmp) );
30  #else
31    __asm__ volatile ("b _start");
32  #endif
33  while(1);
34#endif
35}
Note: See TracBrowser for help on using the repository browser.