From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18735 invoked by alias); 9 Jan 2009 09:29:18 -0000 Received: (qmail 18723 invoked by uid 22791); 9 Jan 2009 09:29:14 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_73 X-Spam-Check-By: sourceware.org Received: from mail-ew0-f20.google.com (HELO mail-ew0-f20.google.com) (209.85.219.20) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 09 Jan 2009 09:29:02 +0000 Received: by ewy13 with SMTP id 13so12784824ewy.6 for ; Fri, 09 Jan 2009 01:28:58 -0800 (PST) Received: by 10.210.66.13 with SMTP id o13mr6516550eba.30.1231493338564; Fri, 09 Jan 2009 01:28:58 -0800 (PST) Received: from smtp.gmail.com ([82.209.212.146]) by mx.google.com with ESMTPS id 34sm77065159nfu.42.2009.01.09.01.28.11 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 09 Jan 2009 01:28:57 -0800 (PST) Date: Fri, 09 Jan 2009 09:29:00 -0000 To: eCos patches list Subject: minor cleanups and fixes for olpcx2294 HALs Message-ID: <20090109092637.GA12378@sg-ubuntu.local> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="6sX45UoQRIJXqkqR" Content-Disposition: inline User-Agent: Mutt/1.5.13 (2006-08-11) From: Sergei Gavrikov Mailing-List: contact ecos-patches-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-patches-owner@ecos.sourceware.org X-SW-Source: 2009-01/txt/msg00005.txt.bz2 --6sX45UoQRIJXqkqR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 567 Hi! Is it possible to apply the patches still? Well, tweaks are very minor, but... A few TABs did break some editors, odd *_impure_ptr stubs removed, one comment fixed. About a baud rate on diagnostic/debug channels. I found that with the latest arm-eabi-gdb 6.8 I can operate with RedBoot+GDB on 230K without any issues! I got a download rate in RAM with the GDB is equal 20K with those settings. By the way, I got the download baud rate in RAM about 17K when I use parallel wiggler and OpenOCD. So, there are those 230400 values in HAL CDLs. Thank you, Sergei --6sX45UoQRIJXqkqR Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="olpcx2294.diff" Content-length: 16620 Index: olpce2294/current/ChangeLog =================================================================== RCS file: /cvs/ecos/ecos/packages/hal/arm/lpc2xxx/olpce2294/current/ChangeLog,v retrieving revision 1.3 diff -U5 -r1.3 ChangeLog --- olpce2294/current/ChangeLog 8 Dec 2008 20:19:22 -0000 1.3 +++ olpce2294/current/ChangeLog 9 Jan 2009 09:01:09 -0000 @@ -1,5 +1,11 @@ +2009-01-09 Sergei Gavrikov + * cdl/hal_arm_lpc2xxx_olpce2294.cdl: Expanded a list the legal baud + rates for both diagnostic and debug channels (upon 230400 bps). + * include/hal_platform_setup.h, include/plf_io.h: Extra tabs expanded. + * include/hal_platform_setup.h: Fixed a comment about JTAG pinouts. + 2008-12-03 Sergei Gavrikov * misc/redboot_*.ecm: Rebuilt since target uses flash_olpcx2294_v2 driver. Index: olpce2294/current/cdl/hal_arm_lpc2xxx_olpce2294.cdl =================================================================== RCS file: /cvs/ecos/ecos/packages/hal/arm/lpc2xxx/olpce2294/current/cdl/hal_arm_lpc2xxx_olpce2294.cdl,v retrieving revision 1.1 diff -U5 -r1.1 hal_arm_lpc2xxx_olpce2294.cdl --- olpce2294/current/cdl/hal_arm_lpc2xxx_olpce2294.cdl 23 Nov 2008 13:01:14 -0000 1.1 +++ olpce2294/current/cdl/hal_arm_lpc2xxx_olpce2294.cdl 9 Jan 2009 09:01:13 -0000 @@ -117,21 +117,21 @@ } cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_BAUD { display "Diagnostic serial port baud rate" flavor data - legal_values 9600 19200 38400 57600 115200 + legal_values 9600 19200 38400 57600 115200 230400 default_value 38400 description " This option selects the baud rate used for the diagnostic port." } cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_BAUD { display "GDB serial port baud rate" flavor data - legal_values 9600 19200 38400 57600 115200 + legal_values 9600 19200 38400 57600 115200 230400 default_value 38400 description " This option controls the baud rate used for the GDB connection." } Index: olpce2294/current/include/hal_platform_setup.h =================================================================== RCS file: /cvs/ecos/ecos/packages/hal/arm/lpc2xxx/olpce2294/current/include/hal_platform_setup.h,v retrieving revision 1.1 diff -U5 -r1.1 hal_platform_setup.h --- olpce2294/current/include/hal_platform_setup.h 23 Nov 2008 13:01:14 -0000 1.1 +++ olpce2294/current/include/hal_platform_setup.h 9 Jan 2009 09:01:13 -0000 @@ -147,12 +147,12 @@ str r1,[r0] // BANK1: 1M RAM // K6R4016V1D (512Kx16 x 2, 10nS) ldr r0,=CYGARC_HAL_LPC2XXX_REG_BCFG1 - // Warning: changed these timings, you can fall dramatically the eCos - // kernel performance. Check it then using the eCos 'tm_basic' test. + // Warning: changed these timings, you can fall dramatically the eCos + // kernel performance. Check it then using the eCos 'tm_basic' test. ldr r1,= (0x0 << 0) /* IDCY=0, idle cycles */\ | (0x0 << 5) /* WST1=0, read timing */\ | (0x1 << 10) /* RBLE=1 */\ | (0x0 << 11) /* WST2=0, write timing */\ | (0x2 << 28) /* MW=2, 32-bits */ @@ -184,11 +184,11 @@ // Configure P0.30:16 as PIO, but EINT0 ('B2' button) ldr r1,= (0x1 << 0) /* P0.16 as EINT0 */ str r1,[r0,#CYGARC_HAL_LPC2XXX_REG_PINSEL1] // GPIO P1.25:16, P3.24 are used as PIO - ldr r1,= (0x1 << 2) /* P1.36:26 Debug port */\ + ldr r1,= (0x1 << 2) /* P1.31:26 Debug port */\ | (0x2 << 4) /* D31:0,CS0,OE,BLS0-3 */\ | (0x1 << 8) /* WE enabled */\ | (0x1 << 11) /* CS1 enabled */\ | (0x1 << 14) /* CS2 enabled */\ | (0x1 << 23) /* A0 enabled */\ Index: olpce2294/current/include/plf_io.h =================================================================== RCS file: /cvs/ecos/ecos/packages/hal/arm/lpc2xxx/olpce2294/current/include/plf_io.h,v retrieving revision 1.2 diff -U5 -r1.2 plf_io.h --- olpce2294/current/include/plf_io.h 30 Nov 2008 09:40:59 -0000 1.2 +++ olpce2294/current/include/plf_io.h 9 Jan 2009 09:01:13 -0000 @@ -53,11 +53,11 @@ // On-chip device base addresses #ifndef __ASSEMBLER__ extern void hal_plf_hardware_init(void); #define HAL_PLF_HARDWARE_INIT() \ - hal_plf_hardware_init() + hal_plf_hardware_init() #endif // __ASSEMBLER__ //----------------------------------------------------------------------------- // end of plf_io.h Index: olpch2294/current/ChangeLog =================================================================== RCS file: /cvs/ecos/ecos/packages/hal/arm/lpc2xxx/olpch2294/current/ChangeLog,v retrieving revision 1.2 diff -U5 -r1.2 ChangeLog --- olpch2294/current/ChangeLog 8 Dec 2008 20:19:49 -0000 1.2 +++ olpch2294/current/ChangeLog 9 Jan 2009 09:01:13 -0000 @@ -1,5 +1,12 @@ +2009-01-09 Sergei Gavrikov + * cdl/hal_arm_lpc2xxx_olpch2294.cdl: Expanded a list the legal baud + rates for both diagnostic and debug channels (upon 230400 bps). + * include/hal_platform_setup.h: Fixed a comment about JTAG pinouts. + * src/olpch2294_misc.c: 1) hal_plf_hardware_init(): masked interrupts + on UART1; 2) Removed odd _impure_ptr stub. + 2008-12-03 Sergei Gavrikov * misc/redboot_*.ecm: Rebuilt since target uses flash_olpcx2294_v2 driver. Index: olpch2294/current/cdl/hal_arm_lpc2xxx_olpch2294.cdl =================================================================== RCS file: /cvs/ecos/ecos/packages/hal/arm/lpc2xxx/olpch2294/current/cdl/hal_arm_lpc2xxx_olpch2294.cdl,v retrieving revision 1.1 diff -U5 -r1.1 hal_arm_lpc2xxx_olpch2294.cdl --- olpch2294/current/cdl/hal_arm_lpc2xxx_olpch2294.cdl 23 Nov 2008 13:03:29 -0000 1.1 +++ olpch2294/current/cdl/hal_arm_lpc2xxx_olpch2294.cdl 9 Jan 2009 09:01:13 -0000 @@ -110,21 +110,21 @@ } cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_BAUD { display "Diagnostic serial port baud rate" flavor data - legal_values 9600 19200 38400 57600 115200 + legal_values 9600 19200 38400 57600 115200 230400 default_value 38400 description " This option selects the baud rate used for the diagnostic port." } cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_BAUD { display "GDB serial port baud rate" flavor data - legal_values 9600 19200 38400 57600 115200 + legal_values 9600 19200 38400 57600 115200 230400 default_value 38400 description " This option controls the baud rate used for the GDB connection." } Index: olpch2294/current/include/hal_platform_setup.h =================================================================== RCS file: /cvs/ecos/ecos/packages/hal/arm/lpc2xxx/olpch2294/current/include/hal_platform_setup.h,v retrieving revision 1.1 diff -U5 -r1.1 hal_platform_setup.h --- olpch2294/current/include/hal_platform_setup.h 23 Nov 2008 13:03:29 -0000 1.1 +++ olpch2294/current/include/hal_platform_setup.h 9 Jan 2009 09:01:13 -0000 @@ -172,11 +172,11 @@ // Configure P0.30:16 as PIO ldr r1,=0 str r1,[r0,#CYGARC_HAL_LPC2XXX_REG_PINSEL1] // GPIO P1.25:16, P3.0, P3.25:24 are used as PIO - ldr r1,= (0x1 << 2) /* P1.36:26 Debug port */\ + ldr r1,= (0x1 << 2) /* P1.31:26 Debug port */\ | (0x2 << 4) /* D31:0,CS0,OE,BLS0-3 */\ | (0x1 << 8) /* WE enabled */\ | (0x1 << 11) /* CS1 enabled */\ | (0x1 << 24) /* A1 enabled */\ | (0x7 << 25) /* A23:2 enabled */ Index: olpch2294/current/src/olpch2294_misc.c =================================================================== RCS file: /cvs/ecos/ecos/packages/hal/arm/lpc2xxx/olpch2294/current/src/olpch2294_misc.c,v retrieving revision 1.1 diff -U5 -r1.1 olpch2294_misc.c --- olpch2294/current/src/olpch2294_misc.c 23 Nov 2008 13:03:29 -0000 1.1 +++ olpch2294/current/src/olpch2294_misc.c 9 Jan 2009 09:01:13 -0000 @@ -48,19 +48,15 @@ // //========================================================================*/ #include #include // IO macros +#include #include // base types #include -// Newlib provides support for building the run-time elements of C++ -// within the toolchain. Modern newlib stuff looks for a _impure_ptr -// entry. -void *_impure_ptr; - extern void cyg_hal_plf_serial_init (void); // There is alone diagnostic LED on the board. static __inline__ void _led (bool state) @@ -101,11 +97,13 @@ // hal_plf_hardware_init -- // void hal_plf_hardware_init (void) { - // Currently, it does nothing + // Platform HAL does not use the second LPC2XXX UART. To be sure that we + // won't meet any spurios interrupts on UART1 anymore, mask that vector. + HAL_INTERRUPT_MASK(CYGNUM_HAL_INTERRUPT_UART1); } #endif // HAL_PLF_HARDWARE_INIT // indent: --indent-level4 -br -nut; vim: expandtab tabstop=4 shiftwidth=4 //-------------------------------------------------------------------------- Index: olpcl2294/current/ChangeLog =================================================================== RCS file: /cvs/ecos/ecos/packages/hal/arm/lpc2xxx/olpcl2294/current/ChangeLog,v retrieving revision 1.2 diff -U5 -r1.2 ChangeLog --- olpcl2294/current/ChangeLog 8 Dec 2008 20:20:09 -0000 1.2 +++ olpcl2294/current/ChangeLog 9 Jan 2009 09:01:13 -0000 @@ -1,5 +1,12 @@ +2009-01-09 Sergei Gavrikov + * cdl/hal_arm_lpc2xxx_olpcl2294.cdl: Expanded a list the legal baud + rates for both diagnostic and debug channels (upon 230400b bps). + * include/hal_platform_setup.h, include/plf_io.h: Extra tabs expanded. + * include/hal_platform_setup.h: Fixed a comment about JTAG pinouts. + * src/olpcl2294_misc.c: Removed odd _impure_ptr stub. + 2008-12-03 Sergei Gavrikov * misc/redboot_*.ecm: Rebuilt since target uses flash_olpcx2294_v2 driver. Index: olpcl2294/current/cdl/hal_arm_lpc2xxx_olpcl2294.cdl =================================================================== RCS file: /cvs/ecos/ecos/packages/hal/arm/lpc2xxx/olpcl2294/current/cdl/hal_arm_lpc2xxx_olpcl2294.cdl,v retrieving revision 1.1 diff -U5 -r1.1 hal_arm_lpc2xxx_olpcl2294.cdl --- olpcl2294/current/cdl/hal_arm_lpc2xxx_olpcl2294.cdl 23 Nov 2008 13:02:06 -0000 1.1 +++ olpcl2294/current/cdl/hal_arm_lpc2xxx_olpcl2294.cdl 9 Jan 2009 09:01:13 -0000 @@ -111,21 +111,21 @@ } cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_BAUD { display "Diagnostic serial port baud rate" flavor data - legal_values 9600 19200 38400 57600 115200 + legal_values 9600 19200 38400 57600 115200 230400 default_value 38400 description " This option selects the baud rate used for the diagnostic port." } cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_BAUD { display "GDB serial port baud rate" flavor data - legal_values 9600 19200 38400 57600 115200 + legal_values 9600 19200 38400 57600 115200 230400 default_value 38400 description " This option controls the baud rate used for the GDB connection." } Index: olpcl2294/current/include/hal_platform_setup.h =================================================================== RCS file: /cvs/ecos/ecos/packages/hal/arm/lpc2xxx/olpcl2294/current/include/hal_platform_setup.h,v retrieving revision 1.1 diff -U5 -r1.1 hal_platform_setup.h --- olpcl2294/current/include/hal_platform_setup.h 23 Nov 2008 13:02:06 -0000 1.1 +++ olpcl2294/current/include/hal_platform_setup.h 9 Jan 2009 09:01:16 -0000 @@ -128,17 +128,17 @@ mov r1,#4 str r1,[r0,#CYGARC_HAL_LPC2XXX_REG_MAMTIM] mov r1,#2 // 2, full MAM str r1,[r0,#CYGARC_HAL_LPC2XXX_REG_MAMCR] - // External memory interface depends on the bank width (32, 16 or 8 bit - // selected via MW bits in corresponding BCFG register). Furthermore, - // choice of the memory chip(s) will require an adequate setup of RBLE - // bit in BCFG register, too. RBLE = 0 in case of 8-bit based external - // memories, while memory chips capable of accepting 16 or 32 bit wide - // data will work with RBLE = 1. - // + // External memory interface depends on the bank width (32, 16 or 8 bit + // selected via MW bits in corresponding BCFG register). Furthermore, + // choice of the memory chip(s) will require an adequate setup of RBLE + // bit in BCFG register, too. RBLE = 0 in case of 8-bit based external + // memories, while memory chips capable of accepting 16 or 32 bit wide + // data will work with RBLE = 1. + // // BANK0: 2M FLASH // TE28F160C3BD70 (1024Kx16 x 1, 70nS) ldr r0,=CYGARC_HAL_LPC2XXX_REG_BCFG0 ldr r1,= (0x3 << 0) /* IDCY=3, idle timing */\ | (0x4 << 5) /* WST1=4, read timing */\ @@ -148,12 +148,12 @@ str r1,[r0] // BANK1: 1M RAM // K6R4016V1D (512Kx16 x 2, 10nS) ldr r0,=CYGARC_HAL_LPC2XXX_REG_BCFG1 - // Warning: changed these timings, you can fall dramatically the eCos - // kernel performance. Check it then using the eCos 'tm_basic' test. + // Warning: changed these timings, you can fall dramatically the eCos + // kernel performance. Check it then using the eCos 'tm_basic' test. ldr r1,= (0x0 << 0) /* IDCY=0, idle cycles */\ | (0x0 << 5) /* WST1=0, read timing */\ | (0x1 << 10) /* RBLE=1 */\ | (0x0 << 11) /* WST2=0, write timing */\ | (0x2 << 28) /* MW=2, 32-bits */ @@ -183,11 +183,11 @@ // Configure P0.30:16 as PIO, but EINT0 ('BUT' button) ldr r1,= (0x1 << 0) /* P0.16 as EINT0 */ str r1,[r0,#CYGARC_HAL_LPC2XXX_REG_PINSEL1] // GPIO P1.25:16, P3.24 are used as PIO - ldr r1,= (0x1 << 2) /* P1.36:26 Debug port */\ + ldr r1,= (0x1 << 2) /* P1.31:26 Debug port */\ | (0x2 << 4) /* D31:0,CS0,OE,BLS0-3 */\ | (0x1 << 8) /* WE enabled */\ | (0x1 << 11) /* CS1 enabled */\ | (0x1 << 14) /* CS2 enabled */\ | (0x1 << 23) /* A0 enabled */\ Index: olpcl2294/current/include/plf_io.h =================================================================== RCS file: /cvs/ecos/ecos/packages/hal/arm/lpc2xxx/olpcl2294/current/include/plf_io.h,v retrieving revision 1.1 diff -U5 -r1.1 plf_io.h --- olpcl2294/current/include/plf_io.h 23 Nov 2008 13:02:06 -0000 1.1 +++ olpcl2294/current/include/plf_io.h 9 Jan 2009 09:01:16 -0000 @@ -53,11 +53,11 @@ // On-chip device base addresses #ifndef __ASSEMBLER__ extern void hal_plf_hardware_init(void); #define HAL_PLF_HARDWARE_INIT() \ - hal_plf_hardware_init() + hal_plf_hardware_init() #endif // __ASSEMBLER__ //----------------------------------------------------------------------------- // end of plf_io.h Index: olpcl2294/current/src/olpcl2294_misc.c =================================================================== RCS file: /cvs/ecos/ecos/packages/hal/arm/lpc2xxx/olpcl2294/current/src/olpcl2294_misc.c,v retrieving revision 1.1 diff -U5 -r1.1 olpcl2294_misc.c --- olpcl2294/current/src/olpcl2294_misc.c 23 Nov 2008 13:02:06 -0000 1.1 +++ olpcl2294/current/src/olpcl2294_misc.c 9 Jan 2009 09:01:16 -0000 @@ -57,15 +57,10 @@ #include #include #include -// Newlib provides support for building the run-time elements of C++ -// within the toolchain. Modern newlib stuff looks for a _impure_ptr -// entry. -void *_impure_ptr; - extern void cyg_hal_plf_serial_init (void); //-------------------------------------------------------------------------- // hal_lpc2xxx_set_leds -- // --6sX45UoQRIJXqkqR--