Index: hal/arm/lpc2xxx/olpch2294/current/ChangeLog =================================================================== RCS file: hal/arm/lpc2xxx/olpch2294/current/ChangeLog diff -N hal/arm/lpc2xxx/olpch2294/current/ChangeLog --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ hal/arm/lpc2xxx/olpch2294/current/ChangeLog 23 Nov 2008 13:02:57 -0000 @@ -0,0 +1,49 @@ +2008-08-31 Sergei Gavrikov + + * LPC-H2294 header board package + * cdl/hal_arm_lpc2xxx_olpch2294.cdl + * include/hal_platform_setup.h + * include/pkgconf/mlt_arm_lpc2xxx_olpch2294_ram.h + * include/pkgconf/mlt_arm_lpc2xxx_olpch2294_ram.ldi + * include/pkgconf/mlt_arm_lpc2xxx_olpch2294_rom.h + * include/pkgconf/mlt_arm_lpc2xxx_olpch2294_rom.ldi + * include/pkgconf/mlt_arm_lpc2xxx_olpch2294_romram.h + * include/pkgconf/mlt_arm_lpc2xxx_olpch2294_romram.ldi + * include/plf_io.h + * misc/redboot_ROM.ecm + * src/olpch2294_misc.c + * src/redboot_cmds.c + +//=========================================================================== +//####ECOSGPLCOPYRIGHTBEGIN#### +// ------------------------------------------- +// This file is part of eCos, the Embedded Configurable Operating System. +// Copyright (C) 2008 FSF. +// +// eCos is free software; you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free +// Software Foundation; either version 2 or (at your option) any later version. +// +// eCos is distributed in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or +// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +// for more details. +// +// You should have received a copy of the GNU General Public License along +// with eCos; if not, write to the Free Software Foundation, Inc., +// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. +// +// As a special exception, if other files instantiate templates or use macros +// or inline functions from this file, or you compile this file and link it +// with other works to produce a work based on this file, this file does not +// by itself cause the resulting work to be covered by the GNU General Public +// License. However the source code for this file must still be made available +// in accordance with section (3) of the GNU General Public License. +// +// This exception does not invalidate any other reasons why a work based on +// this file might be covered by the GNU General Public License. +// ------------------------------------------- +//####ECOSGPLCOPYRIGHTEND#### +//=========================================================================== + + Index: hal/arm/lpc2xxx/olpch2294/current/cdl/hal_arm_lpc2xxx_olpch2294.cdl =================================================================== RCS file: hal/arm/lpc2xxx/olpch2294/current/cdl/hal_arm_lpc2xxx_olpch2294.cdl diff -N hal/arm/lpc2xxx/olpch2294/current/cdl/hal_arm_lpc2xxx_olpch2294.cdl --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ hal/arm/lpc2xxx/olpch2294/current/cdl/hal_arm_lpc2xxx_olpch2294.cdl 23 Nov 2008 13:02:57 -0000 @@ -0,0 +1,295 @@ +# ==================================================================== +# +# hal_arm_lpc2xxx_olpch2294.cdl +# +# ARM LPC2XXX OLPCH2294 header board package configuration data +# +# ==================================================================== +#####ECOSGPLCOPYRIGHTBEGIN#### +## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. +## Copyright (C) 2008 eCosCentric Limited +## +## eCos is free software; you can redistribute it and/or modify it under +## the terms of the GNU General Public License as published by the Free +## Software Foundation; either version 2 or (at your option) any later version. +## +## eCos is distributed in the hope that it will be useful, but WITHOUT ANY +## WARRANTY; without even the implied warranty of MERCHANTABILITY or +## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +## for more details. +## +## You should have received a copy of the GNU General Public License along +## with eCos; if not, write to the Free Software Foundation, Inc., +## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. +## +## As a special exception, if other files instantiate templates or use macros +## or inline functions from this file, or you compile this file and link it +## with other works to produce a work based on this file, this file does not +## by itself cause the resulting work to be covered by the GNU General Public +## License. However the source code for this file must still be made available +## in accordance with section (3) of the GNU General Public License. +## +## This exception does not invalidate any other reasons why a work based on +## this file might be covered by the GNU General Public License. +## ------------------------------------------- +#####ECOSGPLCOPYRIGHTEND#### +# ==================================================================== +######DESCRIPTIONBEGIN#### +# +# Author(s): Sergei Gavrikov +# Contributors: Sergei Gavrikov +# Date: 2008-08-31 +# +#####DESCRIPTIONEND#### +# +# ==================================================================== + +cdl_package CYGPKG_HAL_ARM_LPC2XXX_OLPCH2294 { + display "Olimex LPC-H2294 header board HAL" + parent CYGPKG_HAL_ARM_LPC2XXX + define_header hal_arm_lpc2xxx_olpch2294.h + include_dir cyg/hal + hardware + description " + The OLPCH2294 HAL package provides the support needed to run + eCos on Olimex LPC-H2294 header board." + + compile olpch2294_misc.c + + requires { CYGHWR_HAL_ARM_LPC2XXX == "LPC2294" } + + define_proc { + puts $::cdl_system_header "#define CYGBLD_HAL_TARGET_H " + puts $::cdl_system_header "#define CYGBLD_HAL_VARIANT_H " + puts $::cdl_system_header "#define CYGBLD_HAL_PLATFORM_H " + puts $::cdl_header "#define HAL_PLATFORM_CPU \"ARM7TDMI-S\"" + puts $::cdl_header "#define HAL_PLATFORM_BOARD \"Olimex LPC-H2294 header board\"" + puts $::cdl_header "#define HAL_PLATFORM_EXTRA \"\"" + } + + cdl_component CYG_HAL_STARTUP { + display "Startup type" + flavor data + default_value {"RAM"} + legal_values {"RAM" "ROM" "ROMRAM"} + no_define + define -file system.h CYG_HAL_STARTUP + description "Choose RAM, ROM or ROMRAM startup type." + } + + cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_DEFAULT { + display "Default console channel." + flavor data + calculated 0 + } + + cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS { + display "Number of communication channels on the board" + flavor data + calculated 1 + } + + cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL { + display "Debug serial port" + active_if CYGPRI_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_CONFIGURABLE + flavor data + legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1 + default_value 0 + description " + There is one USB connector on the board." + } + + cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL { + display "Diagnostic serial port" + active_if CYGPRI_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_CONFIGURABLE + flavor data + legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1 + default_value CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_DEFAULT + description " + There is one USB connector on the board." + } + + cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_BAUD { + display "Diagnostic serial port baud rate" + flavor data + legal_values 9600 19200 38400 57600 115200 + 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 + default_value 38400 + description " + This option controls the baud rate used for the GDB + connection." + } + + # Real-time clock/counter specifics + cdl_option CYGNUM_HAL_ARM_LPC2XXX_XTAL_FREQ { + display "CPU xtal frequency" + flavor data + default_value {14745600} + } + + cdl_option CYGNUM_HAL_ARM_LPC2XXX_PLL_MUL { + display "CPU PLL multiplier" + flavor data + default_value {4} + } + + cdl_option CYGNUM_HAL_ARM_LPC2XXX_CLOCK_SPEED { + display "CPU clock speed" + flavor data + calculated { CYGNUM_HAL_ARM_LPC2XXX_PLL_MUL * + CYGNUM_HAL_ARM_LPC2XXX_XTAL_FREQ } + } + + cdl_component CYGBLD_GLOBAL_OPTIONS { + display "Global build options" + flavor none + parent CYGPKG_NONE + description " + Global build options including control over compiler flags, + linker flags and choice of toolchain." + + cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX { + display "Global command prefix" + flavor data + no_define + default_value { "arm-eabi" } + description " + This option specifies the command prefix used when + invoking the build tools." + } + + cdl_option CYGBLD_GLOBAL_CFLAGS { + display "Global compiler flags" + flavor data + no_define + default_value { (CYGHWR_THUMB ? "-mthumb " : "") . (CYGBLD_ARM_ENABLE_THUMB_INTERWORK ? "-mthumb-interwork " : "") . "-mcpu=arm7tdmi -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions" } + description " + This option controls the global compiler flags which + are used to compile all packages by default. Individual + packages may define options which override these global + flags." + } + + cdl_option CYGBLD_GLOBAL_LDFLAGS { + display "Global linker flags" + flavor data + no_define + default_value { (CYGHWR_THUMB ? "-mthumb " : "") . (CYGBLD_ARM_ENABLE_THUMB_INTERWORK ? "-mthumb-interwork " : "") . "-mcpu=arm7tdmi -Wl,--gc-sections -Wl,-static -g -nostdlib" } + description " + This option controls the global linker flags. Individual + packages may define options which override these global + flags." + } + } + + cdl_option CYGSEM_HAL_ROM_MONITOR { + display "Behave as a ROM monitor" + flavor bool + default_value 0 + parent CYGPKG_HAL_ROM_MONITOR + requires { CYG_HAL_STARTUP == "ROM" || + CYG_HAL_STARTUP == "ROMRAM" } + description " + Enable this option if this program is to be used as a + ROM monitor, i.e. applications will be loaded into RAM on + the board, and this ROM monitor may process exceptions or + interrupts generated from the application. This enables + features such as utilizing a separate interrupt stack when + exceptions are generated." + } + + cdl_option CYGSEM_HAL_USE_ROM_MONITOR { + display "Work with a ROM monitor" + flavor booldata + legal_values { "Generic" "GDB_stubs" } + default_value { CYG_HAL_STARTUP == "RAM" ? "GDB_stubs" : 0 } + parent CYGPKG_HAL_ROM_MONITOR + requires { CYG_HAL_STARTUP == "RAM" } + description " + Support can be enabled for different varieties of ROM + monitor. This support changes various eCos semantics such + as the encoding of diagnostic output, or the overriding of + hardware interrupt vectors. + Firstly there is \"Generic\" support which prevents the + HAL from overriding the hardware vectors that it does not + use, to instead allow an installed ROM monitor to handle + them. This is the most basic support which is likely to be + common to most implementations of ROM monitor. + \"GDB_stubs\" provides support when GDB stubs are included + in the ROM monitor or boot ROM." + } + + cdl_component CYGPKG_REDBOOT_HAL_OPTIONS { + display "Redboot HAL options" + flavor none + no_define + parent CYGPKG_REDBOOT + active_if CYGPKG_REDBOOT + description " + This option lists the target's requirements for a valid + Redboot configuration." + + cdl_option CYGBLD_BUILD_REDBOOT_BIN { + display "Build Redboot ROM binary image" + active_if CYGBLD_BUILD_REDBOOT + requires { !CYGBLD_BUILD_REDBOOT_WITH_EXEC } + default_value 1 + no_define + description " + This option enables the conversion of the Redboot ELF + image to a binary image suitable for ROM programming." + + compile -library=libextras.a redboot_cmds.c + + make -priority 325 { + /bin/redboot.bin : /bin/redboot.elf + $(OBJCOPY) --strip-debug $< $(@:.bin=.img) + $(OBJCOPY) -O srec $< $(@:.bin=.srec) + $(OBJCOPY) -O ihex $< $(@:.bin=.hex) + $(OBJCOPY) -O binary $< $@ + } + + } + } + + cdl_component CYGHWR_MEMORY_LAYOUT { + display "Memory layout" + flavor data + no_define + calculated { (CYG_HAL_STARTUP == "RAM") ? "arm_lpc2xxx_olpch2294_ram" : + "arm_lpc2xxx_olpch2294_rom" } + cdl_option CYGHWR_MEMORY_LAYOUT_LDI { + display "Memory layout linker script fragment" + flavor data + no_define + define -file system.h CYGHWR_MEMORY_LAYOUT_LDI + calculated { (CYG_HAL_STARTUP == "RAM") ? + "" : + (CYG_HAL_STARTUP == "ROMRAM") ? + "" : + "" } + } + + cdl_option CYGHWR_MEMORY_LAYOUT_H { + display "Memory layout header file" + flavor data + no_define + define -file system.h CYGHWR_MEMORY_LAYOUT_H + calculated { (CYG_HAL_STARTUP == "RAM") ? + "" : + (CYG_HAL_STARTUP == "ROMRAM") ? + "" : + "" } + } + } +} + Index: hal/arm/lpc2xxx/olpch2294/current/include/hal_platform_setup.h =================================================================== RCS file: hal/arm/lpc2xxx/olpch2294/current/include/hal_platform_setup.h diff -N hal/arm/lpc2xxx/olpch2294/current/include/hal_platform_setup.h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ hal/arm/lpc2xxx/olpch2294/current/include/hal_platform_setup.h 23 Nov 2008 13:02:57 -0000 @@ -0,0 +1,236 @@ +#ifndef CYGONCE_HAL_PLATFORM_SETUP_H +#define CYGONCE_HAL_PLATFORM_SETUP_H + +/*============================================================================= +// +// hal_platform_setup.h +// +// Platform specific support for HAL (assembly code) +// +//============================================================================= +//####ECOSGPLCOPYRIGHTBEGIN#### +// ------------------------------------------- +// This file is part of eCos, the Embedded Configurable Operating System. +// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. +// Copyright (C) 2008 eCosCentric Limited +// +// eCos is free software; you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free +// Software Foundation; either version 2 or (at your option) any later version. +// +// eCos is distributed in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or +// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +// for more details. +// +// You should have received a copy of the GNU General Public License along +// with eCos; if not, write to the Free Software Foundation, Inc., +// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. +// +// As a special exception, if other files instantiate templates or use macros +// or inline functions from this file, or you compile this file and link it +// with other works to produce a work based on this file, this file does not +// by itself cause the resulting work to be covered by the GNU General Public +// License. However the source code for this file must still be made available +// in accordance with section (3) of the GNU General Public License. +// +// This exception does not invalidate any other reasons why a work based on +// this file might be covered by the GNU General Public License. +// ------------------------------------------- +//####ECOSGPLCOPYRIGHTEND#### +//============================================================================= +//#####DESCRIPTIONBEGIN#### +// +// Author(s): Sergei Gavrikov +// Contributors: Sergei Gavrikov +// Date: 2008-08-31 +// Purpose: LPC-H2294 platform specific support routines +// Description: +// Usage: #include +// +//####DESCRIPTIONEND#### +// +//===========================================================================*/ + +#include +#include CYGHWR_MEMORY_LAYOUT_H +#include + + // There is one LED on the board. + // |P0.30 470 Om LED + // |------\/\/\/-----|<|-----> 3.3 V + // | + .macro _led_init + ldr r0,=CYGARC_HAL_LPC2XXX_REG_IO_BASE + ldr r1,[r0,#CYGARC_HAL_LPC2XXX_REG_IO0DIR] + orr r1,r1,#(1<<30) + str r1,[r0,#CYGARC_HAL_LPC2XXX_REG_IO0DIR] + + .endm // _led_init + + .macro _led x + ldr r0,=CYGARC_HAL_LPC2XXX_REG_IO_BASE + ldr r1,=(1<<30) + str r1,[r0,#CYGARC_HAL_LPC2XXX_REG_IO0SET] + ldr r1,=((\x & 1)<<30) + str r1,[r0,#CYGARC_HAL_LPC2XXX_REG_IO0CLR] + + .endm // _led + + .macro _pll_init + ldr r0,=CYGARC_HAL_LPC2XXX_REG_SCB_BASE + + mov r2,#0xAA + mov r3,#0x55 + + // enable PLL + mov r1,#1 + str r1,[r0,#CYGARC_HAL_LPC2XXX_REG_PLLCON] + + mov r1,#(0x20 | (CYGNUM_HAL_ARM_LPC2XXX_PLL_MUL - 1)) + str r1,[r0,#CYGARC_HAL_LPC2XXX_REG_PLLCFG] + + // update PLL registers + str r2,[r0,#CYGARC_HAL_LPC2XXX_REG_PLLFEED] + str r3,[r0,#CYGARC_HAL_LPC2XXX_REG_PLLFEED] + + // wait for it to lock +1: + ldr r1,[r0,#CYGARC_HAL_LPC2XXX_REG_PLLSTAT] + ands r1,r1,#(1<<10) + beq 1b + + // connect PLL + mov r1,#3 + str r1,[r0,#CYGARC_HAL_LPC2XXX_REG_PLLCON] + // update PLL registers + str r2,[r0,#CYGARC_HAL_LPC2XXX_REG_PLLFEED] + str r3,[r0,#CYGARC_HAL_LPC2XXX_REG_PLLFEED] + + .endm // _pll_init + + .macro _mem_init + // copy first 64 bytes from ROM to on-chip RAM + mov r0,#0 + mov r1,#0x40000000 + mov r2,#0x40 +1: + ldr r3,[r0,#4]! + str r3,[r1,#4]! + cmps r0,r2 + bne 1b + + ldr r0,=CYGARC_HAL_LPC2XXX_REG_SCB_BASE + mov r1,#2 // interrupt vector table is mapped to RAM + str r1, [r0,#CYGARC_HAL_LPC2XXX_REG_MEMMAP] + + // flash timings + 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. + // + // BANK0: 4M FLASH + // TE28F320C3BD70 (1024Kx32 x 1, 70nS) + ldr r0,=CYGARC_HAL_LPC2XXX_REG_BCFG0 + ldr r1,= (0x3 << 0) /* IDCY=3, idle timing */\ + | (0x4 << 5) /* WST1=4, read timing */\ + | (0x1 << 10) /* RBLE=1 */\ + | (0x6 << 11) /* WST2=6, write timing */\ + | (0x1 << 28) /* MW=1, 16-bits */ + str r1,[r0] + + // BANK1: 1M RAM + // IDT71V416L (512Kx16 x 2, 12nS) + 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. + 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 */ + str r1,[r0] + + .endm // _mem_init + + .macro _gpio_init + ldr r0,=CYGARC_HAL_LPC2XXX_REG_PIN_BASE + + // Configure P0.15:0 as PIO, but UART0 + ldr r1,= (0x1 << 0) /* P0.0 as TxD0 */\ + | (0x1 << 2) /* P0.1 as RxD0 */ + str r1,[r0,#CYGARC_HAL_LPC2XXX_REG_PINSEL0] + + // 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 */\ + | (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 */ + str r1,[r0,#CYGARC_HAL_LPC2XXX_REG_PINSEL2] + + .endm // _gpio_init + + .macro _relocate + // Relocate ROM/FLASH to RAM + ldr r0,= -8192 + and r0,r0,pc + ldr r1,=(CYGMEM_REGION_ram) + ldr r2,=(CYGMEM_REGION_ram+0x3E000) +10: ldr r3,[r0],#4 + str r3,[r1],#4 + cmp r1,r2 + bne 10b + ldr r0,=20f + mov pc,r0 +20: + .endm // relocate + +#define CYGHWR_LED_MACRO _led \x + +#if defined(CYG_HAL_STARTUP_ROM) || defined(CYG_HAL_STARTUP_ROMRAM) + + .macro _setup + + _pll_init + + _mem_init + + _gpio_init + +#if defined(CYG_HAL_STARTUP_ROMRAM) + _relocate +#endif + _led_init + + .endm + + +#define CYGSEM_HAL_ROM_RESET_USES_JUMP + +#else + + .macro _setup + + .endm + +#endif // CYG_HAL_STARTUP_ROM + +#define PLATFORM_SETUP1 _setup + +//----------------------------------------------------------------------------- +// end of hal_platform_setup.h +#endif // CYGONCE_HAL_PLATFORM_SETUP_H Index: hal/arm/lpc2xxx/olpch2294/current/include/plf_io.h =================================================================== RCS file: hal/arm/lpc2xxx/olpch2294/current/include/plf_io.h diff -N hal/arm/lpc2xxx/olpch2294/current/include/plf_io.h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ hal/arm/lpc2xxx/olpch2294/current/include/plf_io.h 23 Nov 2008 13:02:57 -0000 @@ -0,0 +1,66 @@ +#ifndef CYGONCE_HAL_PLF_IO_H +#define CYGONCE_HAL_PLF_IO_H +//============================================================================= +// +// plf_io.h +// +// Olimex LPC-H2294 board specific registers +// +//============================================================================= +//####ECOSGPLCOPYRIGHTBEGIN#### +// ------------------------------------------- +// This file is part of eCos, the Embedded Configurable Operating System. +// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. +// Copyright (C) 2008 eCosCentric Limited +// +// eCos is free software; you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free +// Software Foundation; either version 2 or (at your option) any later version. +// +// eCos is distributed in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or +// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +// for more details. +// +// You should have received a copy of the GNU General Public License along +// with eCos; if not, write to the Free Software Foundation, Inc., +// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. +// +// As a special exception, if other files instantiate templates or use macros +// or inline functions from this file, or you compile this file and link it +// with other works to produce a work based on this file, this file does not +// by itself cause the resulting work to be covered by the GNU General Public +// License. However the source code for this file must still be made available +// in accordance with section (3) of the GNU General Public License. +// +// This exception does not invalidate any other reasons why a work based on +// this file might be covered by the GNU General Public License. +// ------------------------------------------- +//####ECOSGPLCOPYRIGHTEND#### +//============================================================================= +//#####DESCRIPTIONBEGIN#### +// +// Author(s): Sergei Gavrikov +// Contributors: Sergei Gavrikov +// Date: 2008-08-31 +// Purpose: Olimex LPC-H2294 board specific registers +// Description: +// Usage: #include +// +//####DESCRIPTIONEND#### +// +//============================================================================= +// On-chip device base addresses + +#ifndef __ASSEMBLER__ + +extern void hal_plf_hardware_init (void); +#define HAL_PLF_HARDWARE_INIT() \ + hal_plf_hardware_init() + +#endif // __ASSEMBLER__ + +#endif // CYGONCE_HAL_PLF_IO_H +//----------------------------------------------------------------------------- +// end of plf_io.h + Index: hal/arm/lpc2xxx/olpch2294/current/include/pkgconf/mlt_arm_lpc2xxx_olpch2294_ram.h =================================================================== RCS file: hal/arm/lpc2xxx/olpch2294/current/include/pkgconf/mlt_arm_lpc2xxx_olpch2294_ram.h diff -N hal/arm/lpc2xxx/olpch2294/current/include/pkgconf/mlt_arm_lpc2xxx_olpch2294_ram.h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ hal/arm/lpc2xxx/olpch2294/current/include/pkgconf/mlt_arm_lpc2xxx_olpch2294_ram.h 23 Nov 2008 13:02:57 -0000 @@ -0,0 +1,22 @@ +#ifndef __ASSEMBLER__ +#include +#include + +#endif + +#define CYGMEM_REGION_sram (0x40000000) +#define CYGMEM_REGION_sram_SIZE (0x00004000) +#define CYGMEM_REGION_sram_ATTR (CYGMEM_REGION_ATTR_R | CYGMEM_REGION_ATTR_W) +#define CYGMEM_REGION_ram (0x81000000) +#define CYGMEM_REGION_ram_SIZE (0x00100000) +#define CYGMEM_REGION_ram_ATTR (CYGMEM_REGION_ATTR_R | CYGMEM_REGION_ATTR_W) + +#ifndef __ASSEMBLER__ +extern char CYG_LABEL_NAME (__heap1) []; + +#endif + +#define CYGMEM_SECTION_heap1 (CYG_LABEL_NAME (__heap1)) + +#define CYGMEM_SECTION_heap1_SIZE (0x81100000 - (size_t) CYG_LABEL_NAME (__heap1)) + Index: hal/arm/lpc2xxx/olpch2294/current/include/pkgconf/mlt_arm_lpc2xxx_olpch2294_ram.ldi =================================================================== RCS file: hal/arm/lpc2xxx/olpch2294/current/include/pkgconf/mlt_arm_lpc2xxx_olpch2294_ram.ldi diff -N hal/arm/lpc2xxx/olpch2294/current/include/pkgconf/mlt_arm_lpc2xxx_olpch2294_ram.ldi --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ hal/arm/lpc2xxx/olpch2294/current/include/pkgconf/mlt_arm_lpc2xxx_olpch2294_ram.ldi 23 Nov 2008 13:02:57 -0000 @@ -0,0 +1,25 @@ +#include + +MEMORY +{ + sram : ORIGIN = 0x40000000, LENGTH = 0x4000 + ram : ORIGIN = 0x81000000, LENGTH = 0x100000 +} + +SECTIONS +{ + SECTIONS_BEGIN + SECTION_fixed_vectors (sram, 0x40000020, LMA_EQ_VMA) + SECTION_rom_vectors (ram, 0x81008000, LMA_EQ_VMA) + SECTION_text (ram, ALIGN (0x4), LMA_EQ_VMA) + SECTION_fini (ram, ALIGN (0x4), LMA_EQ_VMA) + SECTION_rodata (ram, ALIGN (0x4), LMA_EQ_VMA) + SECTION_rodata1 (ram, ALIGN (0x4), LMA_EQ_VMA) + SECTION_fixup (ram, ALIGN (0x4), LMA_EQ_VMA) + SECTION_gcc_except_table (ram, ALIGN (0x4), LMA_EQ_VMA) + SECTION_data (ram, ALIGN (0x4), LMA_EQ_VMA) + SECTION_bss (ram, ALIGN (0x4), LMA_EQ_VMA) + CYG_LABEL_DEFN(__heap1) = ALIGN (0x8); + SECTIONS_END +} + Index: hal/arm/lpc2xxx/olpch2294/current/include/pkgconf/mlt_arm_lpc2xxx_olpch2294_rom.h =================================================================== RCS file: hal/arm/lpc2xxx/olpch2294/current/include/pkgconf/mlt_arm_lpc2xxx_olpch2294_rom.h diff -N hal/arm/lpc2xxx/olpch2294/current/include/pkgconf/mlt_arm_lpc2xxx_olpch2294_rom.h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ hal/arm/lpc2xxx/olpch2294/current/include/pkgconf/mlt_arm_lpc2xxx_olpch2294_rom.h 23 Nov 2008 13:02:57 -0000 @@ -0,0 +1,25 @@ +#ifndef __ASSEMBLER__ +#include +#include + +#endif + +#define CYGMEM_REGION_rom (0x00000000) +#define CYGMEM_REGION_rom_SIZE (0x00040000) +#define CYGMEM_REGION_rom_ATTR (CYGMEM_REGION_ATTR_R) +#define CYGMEM_REGION_sram (0x40000000) +#define CYGMEM_REGION_sram_SIZE (0x00004000) +#define CYGMEM_REGION_sram_ATTR (CYGMEM_REGION_ATTR_R | CYGMEM_REGION_ATTR_W) +#define CYGMEM_REGION_ram (0x81000000) +#define CYGMEM_REGION_ram_SIZE (0x00100000) +#define CYGMEM_REGION_ram_ATTR (CYGMEM_REGION_ATTR_R | CYGMEM_REGION_ATTR_W) + +#ifndef __ASSEMBLER__ +extern char CYG_LABEL_NAME (__heap1) []; + +#endif + +#define CYGMEM_SECTION_heap1 (CYG_LABEL_NAME (__heap1)) + +#define CYGMEM_SECTION_heap1_SIZE (0x81100000 - (size_t) CYG_LABEL_NAME (__heap1)) + Index: hal/arm/lpc2xxx/olpch2294/current/include/pkgconf/mlt_arm_lpc2xxx_olpch2294_rom.ldi =================================================================== RCS file: hal/arm/lpc2xxx/olpch2294/current/include/pkgconf/mlt_arm_lpc2xxx_olpch2294_rom.ldi diff -N hal/arm/lpc2xxx/olpch2294/current/include/pkgconf/mlt_arm_lpc2xxx_olpch2294_rom.ldi --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ hal/arm/lpc2xxx/olpch2294/current/include/pkgconf/mlt_arm_lpc2xxx_olpch2294_rom.ldi 23 Nov 2008 13:02:57 -0000 @@ -0,0 +1,26 @@ +#include + +MEMORY +{ + sram : ORIGIN = 0x40000000, LENGTH = 0x4000 + ram : ORIGIN = 0x81000000, LENGTH = 0x100000 + rom : ORIGIN = 0x00000000, LENGTH = 0x40000 +} + +SECTIONS +{ + SECTIONS_BEGIN + SECTION_rom_vectors (rom, 0x00000000, LMA_EQ_VMA) + SECTION_text (rom, ALIGN (0x4), LMA_EQ_VMA) + SECTION_fini (rom, ALIGN (0x4), LMA_EQ_VMA) + SECTION_rodata (rom, ALIGN (0x4), LMA_EQ_VMA) + SECTION_rodata1 (rom, ALIGN (0x4), LMA_EQ_VMA) + SECTION_fixup (rom, ALIGN (0x4), LMA_EQ_VMA) + SECTION_gcc_except_table (rom, ALIGN (0x4), LMA_EQ_VMA) + SECTION_fixed_vectors (sram, 0x40000020, LMA_EQ_VMA) + SECTION_data (ram, 0x81000000, FOLLOWING (.gcc_except_table)) + SECTION_bss (ram, ALIGN (0x4), LMA_EQ_VMA) + CYG_LABEL_DEFN(__heap1) = ALIGN (0x8); + SECTIONS_END +} + Index: hal/arm/lpc2xxx/olpch2294/current/include/pkgconf/mlt_arm_lpc2xxx_olpch2294_romram.h =================================================================== RCS file: hal/arm/lpc2xxx/olpch2294/current/include/pkgconf/mlt_arm_lpc2xxx_olpch2294_romram.h diff -N hal/arm/lpc2xxx/olpch2294/current/include/pkgconf/mlt_arm_lpc2xxx_olpch2294_romram.h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ hal/arm/lpc2xxx/olpch2294/current/include/pkgconf/mlt_arm_lpc2xxx_olpch2294_romram.h 23 Nov 2008 13:02:57 -0000 @@ -0,0 +1,25 @@ +#ifndef __ASSEMBLER__ +#include +#include + +#endif + +#define CYGMEM_REGION_rom (0x00000000) +#define CYGMEM_REGION_rom_SIZE (0x00040000) +#define CYGMEM_REGION_rom_ATTR (CYGMEM_REGION_ATTR_R) +#define CYGMEM_REGION_sram (0x40000000) +#define CYGMEM_REGION_sram_SIZE (0x00004000) +#define CYGMEM_REGION_sram_ATTR (CYGMEM_REGION_ATTR_R | CYGMEM_REGION_ATTR_W) +#define CYGMEM_REGION_ram (0x81000000) +#define CYGMEM_REGION_ram_SIZE (0x00100000) +#define CYGMEM_REGION_ram_ATTR (CYGMEM_REGION_ATTR_R | CYGMEM_REGION_ATTR_W) + +#ifndef __ASSEMBLER__ +extern char CYG_LABEL_NAME (__heap1) []; + +#endif + +#define CYGMEM_SECTION_heap1 (CYG_LABEL_NAME (__heap1)) + +#define CYGMEM_SECTION_heap1_SIZE (0x81100000 - (size_t) CYG_LABEL_NAME (__heap1)) + Index: hal/arm/lpc2xxx/olpch2294/current/include/pkgconf/mlt_arm_lpc2xxx_olpch2294_romram.ldi =================================================================== RCS file: hal/arm/lpc2xxx/olpch2294/current/include/pkgconf/mlt_arm_lpc2xxx_olpch2294_romram.ldi diff -N hal/arm/lpc2xxx/olpch2294/current/include/pkgconf/mlt_arm_lpc2xxx_olpch2294_romram.ldi --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ hal/arm/lpc2xxx/olpch2294/current/include/pkgconf/mlt_arm_lpc2xxx_olpch2294_romram.ldi 23 Nov 2008 13:02:57 -0000 @@ -0,0 +1,25 @@ +#include + +MEMORY +{ + sram : ORIGIN = 0x40000000, LENGTH = 0x4000 + ram : ORIGIN = 0x81000000, LENGTH = 0x100000 +} + +SECTIONS +{ + SECTIONS_BEGIN + SECTION_fixed_vectors (sram, 0x40000020, LMA_EQ_VMA) + SECTION_rom_vectors (ram, 0x81000000, LMA_EQ_VMA) + SECTION_text (ram, ALIGN (0x4), LMA_EQ_VMA) + SECTION_fini (ram, ALIGN (0x4), LMA_EQ_VMA) + SECTION_rodata (ram, ALIGN (0x4), LMA_EQ_VMA) + SECTION_rodata1 (ram, ALIGN (0x4), LMA_EQ_VMA) + SECTION_fixup (ram, ALIGN (0x4), LMA_EQ_VMA) + SECTION_gcc_except_table (ram, ALIGN (0x4), LMA_EQ_VMA) + SECTION_data (ram, ALIGN (0x4), LMA_EQ_VMA) + SECTION_bss (ram, ALIGN (0x4), LMA_EQ_VMA) + CYG_LABEL_DEFN(__heap1) = ALIGN (0x8); + SECTIONS_END +} + Index: hal/arm/lpc2xxx/olpch2294/current/misc/redboot_RAM.ecm =================================================================== RCS file: hal/arm/lpc2xxx/olpch2294/current/misc/redboot_RAM.ecm diff -N hal/arm/lpc2xxx/olpch2294/current/misc/redboot_RAM.ecm --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ hal/arm/lpc2xxx/olpch2294/current/misc/redboot_RAM.ecm 23 Nov 2008 13:02:57 -0000 @@ -0,0 +1,95 @@ +cdl_savefile_version 1; +cdl_savefile_command cdl_savefile_version {}; +cdl_savefile_command cdl_savefile_command {}; +cdl_savefile_command cdl_configuration { description hardware template package }; +cdl_savefile_command cdl_package { value_source user_value wizard_value inferred_value }; +cdl_savefile_command cdl_component { value_source user_value wizard_value inferred_value }; +cdl_savefile_command cdl_option { value_source user_value wizard_value inferred_value }; +cdl_savefile_command cdl_interface { value_source user_value wizard_value inferred_value }; + +cdl_configuration eCos { + description "" ; + hardware olpch2294 ; + template redboot ; + package -hardware CYGPKG_HAL_ARM current ; + package -hardware CYGPKG_HAL_ARM_LPC2XXX current ; + package -hardware CYGPKG_HAL_ARM_LPC2XXX_OLPCH2294 current ; + package -hardware CYGPKG_DEVS_FLASH_INTEL_28FXXX current ; + package -hardware CYGPKG_DEVS_FLASH_ARM_OLPCX2294 current ; + package -hardware CYGPKG_IO_SERIAL_GENERIC_16X5X current ; + package -hardware CYGPKG_IO_SERIAL_ARM_LPC2XXX current ; + package -hardware CYGPKG_DEVICES_WATCHDOG_ARM_LPC2XXX current ; + package -template CYGPKG_HAL current ; + package -template CYGPKG_INFRA current ; + package -template CYGPKG_REDBOOT current ; + package -template CYGPKG_ISOINFRA current ; + package -template CYGPKG_LIBC_STRING current ; + package -template CYGPKG_CRC current ; + package CYGPKG_IO_FLASH current ; +}; + +cdl_option CYGFUN_LIBC_STRING_BSD_FUNCS { + inferred_value 0 +}; + +cdl_option CYGIMP_HAL_COMMON_INTERRUPTS_USE_INTERRUPT_STACK { + inferred_value 0 +}; + +cdl_option CYGNUM_HAL_COMMON_INTERRUPTS_STACK_SIZE { + user_value 4096 +}; + +cdl_option CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT { + user_value 0 +}; + +cdl_option CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM { + inferred_value 0 +}; + +cdl_option CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS { + inferred_value 1 +}; + +cdl_option CYGSEM_HAL_USE_ROM_MONITOR { + inferred_value 0 0 +}; + +cdl_component CYGHWR_HAL_ARM_LPC2XXX { + inferred_value LPC2294 +}; + +cdl_component CYGBLD_BUILD_REDBOOT { + user_value 1 +}; + +cdl_option CYGBLD_BUILD_REDBOOT_WITH_EXEC { + inferred_value 0 +}; + +cdl_option CYGBLD_ISO_STRTOK_R_HEADER { + inferred_value 1 +}; + +cdl_option CYGBLD_ISO_STRING_LOCALE_FUNCS_HEADER { + inferred_value 1 +}; + +cdl_option CYGBLD_ISO_STRING_BSD_FUNCS_HEADER { + inferred_value 1 +}; + +cdl_option CYGBLD_ISO_STRING_MEMFUNCS_HEADER { + inferred_value 1 +}; + +cdl_option CYGBLD_ISO_STRING_STRFUNCS_HEADER { + inferred_value 1 +}; + +cdl_option CYGHWR_DEVS_FLASH_INTEL_28F320C3 { + inferred_value 1 +}; + + Index: hal/arm/lpc2xxx/olpch2294/current/misc/redboot_ROM.ecm =================================================================== RCS file: hal/arm/lpc2xxx/olpch2294/current/misc/redboot_ROM.ecm diff -N hal/arm/lpc2xxx/olpch2294/current/misc/redboot_ROM.ecm --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ hal/arm/lpc2xxx/olpch2294/current/misc/redboot_ROM.ecm 23 Nov 2008 13:02:57 -0000 @@ -0,0 +1,103 @@ +cdl_savefile_version 1; +cdl_savefile_command cdl_savefile_version {}; +cdl_savefile_command cdl_savefile_command {}; +cdl_savefile_command cdl_configuration { description hardware template package }; +cdl_savefile_command cdl_package { value_source user_value wizard_value inferred_value }; +cdl_savefile_command cdl_component { value_source user_value wizard_value inferred_value }; +cdl_savefile_command cdl_option { value_source user_value wizard_value inferred_value }; +cdl_savefile_command cdl_interface { value_source user_value wizard_value inferred_value }; + +cdl_configuration eCos { + description "" ; + hardware olpch2294 ; + template redboot ; + package -hardware CYGPKG_HAL_ARM current ; + package -hardware CYGPKG_HAL_ARM_LPC2XXX current ; + package -hardware CYGPKG_HAL_ARM_LPC2XXX_OLPCH2294 current ; + package -hardware CYGPKG_DEVS_FLASH_INTEL_28FXXX current ; + package -hardware CYGPKG_DEVS_FLASH_ARM_OLPCX2294 current ; + package -hardware CYGPKG_IO_SERIAL_GENERIC_16X5X current ; + package -hardware CYGPKG_IO_SERIAL_ARM_LPC2XXX current ; + package -hardware CYGPKG_DEVICES_WATCHDOG_ARM_LPC2XXX current ; + package -template CYGPKG_HAL current ; + package -template CYGPKG_INFRA current ; + package -template CYGPKG_REDBOOT current ; + package -template CYGPKG_ISOINFRA current ; + package -template CYGPKG_LIBC_STRING current ; + package -template CYGPKG_CRC current ; + package CYGPKG_IO_FLASH current ; +}; + +cdl_option CYGFUN_LIBC_STRING_BSD_FUNCS { + inferred_value 0 +}; + +cdl_option CYGIMP_HAL_COMMON_INTERRUPTS_USE_INTERRUPT_STACK { + inferred_value 0 +}; + +cdl_option CYGNUM_HAL_COMMON_INTERRUPTS_STACK_SIZE { + user_value 4096 +}; + +cdl_option CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT { + user_value 0 +}; + +cdl_option CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM { + inferred_value 0 +}; + +cdl_option CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS { + inferred_value 1 +}; + +cdl_option CYGSEM_HAL_ROM_MONITOR { + inferred_value 1 +}; + +cdl_option CYGSEM_HAL_USE_ROM_MONITOR { + inferred_value 0 0 +}; + +cdl_component CYGHWR_HAL_ARM_LPC2XXX { + inferred_value LPC2294 +}; + +cdl_component CYG_HAL_STARTUP { + inferred_value ROM +}; + +cdl_component CYGBLD_BUILD_REDBOOT { + user_value 1 +}; + +cdl_option CYGBLD_BUILD_REDBOOT_WITH_EXEC { + inferred_value 0 +}; + +cdl_option CYGBLD_ISO_STRTOK_R_HEADER { + inferred_value 1 +}; + +cdl_option CYGBLD_ISO_STRING_LOCALE_FUNCS_HEADER { + inferred_value 1 +}; + +cdl_option CYGBLD_ISO_STRING_BSD_FUNCS_HEADER { + inferred_value 1 +}; + +cdl_option CYGBLD_ISO_STRING_MEMFUNCS_HEADER { + inferred_value 1 +}; + +cdl_option CYGBLD_ISO_STRING_STRFUNCS_HEADER { + inferred_value 1 +}; + +cdl_option CYGHWR_DEVS_FLASH_INTEL_28F320C3 { + inferred_value 1 +}; + + Index: hal/arm/lpc2xxx/olpch2294/current/misc/redboot_ROM_minimal.ecm =================================================================== RCS file: hal/arm/lpc2xxx/olpch2294/current/misc/redboot_ROM_minimal.ecm diff -N hal/arm/lpc2xxx/olpch2294/current/misc/redboot_ROM_minimal.ecm --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ hal/arm/lpc2xxx/olpch2294/current/misc/redboot_ROM_minimal.ecm 23 Nov 2008 13:02:57 -0000 @@ -0,0 +1,98 @@ +cdl_savefile_version 1; +cdl_savefile_command cdl_savefile_version {}; +cdl_savefile_command cdl_savefile_command {}; +cdl_savefile_command cdl_configuration { description hardware template package }; +cdl_savefile_command cdl_package { value_source user_value wizard_value inferred_value }; +cdl_savefile_command cdl_component { value_source user_value wizard_value inferred_value }; +cdl_savefile_command cdl_option { value_source user_value wizard_value inferred_value }; +cdl_savefile_command cdl_interface { value_source user_value wizard_value inferred_value }; + +cdl_configuration eCos { + description "" ; + hardware olpch2294 ; + template redboot ; + package -hardware CYGPKG_HAL_ARM current ; + package -hardware CYGPKG_HAL_ARM_LPC2XXX current ; + package -hardware CYGPKG_HAL_ARM_LPC2XXX_OLPCH2294 current ; + package -hardware CYGPKG_DEVS_FLASH_INTEL_28FXXX current ; + package -hardware CYGPKG_DEVS_FLASH_ARM_OLPCX2294 current ; + package -hardware CYGPKG_IO_SERIAL_GENERIC_16X5X current ; + package -hardware CYGPKG_IO_SERIAL_ARM_LPC2XXX current ; + package -hardware CYGPKG_DEVICES_WATCHDOG_ARM_LPC2XXX current ; + package -template CYGPKG_HAL current ; + package -template CYGPKG_INFRA current ; + package -template CYGPKG_REDBOOT current ; + package -template CYGPKG_ISOINFRA current ; + package -template CYGPKG_LIBC_STRING current ; + package -template CYGPKG_CRC current ; +}; + +cdl_option CYGFUN_LIBC_STRING_BSD_FUNCS { + inferred_value 0 +}; + +cdl_option CYGIMP_HAL_COMMON_INTERRUPTS_USE_INTERRUPT_STACK { + inferred_value 0 +}; + +cdl_option CYGNUM_HAL_COMMON_INTERRUPTS_STACK_SIZE { + user_value 4096 +}; + +cdl_option CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT { + user_value 0 +}; + +cdl_option CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM { + inferred_value 0 +}; + +cdl_option CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS { + inferred_value 1 +}; + +cdl_option CYGSEM_HAL_ROM_MONITOR { + inferred_value 1 +}; + +cdl_option CYGSEM_HAL_USE_ROM_MONITOR { + inferred_value 0 0 +}; + +cdl_component CYGHWR_HAL_ARM_LPC2XXX { + inferred_value LPC2294 +}; + +cdl_component CYG_HAL_STARTUP { + inferred_value ROM +}; + +cdl_component CYGBLD_BUILD_REDBOOT { + user_value 1 +}; + +cdl_option CYGBLD_BUILD_REDBOOT_WITH_EXEC { + inferred_value 0 +}; + +cdl_option CYGBLD_ISO_STRTOK_R_HEADER { + inferred_value 1 +}; + +cdl_option CYGBLD_ISO_STRING_LOCALE_FUNCS_HEADER { + inferred_value 1 +}; + +cdl_option CYGBLD_ISO_STRING_BSD_FUNCS_HEADER { + inferred_value 1 +}; + +cdl_option CYGBLD_ISO_STRING_MEMFUNCS_HEADER { + inferred_value 1 +}; + +cdl_option CYGBLD_ISO_STRING_STRFUNCS_HEADER { + inferred_value 1 +}; + + Index: hal/arm/lpc2xxx/olpch2294/current/src/olpch2294_misc.c =================================================================== RCS file: hal/arm/lpc2xxx/olpch2294/current/src/olpch2294_misc.c diff -N hal/arm/lpc2xxx/olpch2294/current/src/olpch2294_misc.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ hal/arm/lpc2xxx/olpch2294/current/src/olpch2294_misc.c 23 Nov 2008 13:02:57 -0000 @@ -0,0 +1,112 @@ +//========================================================================== +// +// olpch2294_misc.c +// +// HAL misc board support code for Olimex LPC-H2294 header board +// +//========================================================================== +//####ECOSGPLCOPYRIGHTBEGIN#### +// ------------------------------------------- +// This file is part of eCos, the Embedded Configurable Operating System. +// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. +// Copyright (C) 2008 eCosCentric Limited +// +// eCos is free software; you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free +// Software Foundation; either version 2 or (at your option) any later version. +// +// eCos is distributed in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or +// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +// for more details. +// +// You should have received a copy of the GNU General Public License along +// with eCos; if not, write to the Free Software Foundation, Inc., +// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. +// +// As a special exception, if other files instantiate templates or use macros +// or inline functions from this file, or you compile this file and link it +// with other works to produce a work based on this file, this file does not +// by itself cause the resulting work to be covered by the GNU General Public +// License. However the source code for this file must still be made available +// in accordance with section (3) of the GNU General Public License. +// +// This exception does not invalidate any other reasons why a work based on +// this file might be covered by the GNU General Public License. +// ------------------------------------------- +//####ECOSGPLCOPYRIGHTEND#### +//========================================================================== +//#####DESCRIPTIONBEGIN#### +// +// Author(s): Sergei Gavrikov +// Contributors: Sergei Gavrikov +// Date: 2008-08-31 +// Purpose: HAL board support +// Description: Implementations of HAL board interfaces +// +//####DESCRIPTIONEND#### +// +//========================================================================*/ + +#include +#include // IO macros + +#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) +{ + HAL_WRITE_UINT32 (CYGARC_HAL_LPC2XXX_REG_IO_BASE + + CYGARC_HAL_LPC2XXX_REG_IO0SET, (1 << 30)); + if (state) + HAL_WRITE_UINT32 (CYGARC_HAL_LPC2XXX_REG_IO_BASE + + CYGARC_HAL_LPC2XXX_REG_IO0CLR, (1 << 30)); +} + +//-------------------------------------------------------------------------- +// hal_lpc2xxx_set_leds -- +// +void +hal_lpc2xxx_set_leds (int mask) +{ + _led (mask & 1); +} + +//-------------------------------------------------------------------------- +// cyg_hal_plf_comms_init -- +// +void +cyg_hal_plf_comms_init (void) +{ + static int initialized = 0; + + if (initialized) + return; + initialized = 1; + + cyg_hal_plf_serial_init (); +} + +#ifdef HAL_PLF_HARDWARE_INIT +//-------------------------------------------------------------------------- +// hal_plf_hardware_init -- +// +void +hal_plf_hardware_init (void) +{ + // Currently, it does nothing +} +#endif // HAL_PLF_HARDWARE_INIT + +// indent: --indent-level4 -br -nut; vim: expandtab tabstop=4 shiftwidth=4 +//-------------------------------------------------------------------------- +// EOF olpch2294_misc.c Index: hal/arm/lpc2xxx/olpch2294/current/src/redboot_cmds.c =================================================================== RCS file: hal/arm/lpc2xxx/olpch2294/current/src/redboot_cmds.c diff -N hal/arm/lpc2xxx/olpch2294/current/src/redboot_cmds.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ hal/arm/lpc2xxx/olpch2294/current/src/redboot_cmds.c 23 Nov 2008 13:02:57 -0000 @@ -0,0 +1,114 @@ +//========================================================================== +// +// redboot_cmds.c +// +// OLPCH2294 [platform] specific RedBoot commands +// +//========================================================================== +//####ECOSGPLCOPYRIGHTBEGIN#### +// ------------------------------------------- +// This file is part of eCos, the Embedded Configurable Operating System. +// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. +// Copyright (C) 2008 eCosCentric Limited +// +// eCos is free software; you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free +// Software Foundation; either version 2 or (at your option) any later version. +// +// eCos is distributed in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or +// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +// for more details. +// +// You should have received a copy of the GNU General Public License along +// with eCos; if not, write to the Free Software Foundation, Inc., +// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. +// +// As a special exception, if other files instantiate templates or use macros +// or inline functions from this file, or you compile this file and link it +// with other works to produce a work based on this file, this file does not +// by itself cause the resulting work to be covered by the GNU General Public +// License. However the source code for this file must still be made available +// in accordance with section (3) of the GNU General Public License. +// +// This exception does not invalidate any other reasons why a work based on +// this file might be covered by the GNU General Public License. +// ------------------------------------------- +//####ECOSGPLCOPYRIGHTEND#### +//========================================================================== +//#####DESCRIPTIONBEGIN#### +// +// Author(s): Sergei Gavrikov +// Contributors: Sergei Gavrikov +// Date: 2008-08-31 +// Purpose: +// Description: +// +// This code is part of RedBoot (tm). +// +//####DESCRIPTIONEND#### +// +//========================================================================*/ + +#include +#include + +// CLI functions +static void do_echo (int argc, char *argv[]); +RedBoot_cmd ("echo", + "Outputs the args. If -n is specified, the trailing newline is suppressed.", + "-n [arg ...]", do_echo); + +static void do_led (int argc, char *argv[]); +RedBoot_cmd ("led", "Manage diagnostic led(s)", "[-m mask]", do_led); + +//-------------------------------------------------------------------------- +// do_echo -- +// +static void +do_echo (int argc, char *argv[]) +{ + bool newline = true; + if (argc > 1) { + int i = 1; + if (strncmp (&argv[i][0], "-n", 2) == 0) { + newline = false; + i++; + } + for (; i < argc; i++) { + diag_write_string (&argv[i][0]); + if ((argc - i) > 1) + diag_write_char (' '); + } + } + if (newline) + diag_write_char ('\n'); + return; +} + +//-------------------------------------------------------------------------- +// do_led -- +// +static void +do_led (int argc, char *argv[]) +{ + struct option_info opts[1]; + unsigned long mask; + bool mask_set; + + init_opts (&opts[0], 'm', true, OPTION_ARG_TYPE_NUM, + &mask, &mask_set, "mask"); + if (!scan_opts (argc, argv, 1, opts, 1, 0, 0, "")) { + return; + } + if (!mask_set) { + diag_printf ("led what ?\n"); + return; + } + hal_lpc2xxx_set_leds (mask); + return; +} + +// indent: --indent-level4 -br -nut; vim: expandtab tabstop=4 shiftwidth=4 +//-------------------------------------------------------------------------- +// EOF redboot_cmds.c