Changes between Version 3 and Version 4 of TBR/BSP/Rtl22xx_t


Ignore:
Timestamp:
Nov 3, 2007, 10:52:45 AM (12 years ago)
Author:
Rayx
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • TBR/BSP/Rtl22xx_t

    v3 v4  
    22
    33
    4   This BSP is a thumb-enabled version of rtl22xx. Also, this bsp is an example of how development can development/change there own bsp from ARM mode to Thumb mode.
    5   Common code (IRQ, ISR) is already changed. BSP developer should take of there own assembly/inline-assembly codes which deal with CPSR/SPSR. Bellow is the things need to changed:
    6 1)      Changes the CPU_CFLAGS to CPU_CFLAGS +=  -mthumb in the BSP’s cfg file. -mthumb-interwork is not necessary because the low-level code has its own veneer that change between modes
    7 2)      start.S   This file must be in ARM mode, so add .arm/.code 32 in the beginning. Code will transfer to thumb mode when call boot_card. So use bx instead of bl when doing this. If want the code return back to start.S after boot_card. LR must update because bx will not update lr automatically
    8 3)      bsp_dir/irq/bsp_irq_asm.S, it is better to write this function in C instead of assembly. However, this function should be thumb mode now, and when function finished, MUST return back to ARM mode with bx
    9 4)      bspclean.c. change the b _start to bx reg. Because the startup code must be in arm mode. (also b _start will refuse to compile in thumb mode)
     4This BSP is a thumb-enabled version of rtl22xx. Also, this bsp is an example of how development can development/change there own bsp from ARM mode to Thumb mode.
    105
    11   BSP is compiled with gcc 4.2.1, binutils 2.18 with multi-lib for thumb enabled. 
     6Common code (IRQ, ISR) is already changed. BSP developer should take of there own assembly/inline-assembly codes which deal with CPSR/SPSR. Bellow is the things need to changed:
     7
     8(1)Changes the CPU_CFLAGS to CPU_CFLAGS +=  -mthumb in the BSP’s cfg file. -mthumb-interwork is not necessary because the low-level code has its own veneer that change between modes
     9
     10(2)start.S   This file must be in ARM mode, so add .arm/.code 32 in the beginning. Code will transfer to thumb mode when call boot_card. So use bx instead of bl when doing this. If want the code return back to start.S after boot_card. LR must update because bx will not update lr automatically
     11
     12(3)bsp_dir/irq/bsp_irq_asm.S, it is better to write this function in C instead of assembly. However, this function should be thumb mode now, and when function finished, MUST return back to ARM mode with bx
     13
     14(4)bspclean.c. change the b _start to bx reg. Because the startup code must be in arm mode. (also b _start will refuse to compile in thumb mode)
     15
     16BSP is compiled with gcc 4.2.1, binutils 2.18 with multi-lib for thumb enabled. 
    1217 
    13   Note: 2007-Nov, this BSP and Thumb are first introduced into rtems. rtl22xx hardware can not run full test suits to verified thumb support(only tests in samples is run). It will be appreciated that other ARM based bsp can also test the thumb support and report bug.
     18Note: 2007-Nov, this BSP and Thumb are first introduced into rtems. rtl22xx hardware can not run full test suits to verified thumb support(only tests in samples is run). It will be appreciated that other ARM based bsp can also test the thumb support and report bug.