Changeset 5a364be3 in rtems for c/src/lib/libcpu/arm


Ignore:
Timestamp:
Nov 6, 2007, 10:54:21 PM (13 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.9, master
Children:
42fff32
Parents:
e15aa41e
Message:

2007-11-03 Ray Xu <rayx.cn@…>

*lpc22xx/irq/bsp_irq_asm.S: Add veneer for ARM<->Thumb
lpc22xx/irq/bsp_irq_init.c: add VIC address init

Location:
c/src/lib/libcpu/arm
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libcpu/arm/ChangeLog

    re15aa41e r5a364be3  
     12007-11-03      Ray Xu <rayx.cn@gmail.com>
     2        *lpc22xx/irq/bsp_irq_asm.S: Add veneer for ARM<->Thumb
     3        lpc22xx/irq/bsp_irq_init.c: add VIC address init
     4
    152007-10-05      Ray Xu <xr@trasin.net>
    26
  • c/src/lib/libcpu/arm/lpc22xx/irq/bsp_irq_asm.S

    re15aa41e r5a364be3  
    1818 * you do determine which interrupt happened and call its
    1919 * handler.
     20 * Called from ISR_Handler, It is better to write in C function
    2021 */
    2122        .globl ExecuteITHandler
    2223ExecuteITHandler :
     24#ifdef __thumb__
     25    .code 16
     26#endif
    2327
    2428/*
     
    2933 
    3034  ldr   r0, =0xFFFFF030  /* Read the vector number */
    31   ldr   r1, [r0]
    32 
    33   /* find the ISR's address based on the vector VICVectAddr0 */
    34   /*ldr   r0, =0xFFFFF100*/
    35   /*ldr r0, [r0, r1, LSL #2]*/  /* Read the address */
     35    ldr r0, [r0]
     36#ifdef __thumb__
     37    push {lr}
     38    ldr r2, =IRQ_return         /* prepare the return from handler  */
     39    mov lr, r2
     40#else
     41  stmdb   sp!,{lr}
     42  ldr     lr, =IRQ_return         /* prepare the return from handler  */
     43#endif
    3644
    3745
    38   stmdb   sp!,{lr}
    39   ldr     lr, =IRQ_return         /* prepare the return from handler */
     46    /*C code will be called*/
     47    mov pc, r0          /* EXECUTE INT HANDLER */
    4048
    41   mov     pc, r1                /* EXECUTE INT HANDLER */
     49    /*
     50     * C code may come back from Thumb if --thumb-interwork flag is False
     51     * Add some veneer to make sure that code back to ARM
     52     */
     53IRQ_return:
     54#ifdef __thumb__
     55    pop {r1}
     56    bx  r1
     57#else
     58    ldmia sp!,{r1}
     59    mov pc, r1
     60#endif
    4261
    43 IRQ_return:
    44   ldmia sp!,{lr}
    45 
    46   mov pc, lr
  • c/src/lib/libcpu/arm/lpc22xx/irq/bsp_irq_init.c

    re15aa41e r5a364be3  
    11/*
    2  * Motorola LPC22XX/LPC21xx Interrupt handler
    3  *  Modified by Ray 2006 <rayx.cn@gmail.com> to support LPC ARM     
     2 *  NXP/Philips LPC22XX/LPC21xx Interrupt handler
     3 *  Ray 2007 <rayx.cn@gmail.com> to support LPC ARM     
    44 *  The license and distribution terms for this file may be
    55 *  found in the file LICENSE in this distribution or at
     
    6767  VICProtection = 0;
    6868  VICIntSelect = 0;
    69  
     69  VICVectAddr = 0;
    7070}
    7171
Note: See TracChangeset for help on using the changeset viewer.