5 | | |BSP_name = BSP name goes here |
6 | | |Manufacturer = Who made me? |
7 | | |image = |
8 | | |caption = optional image caption |
9 | | |Board_URL = http:/manufacturer.com/ExampleBoard |
10 | | |Architecture = Architecture |
11 | | |CPU_model = Model name |
| 5 | |BSP_name = RTL22xx |
| 6 | |Manufacturer = Philips NXP |
| 7 | |image = H2294-front.jpg |
| 8 | |caption = LPC2294 header |
| 9 | |Board_URL = http://www.olimex.com/dev/lpc-e2214.html |
| 10 | |Architecture = N/A |
| 11 | |CPU_model = Philip's LPC22xx ARM |
26 | | (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 ARM and Thumb modes |
27 | | |
28 | | (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 bx reg is used instead of bl bootcard. If the code want to return back to start.S after boot_card. LR must update because bx will not update LR automatically |
29 | | |
30 | | (3)bsp_dir/irq/bsp_irq_asm.S, it is better to write this function in C instead of assembly. However, if it is assembly, this function should be in thumb mode, and when function finished, MUST return back to ARM mode with bx |
31 | | |
32 | | (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) |
| 30 | #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 ARM and Thumb modes |
| 31 | #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 bx reg is used instead of bl bootcard. If the code want to return back to start.S after boot_card. LR must update because bx will not update LR automatically |
| 32 | #bsp_dir/irq/bsp_irq_asm.S, it is better to write this function in C instead of assembly. However, if it is assembly, this function should be in thumb mode, and when function finished, MUST return back to ARM mode with bx |
| 33 | #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) |