summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/arm/rtl22xx
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2007-05-01 19:15:38 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2007-05-01 19:15:38 +0000
commite890774a799e1ea99221330f54d05cd7e8158629 (patch)
tree41737b358fe6702ef1d69b4027df10b6cd9ae196 /c/src/lib/libbsp/arm/rtl22xx
parentRebase against gcc-core-4.2.0-20070430 (gcc-4.2.0 rc2) (diff)
downloadrtems-e890774a799e1ea99221330f54d05cd7e8158629.tar.bz2
2007-05-01 Ray Xu <xr@trasin.net>
* README, times, console/lpc22xx_uart.h, console/uart.c, include/bsp.h, start/start.S, startup/bspstart.c, startup/exit.c, startup/linkcmds: Update BSP to address changes between 4.7 and CVS head as well as to address comments from Ralf and Joel.
Diffstat (limited to 'c/src/lib/libbsp/arm/rtl22xx')
-rw-r--r--c/src/lib/libbsp/arm/rtl22xx/ChangeLog7
-rw-r--r--c/src/lib/libbsp/arm/rtl22xx/README4
-rw-r--r--c/src/lib/libbsp/arm/rtl22xx/console/lpc22xx_uart.h2
-rw-r--r--c/src/lib/libbsp/arm/rtl22xx/console/uart.c8
-rw-r--r--c/src/lib/libbsp/arm/rtl22xx/include/bsp.h4
-rw-r--r--c/src/lib/libbsp/arm/rtl22xx/start/start.S10
-rw-r--r--c/src/lib/libbsp/arm/rtl22xx/startup/bspstart.c13
-rw-r--r--c/src/lib/libbsp/arm/rtl22xx/startup/exit.c9
-rw-r--r--c/src/lib/libbsp/arm/rtl22xx/startup/linkcmds8
-rw-r--r--c/src/lib/libbsp/arm/rtl22xx/times5
10 files changed, 37 insertions, 33 deletions
diff --git a/c/src/lib/libbsp/arm/rtl22xx/ChangeLog b/c/src/lib/libbsp/arm/rtl22xx/ChangeLog
index ae4e64020f..216ce14fec 100644
--- a/c/src/lib/libbsp/arm/rtl22xx/ChangeLog
+++ b/c/src/lib/libbsp/arm/rtl22xx/ChangeLog
@@ -1,3 +1,10 @@
+2007-05-01 Ray Xu <xr@trasin.net>
+
+ * README, times, console/lpc22xx_uart.h, console/uart.c, include/bsp.h,
+ start/start.S, startup/bspstart.c, startup/exit.c, startup/linkcmds:
+ Update BSP to address changes between 4.7 and CVS head as well as to
+ address comments from Ralf and Joel.
+
2007-04-26 Ralf Corsépius <ralf.corsepius@rtems.org>
* Makefile.am: Remove reference to ../../shared/main.c.
diff --git a/c/src/lib/libbsp/arm/rtl22xx/README b/c/src/lib/libbsp/arm/rtl22xx/README
index f09312df3d..263ea514af 100644
--- a/c/src/lib/libbsp/arm/rtl22xx/README
+++ b/c/src/lib/libbsp/arm/rtl22xx/README
@@ -1,6 +1,6 @@
RTEMS bsp for Philips's ARM processor
-This BSP is design for Philips's LPC2210/LPC2212/LPC2214/LPC2290/LPC2294 (LPC22xx) serial ARM processor.
+This BSP is design for Philips's LPC2210/LPC2212/LPC2214/LPC2290/LPC2294 (LPC22xx) serial ARM processor. Some LPC21xx ARM can also use this.
Philphs's LPC22xx ARM processor got an ARM7TDMI-S core, and can run at 60MHz. It has an external memory bus, and peripherals like UART, I2C, SPI, ADC and etc. Some of them got on chip flash (256k) and CAN.
-The board used to develop the board is compatible with LPC-E2214/LPC-E2294 boards from http://www.olimex.com. The board got a 256K SDRAM and two serial ports.
+The board used to develop the board is compatible with LPC-E2214/LPC-E2294 boards from http://www.olimex.com. The board got a 512K SRAM(256K used to store the .text for debug perpose) and two serial ports.
The license and distribution terms for this file may be found in the file LICENSE in this distribution or at http://www.rtems.com/license/LICENSE
diff --git a/c/src/lib/libbsp/arm/rtl22xx/console/lpc22xx_uart.h b/c/src/lib/libbsp/arm/rtl22xx/console/lpc22xx_uart.h
index 63de32bfd1..660e50d0eb 100644
--- a/c/src/lib/libbsp/arm/rtl22xx/console/lpc22xx_uart.h
+++ b/c/src/lib/libbsp/arm/rtl22xx/console/lpc22xx_uart.h
@@ -1,4 +1,4 @@
-/*Define for LPC22xx*/
+/*Define for LPC22xx/LPC21xx */
#ifndef UART_H
#define UART_H
diff --git a/c/src/lib/libbsp/arm/rtl22xx/console/uart.c b/c/src/lib/libbsp/arm/rtl22xx/console/uart.c
index 59e65c8c29..aad1383867 100644
--- a/c/src/lib/libbsp/arm/rtl22xx/console/uart.c
+++ b/c/src/lib/libbsp/arm/rtl22xx/console/uart.c
@@ -7,7 +7,7 @@
* If you want the driver to be interrupt driven, you
* need to write the ISR, and in the ISR insert the
* chars into termios's queue.
- * Copyright (c) By ray
+ * Copyright (c) By ray <rayx.cn@gmail.com>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
@@ -168,7 +168,8 @@ static int uart_read(int minor)
return -1;
}
} else {
- printk("Unknown console minor number: %d\n", minor);
+ debug_printk("Unknown console minor number");
+ printi(minor);
return -1;
}
@@ -197,7 +198,8 @@ static int uart_write(int minor, const char *buf, int len)
U0THR = (char) buf[i];
}
}else {
- printk("Unknown console minor number: %d\n", minor);
+ debug_printk("Unknown console minor number");
+ printi(minor);
return -1;
}
diff --git a/c/src/lib/libbsp/arm/rtl22xx/include/bsp.h b/c/src/lib/libbsp/arm/rtl22xx/include/bsp.h
index 0d85742e73..d1882b0897 100644
--- a/c/src/lib/libbsp/arm/rtl22xx/include/bsp.h
+++ b/c/src/lib/libbsp/arm/rtl22xx/include/bsp.h
@@ -1,7 +1,7 @@
/*
- * Philips LPC22XX BSP header file
+ * Philips LPC22XX/LPC21xx BSP header file
*
- * by Ray,Xu
+ * by Ray,Xu <Rayx.cn@gmail.com>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
diff --git a/c/src/lib/libbsp/arm/rtl22xx/start/start.S b/c/src/lib/libbsp/arm/rtl22xx/start/start.S
index d93305ea77..d917762a76 100644
--- a/c/src/lib/libbsp/arm/rtl22xx/start/start.S
+++ b/c/src/lib/libbsp/arm/rtl22xx/start/start.S
@@ -1,12 +1,8 @@
/*
- * Philips LPC22XX Startup code
- *
- * Copyright (c) 2005 Ray xu
- *
- * Copyright (c) 2002 by Jay Monkman <jtm@smoothsmoothie.com>
- *
- * Copyright (c) 2002 by Charlie Steader <charlies@poliac.com>
+ * Philips LPC22XX/LPC21xx Startup code
*
+ * Copyright (c) 2007 Ray Xu<rayx.cn@gmail.com>
+ * Change from CSB337's code by Jay Monkman <jtm@lopingdog.com>
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
*
diff --git a/c/src/lib/libbsp/arm/rtl22xx/startup/bspstart.c b/c/src/lib/libbsp/arm/rtl22xx/startup/bspstart.c
index 7881d227c4..2ae12acaf9 100644
--- a/c/src/lib/libbsp/arm/rtl22xx/startup/bspstart.c
+++ b/c/src/lib/libbsp/arm/rtl22xx/startup/bspstart.c
@@ -1,7 +1,7 @@
/*
- * LPC22XX Startup code
+ * LPC22XX/LPC21xx Startup code
*
- * Copyright (c) 2005 by Ray X <rayx.cn@gmail.com>
+ * Copyright (c) 2007 by Ray Xu <rayx.cn@gmail.com>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
@@ -92,7 +92,8 @@ void bsp_pretasking_hook(void)
heap_start = free_mem_start;
/* heap_size = (free_mem_end - heap_start - MEM_NOCACHE_SIZE); */
- /*the board seems to have only 512K memory, we use 256K as heap*/
+ /*the board seems to have only 512K memory, we use 256K as heap, 256K to
+ store the .text*/
heap_size = 0x40000;
bsp_libc_init((void *)heap_start, heap_size, 0);
@@ -133,7 +134,6 @@ void bsp_pretasking_hook(void)
/**************************************************************************/
void bsp_start_default( void )
{
- uint32_t i;
PINSEL2 =0x0f814914;
BCFG0 = 0x1000ffef;
BCFG1 = 0x1000ffef;
@@ -171,6 +171,7 @@ void bsp_start_default( void )
PLLFEED = 0x55;
/* memory configure */
+ /* it is not needed in my formatter board */
//MAMCR = 0;
// MAMTIM = 3;
//MAMCR = 2;
@@ -201,6 +202,7 @@ void bsp_start_default( void )
#if 0
debug_printk(" bsp_start_defalt");
+ printi((int)&bsp_start_defalt);
debug_printk(" _bss_free_start");
printi((int)&_bss_free_start);
@@ -216,9 +218,6 @@ void bsp_start_default( void )
debug_printk(" free_mem_end");
printi((int)free_mem_end);
-
-
- printi(free_mem_end);
#endif
/*
diff --git a/c/src/lib/libbsp/arm/rtl22xx/startup/exit.c b/c/src/lib/libbsp/arm/rtl22xx/startup/exit.c
index 4e357dcf17..8090146483 100644
--- a/c/src/lib/libbsp/arm/rtl22xx/startup/exit.c
+++ b/c/src/lib/libbsp/arm/rtl22xx/startup/exit.c
@@ -1,7 +1,6 @@
/*
- * Cirrus LPC22XX BSP Shutdown code
- *
- * Copyright (c) 2002 by Jay Monkman <jtm@smoothsmoothie.com>
+ * Philips LPC22XX/LPC21xx BSP Shutdown code
+ * Copyright (c) 2007 by Ray Xu <rayx.cn@gmail.com>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
@@ -32,8 +31,8 @@ void bsp_cleanup(void)
* use polled output/input. This is exactly what printk
* does.
*/
- printk("\n");
- printk(line);
+ debug_printk("\n");
+ debug_printk(line);
while (uart_poll_read(0) < 0) continue;
/* rtemsReboot(); */
diff --git a/c/src/lib/libbsp/arm/rtl22xx/startup/linkcmds b/c/src/lib/libbsp/arm/rtl22xx/startup/linkcmds
index a9445ba7e2..d94e18b71c 100644
--- a/c/src/lib/libbsp/arm/rtl22xx/startup/linkcmds
+++ b/c/src/lib/libbsp/arm/rtl22xx/startup/linkcmds
@@ -3,6 +3,9 @@
* By Ray,Xu
* Rayx.cn@gmail.com
*
+ * LPC22xx ARM do not have a MMU, the formatter got 512kb SRAM
+ * I set the code entry to the beging of SRAM for debugging perpurse
+ *
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
*
@@ -10,8 +13,7 @@
*
*
* $Id$
- * LPC22xx ARM do not have a
-*/
+ */
OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm",
"elf32-littlearm")
@@ -36,7 +38,7 @@ _sdram_size = DEFINED(_sdram_size) ? _sdram_size : 512K;
_irq_stack_size = DEFINED(_irq_stack_size) ? _irq_stack_size : 0x100;
_fiq_stack_size = DEFINED(_fiq_stack_size) ? _fiq_stack_size : 0x50;
_abt_stack_size = DEFINED(_abt_stack_size) ? _abt_stack_size : 0x50;
-_svc_stack_size = DEFINED(_svc_stack_size) ? _svc_stack_size : 0x2000;
+_svc_stack_size = DEFINED(_svc_stack_size) ? _svc_stack_size : 0x500;
diff --git a/c/src/lib/libbsp/arm/rtl22xx/times b/c/src/lib/libbsp/arm/rtl22xx/times
index d8ded9d968..18a7ce338c 100644
--- a/c/src/lib/libbsp/arm/rtl22xx/times
+++ b/c/src/lib/libbsp/arm/rtl22xx/times
@@ -5,9 +5,9 @@
#
Board: rtl22xx
-CPU: Philips 2210
+CPU: Philips LPC2210
Clock Speed: 60MHz
-Memory Configuration: 512K SRAM, 16 bit bus, no SDRAM, nor cache
+Memory Configuration: 512K SRAM(256K used to store the .text), 16 bit bus, no SDRAM, nor cache
Cache: Data and Instruction cache enabled
Wait States:
@@ -21,4 +21,3 @@ rtems_semaphore_delete 380
rtems_semaphore_obtain: available 136
rtems_semaphore_obtain: not available -- NO_WAIT 136
rtems_semaphore_release: no waiting tasks 307
-