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

4.115
Last change on this file since d390156 was d390156, checked in by Ralf Corsepius <ralf.corsepius@…>, on 02/11/11 at 11:48:22

2011-02-11 Ralf Corsépius <ralf.corsepius@…>

  • startup/bspreset.c: Use "asm" instead of "asm" for improved c99-compliance.
  • Property mode set to 100644
File size: 830 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
14void bsp_reset(void)
15{
16#if ON_SKYEYE == 1
17  #define SKYEYE_MAGIC_ADDRESS (*(volatile unsigned int *)(0xb0000000))
18
19  SKYEYE_MAGIC_ADDRESS = 0xff;
20#else
21    rtems_interrupt_level level;
22
23    rtems_interrupt_disable(level);
24
25  #ifdef __thumb__
26    int tmp;
27    __asm__ volatile (" .code 16            \n" \
28                  "ldr %[tmp], =_start  \n" \
29                  "bx  %[tmp]           \n" \
30                  "nop                  \n" \
31                  : [tmp]"=&r" (tmp) );
32  #else
33    __asm__ volatile ("b _start");
34  #endif
35  while(1);
36#endif
37}
Note: See TracBrowser for help on using the repository browser.