diff -r -u5 -N -x CVS -x '*~' -x '.#*' ecos/packages/ecos.db ecos-devo/packages/ecos.db --- ecos/packages/ecos.db 2005-08-25 08:40:35.000000000 -0500 +++ ecos-devo/packages/ecos.db 2005-11-10 22:34:40.578125000 -0600 @@ -4253,10 +4253,35 @@ description " The lpcmt target provides the packages needed to run eCos on the LPC-LPCMT evaluation board from Olimex." } +target iH1_proc_lpc_1 { + alias { "Hobby-Robotics iH1_proc_lpc_1 board " iH1_proc_lpc_1 } + packages { CYGPKG_HAL_ARM + CYGPKG_HAL_ARM_LPC2XXX + CYGPKG_HAL_ARM_LPC2XXX_IH1_PROC_LPC_1 + CYGPKG_IO_SERIAL_GENERIC_16X5X + CYGPKG_IO_SERIAL_ARM_LPC2XXX + CYGPKG_DEVICES_WATCHDOG_ARM_LPC2XXX + } + description " + The iH1_proc_lpc_1 target provides the packages needed to run eCos on the + iH1_proc_lpc_1 evaluation board from Hobby-Robotics." +} + +package CYGPKG_HAL_ARM_LPC2XXX_IH1_PROC_LPC_1 { + alias { "Hobby-Robotics board iH1_proc_lpc_1 " hal_iH1_proc_lpc_1_arm } + directory hal/arm/lpc2xxx/iH1_proc_lpc_1 + script hal_arm_lpc2xxx_iH1_proc_lpc_1.cdl + hardware + description " + The iH1_proc_lpc_1 HAL package provides the support needed to run eCos on an + the iH1_proc_lpc_1 board from Hobby-Robotics." +} + + target ebsa285 { alias { "Intel EBSA285 StrongARM board" ebsa } packages { CYGPKG_HAL_ARM CYGPKG_HAL_ARM_EBSA285 CYGPKG_IO_PCI diff -r -u5 -N -x CVS -x '*~' -x '.#*' ecos/packages/hal/arm/lpc2xxx/iH1_proc_lpc_1/current/ChangeLog ecos-devo/packages/hal/arm/lpc2xxx/iH1_proc_lpc_1/current/ChangeLog --- ecos/packages/hal/arm/lpc2xxx/iH1_proc_lpc_1/current/ChangeLog 1969-12-31 18:00:00.000000000 -0600 +++ ecos-devo/packages/hal/arm/lpc2xxx/iH1_proc_lpc_1/current/ChangeLog 2005-11-10 22:34:40.609375000 -0600 @@ -0,0 +1,50 @@ +2005-11-11 Pawel Wodnicki + * ChangeLog + * cdl/hal_arm_lpc2xxx_iH1_proc_lpc_1.cdl + * include/hal_platform_setup.h + * include/pkgconf + * include/plf_io.h + * include/pkgconf/mlt_arm_lpc2xxx_iH1_proc_lpc_1_rom.h + * include/pkgconf/mlt_arm_lpc2xxx_iH1_proc_lpc_1_rom.ldi + * include/pkgconf/mlt_arm_lpc2xxx_iH1_proc_lpc_1_rom_lpc2136.ldi + * include/pkgconf/mlt_arm_lpc2xxx_iH1_proc_lpc_1_rom_lpc2138.ldi + * include/pkgconf/mlt_arm_lpc2xxx_iH1_proc_lpc_1_rom_lpc2146.ldi + * include/pkgconf/mlt_arm_lpc2xxx_iH1_proc_lpc_1_rom_lpc2148.ldi + * src/iH1_proc_lpc_1.c + Added support for the Hobby-Robotics iH1-proc_lpc-1 board + lpc2136,lpc2138,lpc2146,lpc2148 + +//=========================================================================== +//####ECOSGPLCOPYRIGHTBEGIN#### +// ------------------------------------------- +// This file is part of eCos, the Embedded Configurable Operating System. +// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. +// Copyright (C) 2003 Nick Garnett +// Copyright (C) 2004 eCosCentric Limited +// Copyright (C) 2005 Pawel Wodnicki +// +// 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#### +//=========================================================================== diff -r -u5 -N -x CVS -x '*~' -x '.#*' ecos/packages/hal/arm/lpc2xxx/iH1_proc_lpc_1/current/cdl/hal_arm_lpc2xxx_iH1_proc_lpc_1.cdl ecos-devo/packages/hal/arm/lpc2xxx/iH1_proc_lpc_1/current/cdl/hal_arm_lpc2xxx_iH1_proc_lpc_1.cdl --- ecos/packages/hal/arm/lpc2xxx/iH1_proc_lpc_1/current/cdl/hal_arm_lpc2xxx_iH1_proc_lpc_1.cdl 1969-12-31 18:00:00.000000000 -0600 +++ ecos-devo/packages/hal/arm/lpc2xxx/iH1_proc_lpc_1/current/cdl/hal_arm_lpc2xxx_iH1_proc_lpc_1.cdl 2005-11-10 22:34:40.609375000 -0600 @@ -0,0 +1,279 @@ +# ==================================================================== +# +# hal_arm_lpc2xxx_iH1_proc_lpc_1.cdl +# +# ARM LPC2XXX iH1_proc_lpc_1 HAL package configuration data +# +# ==================================================================== +#####ECOSGPLCOPYRIGHTBEGIN#### +## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. +## Copyright (C) 2004 eCosCentric Limited +## Copyright (C) 2005 Pawel Wodnicki +## +## 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): Pawel Wodnicki elektrknight +# Contributors: +# Date: 2005-8-9 +# +#####DESCRIPTIONEND#### +# +# ==================================================================== + +cdl_package CYGPKG_HAL_ARM_LPC2XXX_IH1_PROC_LPC_1 { + display "Hobby-Robotics iH1_proc_lpc1_1 board HAL" + parent CYGPKG_HAL_ARM_LPC2XXX + define_header hal_arm_lpc2xxx_iH1_proc_lpc_1.h + include_dir cyg/hal + hardware + description " + The IH1_PROC_LPC_1 HAL package provides the support needed to run + eCos on an Hobby-Robotics iH1_proc_lpc_1 board." + + compile iH1_proc_lpc_1.c + + requires { CYGHWR_HAL_ARM_LPC2XXX == "LPC2136" || CYGHWR_HAL_ARM_LPC2XXX == "LPC2138" || CYGHWR_HAL_ARM_LPC2XXX == "LPC2146" || CYGHWR_HAL_ARM_LPC2XXX == "LPC2148" } + + 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_system_header "#define CYGBLD_HAL_ARM_VAR_IO_H" + puts $::cdl_header "#define HAL_PLATFORM_CPU \"ARM7TDMI-S\"" + puts $::cdl_header "#define HAL_PLATFORM_BOARD \"Hobby-Robotics LPC2XXX/IH1_PROC_LPC_1\"" + puts $::cdl_header "#define HAL_PLATFORM_EXTRA \"\"" + } + + cdl_component CYG_HAL_STARTUP { + display "Startup type" + flavor data + default_value {"ROM"} + legal_values {"ROM"} + no_define + define -file system.h CYG_HAL_STARTUP + description " + Only ROM startup allowed because of limited amount of RAM." + } + + cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS { + display "Number of communication channels on the board" + flavor data + calculated 2 + } + + 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 " + The iH1_proc_lpc_1 board has two serial ports. This option + chooses which port will be used to connect to a host + running GDB." + } + + 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 0 + description " + The iH1_proc_lpc_1 board has two serial ports. This option + chooses which port will be used for diagnostic output." + } + + 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 "XTAL frequency Fosc" + flavor data + default_value {12000000} + } + + cdl_option CYGNUM_HAL_ARM_LPC2XXX_PLL_MUL { + display "PLL multiplier M" + 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-unknown-elf" } + 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 -mno-short-load-words -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority" } + 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 -mno-short-load-words -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 + default_value 1 + no_define + description "This option enables the conversion of the Redboot ELF + image to a binary image suitable for ROM programming." + + make -priority 325 { + /bin/redboot.bin : /bin/redboot.elf + $(OBJCOPY) --strip-debug $< $(@:.bin=.img) + $(OBJCOPY) -O srec $< $(@:.bin=.srec) + $(OBJCOPY) -O binary $< $@ + } + + } + } + + cdl_component CYGHWR_MEMORY_LAYOUT { + display "Memory layout" + flavor data + no_define + calculated { "arm_lpc2xxx_iH1_proc_lpc_1_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 { CYGHWR_HAL_ARM_LPC2XXX == "LPC2136" ? "" :\ + CYGHWR_HAL_ARM_LPC2XXX == "LPC2138" ? "" :\ + CYGHWR_HAL_ARM_LPC2XXX == "LPC2146" ? "" :\ + CYGHWR_HAL_ARM_LPC2XXX == "LPC2148" ? "" :\ + ""} + } + + cdl_option CYGHWR_MEMORY_LAYOUT_H { + display "Memory layout header file" + flavor data + no_define + define -file system.h CYGHWR_MEMORY_LAYOUT_H + calculated { "" } + } + } +} diff -r -u5 -N -x CVS -x '*~' -x '.#*' ecos/packages/hal/arm/lpc2xxx/iH1_proc_lpc_1/current/include/hal_platform_setup.h ecos-devo/packages/hal/arm/lpc2xxx/iH1_proc_lpc_1/current/include/hal_platform_setup.h --- ecos/packages/hal/arm/lpc2xxx/iH1_proc_lpc_1/current/include/hal_platform_setup.h 1969-12-31 18:00:00.000000000 -0600 +++ ecos-devo/packages/hal/arm/lpc2xxx/iH1_proc_lpc_1/current/include/hal_platform_setup.h 2005-11-10 22:34:40.625000000 -0600 @@ -0,0 +1,168 @@ +#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) 2004 eCosCentric Limited +// Copyright (C) 2005 Pawel Wodnicki +// +// 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): elektrknight +// Contributors: +// Date: 2005-8-9 +// Purpose: LPC2XXX/iH1_proc_lpc_1 platform specific support routines +// Adopted from MCB2100 BSP by jani +// Description: +// Usage: #include +// +//####DESCRIPTIONEND#### +// +//===========================================================================*/ + +#include +#include + +//===========================================================================*/ + + .macro _IO_pin_init + ldr r0,=CYGARC_HAL_LPC2XXX_REG_IO_BASE + ldr r1,=0x00FF0000 //GPIO1 pins 16..23 outputs + str r1,[r0,#CYGARC_HAL_LPC2XXX_REG_IO1DIR] + .endm + + .macro _out_pin x + ldr r0,=CYGARC_HAL_LPC2XXX_REG_IO_BASE + ldr r1,=0x00FF0000 + str r1,[r0,#CYGARC_HAL_LPC2XXX_REG_IO1CLR] + ldr r1,=(\x<<16) + str r1,[r0,#CYGARC_HAL_LPC2XXX_REG_IO1SET] + .endm + + .macro _pll_init + ldr r0,=CYGARC_HAL_LPC2XXX_REG_SCB_BASE + + mov r2,#0xAA + mov r3,#0x55 + + mov r1,#1 // enable PLL + 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] + + str r2,[r0,#CYGARC_HAL_LPC2XXX_REG_PLLFEED] // update PLL registers + str r3,[r0,#CYGARC_HAL_LPC2XXX_REG_PLLFEED] + +1: + ldr r1,[r0,#CYGARC_HAL_LPC2XXX_REG_PLLSTAT] // wait for it to lock + ands r1,r1,#(1<<10) + beq 1b + + mov r1,#3 // connect PLL + str r1,[r0,#CYGARC_HAL_LPC2XXX_REG_PLLCON] + + str r2,[r0,#CYGARC_HAL_LPC2XXX_REG_PLLFEED] // update PLL registers + str r3,[r0,#CYGARC_HAL_LPC2XXX_REG_PLLFEED] + + .endm + + .macro _mem_init + mov r0,#0 // copy first 64 bytes of flash to RAM + 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 flash (1) or RAM(2) + str r1, [r0,#CYGARC_HAL_LPC2XXX_REG_MEMMAP] + mov r1,#4 + str r1,[r0,#CYGARC_HAL_LPC2XXX_REG_MAMTIM] // flash timings + mov r1,#2 + str r1,[r0,#CYGARC_HAL_LPC2XXX_REG_MAMCR] // enable full MAM + .endm + + .macro _gpio_init + //enable RX and TX on both UARTs, EINT1, 0x20050005 + //enable RX and TX on both UARTs, + ldr r0,=CYGARC_HAL_LPC2XXX_REG_PIN_BASE + ldr r1,=0x00050005 + str r1,[r0,#CYGARC_HAL_LPC2XXX_REG_PINSEL0] + + // configure P0.31 as output + ldr r0,=CYGARC_HAL_LPC2XXX_REG_IO_BASE + ldr r1,=0x80000000 //GPIO0 pin 31 output + str r1,[r0,#CYGARC_HAL_LPC2XXX_REG_IO0DIR] + str r1,[r0,#CYGARC_HAL_LPC2XXX_REG_IO0CLR] // turn on LED + .endm + +//===========================================================================*/ + +#if defined(CYG_HAL_STARTUP_ROM) + + + .macro _setup + + _pll_init + + _mem_init + + _gpio_init + +// _IO_pin_init // do not do this for now PW + + .endm + +#define CYGSEM_HAL_ROM_RESET_USES_JUMP + +#else + + .macro _setup + .endm + +#endif + +#define PLATFORM_SETUP1 _setup + +//----------------------------------------------------------------------------- +// end of hal_platform_setup.h +#endif // CYGONCE_HAL_PLATFORM_SETUP_H diff -r -u5 -N -x CVS -x '*~' -x '.#*' ecos/packages/hal/arm/lpc2xxx/iH1_proc_lpc_1/current/include/pkgconf/mlt_arm_lpc2xxx_iH1_proc_lpc_1_rom.h ecos-devo/packages/hal/arm/lpc2xxx/iH1_proc_lpc_1/current/include/pkgconf/mlt_arm_lpc2xxx_iH1_proc_lpc_1_rom.h --- ecos/packages/hal/arm/lpc2xxx/iH1_proc_lpc_1/current/include/pkgconf/mlt_arm_lpc2xxx_iH1_proc_lpc_1_rom.h 1969-12-31 18:00:00.000000000 -0600 +++ ecos-devo/packages/hal/arm/lpc2xxx/iH1_proc_lpc_1/current/include/pkgconf/mlt_arm_lpc2xxx_iH1_proc_lpc_1_rom.h 2005-11-10 22:34:40.625000000 -0600 @@ -0,0 +1,33 @@ +// eCos memory layout + +#ifndef __ASSEMBLER__ +#include +#include +#endif + +#define CYGMEM_REGION_ram (0x40000000) +#define CYGMEM_REGION_ram_SIZE (0x00008000) +#define CYGMEM_REGION_ram_ATTR (CYGMEM_REGION_ATTR_R | CYGMEM_REGION_ATTR_W) + +#if defined(CYGHWR_HAL_ARM_LPC2XXX_LPC2146) || \ + defined(CYGHWR_HAL_ARM_LPC2XXX_LPC2148) +#define CYGMEM_REGION_usb_dma_ram (0x7FD00000) +#define CYGMEM_REGION_usb_dma_ram_SIZE (0x00002000) +#define CYGMEM_REGION_usb_dma_ram_ATTR (CYGMEM_REGION_ATTR_R | CYGMEM_REGION_ATTR_W) +#endif + +#define CYGMEM_REGION_rom (0x00000000) +#if defined(CYGHWR_HAL_ARM_LPC2XXX_LPC2136) || \ + defined(CYGHWR_HAL_ARM_LPC2XXX_LPC2146) +#define CYGMEM_REGION_rom_SIZE (0x00040000) +#endif +#if defined(CYGHWR_HAL_ARM_LPC2XXX_LPC2138) || \ + defined(CYGHWR_HAL_ARM_LPC2XXX_LPC2148) +#define CYGMEM_REGION_rom_SIZE (0x00080000) +#endif +#define CYGMEM_REGION_rom_ATTR (CYGMEM_REGION_ATTR_R) +#ifndef __ASSEMBLER__ +extern char CYG_LABEL_NAME (__heap1) []; +#endif +#define CYGMEM_SECTION_heap1 (CYG_LABEL_NAME (__heap1)) +#define CYGMEM_SECTION_heap1_SIZE (0x40004000 - (size_t) CYG_LABEL_NAME (__heap1)) diff -r -u5 -N -x CVS -x '*~' -x '.#*' ecos/packages/hal/arm/lpc2xxx/iH1_proc_lpc_1/current/include/pkgconf/mlt_arm_lpc2xxx_iH1_proc_lpc_1_rom.ldi ecos-devo/packages/hal/arm/lpc2xxx/iH1_proc_lpc_1/current/include/pkgconf/mlt_arm_lpc2xxx_iH1_proc_lpc_1_rom.ldi --- ecos/packages/hal/arm/lpc2xxx/iH1_proc_lpc_1/current/include/pkgconf/mlt_arm_lpc2xxx_iH1_proc_lpc_1_rom.ldi 1969-12-31 18:00:00.000000000 -0600 +++ ecos-devo/packages/hal/arm/lpc2xxx/iH1_proc_lpc_1/current/include/pkgconf/mlt_arm_lpc2xxx_iH1_proc_lpc_1_rom.ldi 2005-11-10 22:34:40.640625000 -0600 @@ -0,0 +1,28 @@ +// eCos memory layout + +#include + +MEMORY +{ + ram : ORIGIN = 0x40000000, LENGTH = 0x8000 + rom : ORIGIN = 0x00000000, LENGTH = 0x80000 + usb_dma_ram : ORIGIN = 0x7FD00000, LENGTH = 0x2000 +} + +SECTIONS +{ + SECTIONS_BEGIN + SECTION_rom_vectors (rom, 0x00000000, LMA_EQ_VMA) + SECTION_text (rom, ALIGN (0x1), 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 (ram, 0x40000400, LMA_EQ_VMA) + SECTION_data (ram, ALIGN(0x4), FOLLOWING(.gcc_except_table)) + SECTION_bss (ram, ALIGN (0x4), LMA_EQ_VMA) + usb_dma_ram 0x7FD00000 : { *(.usb_dma_ram)} > usb_dma_ram + CYG_LABEL_DEFN(__heap1) = ALIGN (0x8); + SECTIONS_END +} diff -r -u5 -N -x CVS -x '*~' -x '.#*' ecos/packages/hal/arm/lpc2xxx/iH1_proc_lpc_1/current/include/pkgconf/mlt_arm_lpc2xxx_iH1_proc_lpc_1_rom_lpc2136.ldi ecos-devo/packages/hal/arm/lpc2xxx/iH1_proc_lpc_1/current/include/pkgconf/mlt_arm_lpc2xxx_iH1_proc_lpc_1_rom_lpc2136.ldi --- ecos/packages/hal/arm/lpc2xxx/iH1_proc_lpc_1/current/include/pkgconf/mlt_arm_lpc2xxx_iH1_proc_lpc_1_rom_lpc2136.ldi 1969-12-31 18:00:00.000000000 -0600 +++ ecos-devo/packages/hal/arm/lpc2xxx/iH1_proc_lpc_1/current/include/pkgconf/mlt_arm_lpc2xxx_iH1_proc_lpc_1_rom_lpc2136.ldi 2005-11-10 22:34:40.640625000 -0600 @@ -0,0 +1,26 @@ +// eCos memory layout + +#include + +MEMORY +{ + ram : ORIGIN = 0x40000000, LENGTH = 0x8000 + rom : ORIGIN = 0x00000000, LENGTH = 0x40000 +} + +SECTIONS +{ + SECTIONS_BEGIN + SECTION_rom_vectors (rom, 0x00000000, LMA_EQ_VMA) + SECTION_text (rom, ALIGN (0x1), 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 (ram, 0x40000400, LMA_EQ_VMA) + SECTION_data (ram, ALIGN(0x4), FOLLOWING(.gcc_except_table)) + SECTION_bss (ram, ALIGN (0x4), LMA_EQ_VMA) + CYG_LABEL_DEFN(__heap1) = ALIGN (0x8); + SECTIONS_END +} diff -r -u5 -N -x CVS -x '*~' -x '.#*' ecos/packages/hal/arm/lpc2xxx/iH1_proc_lpc_1/current/include/pkgconf/mlt_arm_lpc2xxx_iH1_proc_lpc_1_rom_lpc2138.ldi ecos-devo/packages/hal/arm/lpc2xxx/iH1_proc_lpc_1/current/include/pkgconf/mlt_arm_lpc2xxx_iH1_proc_lpc_1_rom_lpc2138.ldi --- ecos/packages/hal/arm/lpc2xxx/iH1_proc_lpc_1/current/include/pkgconf/mlt_arm_lpc2xxx_iH1_proc_lpc_1_rom_lpc2138.ldi 1969-12-31 18:00:00.000000000 -0600 +++ ecos-devo/packages/hal/arm/lpc2xxx/iH1_proc_lpc_1/current/include/pkgconf/mlt_arm_lpc2xxx_iH1_proc_lpc_1_rom_lpc2138.ldi 2005-11-10 22:34:40.656250000 -0600 @@ -0,0 +1,26 @@ +// eCos memory layout + +#include + +MEMORY +{ + ram : ORIGIN = 0x40000000, LENGTH = 0x8000 + rom : ORIGIN = 0x00000000, LENGTH = 0x80000 +} + +SECTIONS +{ + SECTIONS_BEGIN + SECTION_rom_vectors (rom, 0x00000000, LMA_EQ_VMA) + SECTION_text (rom, ALIGN (0x1), 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 (ram, 0x40000400, LMA_EQ_VMA) + SECTION_data (ram, ALIGN(0x4), FOLLOWING(.gcc_except_table)) + SECTION_bss (ram, ALIGN (0x4), LMA_EQ_VMA) + CYG_LABEL_DEFN(__heap1) = ALIGN (0x8); + SECTIONS_END +} diff -r -u5 -N -x CVS -x '*~' -x '.#*' ecos/packages/hal/arm/lpc2xxx/iH1_proc_lpc_1/current/include/pkgconf/mlt_arm_lpc2xxx_iH1_proc_lpc_1_rom_lpc2146.ldi ecos-devo/packages/hal/arm/lpc2xxx/iH1_proc_lpc_1/current/include/pkgconf/mlt_arm_lpc2xxx_iH1_proc_lpc_1_rom_lpc2146.ldi --- ecos/packages/hal/arm/lpc2xxx/iH1_proc_lpc_1/current/include/pkgconf/mlt_arm_lpc2xxx_iH1_proc_lpc_1_rom_lpc2146.ldi 1969-12-31 18:00:00.000000000 -0600 +++ ecos-devo/packages/hal/arm/lpc2xxx/iH1_proc_lpc_1/current/include/pkgconf/mlt_arm_lpc2xxx_iH1_proc_lpc_1_rom_lpc2146.ldi 2005-11-10 22:34:40.656250000 -0600 @@ -0,0 +1,29 @@ +// eCos memory layout + +#include + +MEMORY +{ + ram : ORIGIN = 0x40000000, LENGTH = 0x8000 + rom : ORIGIN = 0x00000000, LENGTH = 0x40000 + usb_dma_ram : ORIGIN = 0x7FD00000, LENGTH = 0x2000 +} + +SECTIONS +{ + SECTIONS_BEGIN + SECTION_rom_vectors (rom, 0x00000000, LMA_EQ_VMA) + SECTION_text (rom, ALIGN (0x1), 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 (ram, 0x40000400, LMA_EQ_VMA) + SECTION_data (ram, ALIGN(0x4), FOLLOWING(.gcc_except_table)) + SECTION_bss (ram, ALIGN (0x4), LMA_EQ_VMA) + SECTION_bss1 (usb_dma_ram, ALIGN (0x4), LMA_EQ_VMA) + usb_dma_ram 0x7FD00000 : { *(.usb_dma_ram)} > usb_dma_ram + CYG_LABEL_DEFN(__heap1) = ALIGN (0x8); + SECTIONS_END +} diff -r -u5 -N -x CVS -x '*~' -x '.#*' ecos/packages/hal/arm/lpc2xxx/iH1_proc_lpc_1/current/include/pkgconf/mlt_arm_lpc2xxx_iH1_proc_lpc_1_rom_lpc2148.ldi ecos-devo/packages/hal/arm/lpc2xxx/iH1_proc_lpc_1/current/include/pkgconf/mlt_arm_lpc2xxx_iH1_proc_lpc_1_rom_lpc2148.ldi --- ecos/packages/hal/arm/lpc2xxx/iH1_proc_lpc_1/current/include/pkgconf/mlt_arm_lpc2xxx_iH1_proc_lpc_1_rom_lpc2148.ldi 1969-12-31 18:00:00.000000000 -0600 +++ ecos-devo/packages/hal/arm/lpc2xxx/iH1_proc_lpc_1/current/include/pkgconf/mlt_arm_lpc2xxx_iH1_proc_lpc_1_rom_lpc2148.ldi 2005-11-10 22:34:40.671875000 -0600 @@ -0,0 +1,28 @@ +// eCos memory layout + +#include + +MEMORY +{ + ram : ORIGIN = 0x40000000, LENGTH = 0x8000 + rom : ORIGIN = 0x00000000, LENGTH = 0x80000 + usb_dma_ram : ORIGIN = 0x7FD00000, LENGTH = 0x2000 +} + +SECTIONS +{ + SECTIONS_BEGIN + SECTION_rom_vectors (rom, 0x00000000, LMA_EQ_VMA) + SECTION_text (rom, ALIGN (0x1), 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 (ram, 0x40000400, LMA_EQ_VMA) + SECTION_data (ram, ALIGN(0x4), FOLLOWING(.gcc_except_table)) + SECTION_bss (ram, ALIGN (0x4), LMA_EQ_VMA) + .usb_dma_ram 0x7FD00000 : { *(.usb_dma_ram)} > usb_dma_ram + CYG_LABEL_DEFN(__heap1) = ALIGN (0x8); + SECTIONS_END +} diff -r -u5 -N -x CVS -x '*~' -x '.#*' ecos/packages/hal/arm/lpc2xxx/iH1_proc_lpc_1/current/include/plf_io.h ecos-devo/packages/hal/arm/lpc2xxx/iH1_proc_lpc_1/current/include/plf_io.h --- ecos/packages/hal/arm/lpc2xxx/iH1_proc_lpc_1/current/include/plf_io.h 1969-12-31 18:00:00.000000000 -0600 +++ ecos-devo/packages/hal/arm/lpc2xxx/iH1_proc_lpc_1/current/include/plf_io.h 2005-11-10 22:34:40.671875000 -0600 @@ -0,0 +1,64 @@ +#ifndef CYGONCE_HAL_PLF_IO_H +#define CYGONCE_HAL_PLF_IO_H +//============================================================================= +// +// plf_io.h +// +// iH1_proc_lpc_1 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) 2004 eCosCentric Limited +// Copyright (C) 2005 Pawel Wodnicki +// +// 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): Pawel Wodnicki elektrknight +// Contributors: +// Date: +// Purpose: Inventi iH1_proc_lpc_1 board specific registers +// Adopted from MCB2100 BSP by jani +// Description: +// Usage: #include +// +//####DESCRIPTIONEND#### +// +//============================================================================= +// On-chip device base addresses + +//----------------------------------------------------------------------------- +// Memory map is 1-1 + +#define CYGARC_PHYSICAL_ADDRESS(_x_) (_x_) + +//----------------------------------------------------------------------------- +// end of plf_io.h +#endif // CYGONCE_HAL_PLF_IO_H diff -r -u5 -N -x CVS -x '*~' -x '.#*' ecos/packages/hal/arm/lpc2xxx/iH1_proc_lpc_1/current/src/iH1_proc_lpc_1.c ecos-devo/packages/hal/arm/lpc2xxx/iH1_proc_lpc_1/current/src/iH1_proc_lpc_1.c --- ecos/packages/hal/arm/lpc2xxx/iH1_proc_lpc_1/current/src/iH1_proc_lpc_1.c 1969-12-31 18:00:00.000000000 -0600 +++ ecos-devo/packages/hal/arm/lpc2xxx/iH1_proc_lpc_1/current/src/iH1_proc_lpc_1.c 2005-11-10 22:34:40.687500000 -0600 @@ -0,0 +1,82 @@ +/*========================================================================== +// +// iH1_proc_lpc_1.c +// +// HAL board support code for Hobby-Robotics.pl iH1_proc_lpc_1 +// +//========================================================================== +//####ECOSGPLCOPYRIGHTBEGIN#### +// ------------------------------------------- +// This file is part of eCos, the Embedded Configurable Operating System. +// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. +// Copyright (C) 2004 eCosCentric Limited +// Copyright (C) 2005 Pawel Wodnicki +// +// 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): Pawel Wodnicki elektrknight +// Contributors: +// Date: 2005-8-9 +// Purpose: HAL board support +// Description: Implementations of HAL board interfaces +// +//####DESCRIPTIONEND#### +// +//========================================================================*/ +#include +#include // IO macros + +#include // base types +#include + +extern void cyg_hal_plf_serial_init(void); + +void +cyg_hal_plf_comms_init(void) +{ + static int initialized = 0; + + if (initialized) + return; + initialized = 1; + + cyg_hal_plf_serial_init(); +} + +void hal_lpc2xxx_set_leds(int mask) +{ + if ( mask != 0 ) { + HAL_WRITE_UINT32(CYGARC_HAL_LPC2XXX_REG_IO_BASE + + CYGARC_HAL_LPC2XXX_REG_IO0SET, 0x80000000); + } else { + HAL_WRITE_UINT32(CYGARC_HAL_LPC2XXX_REG_IO_BASE + + CYGARC_HAL_LPC2XXX_REG_IO0CLR, 0x80000000); + } +} +//-------------------------------------------------------------------------- +// EOF diff -r -u5 -N -x CVS -x '*~' -x '.#*' ecos/packages/hal/arm/lpc2xxx/var/current/cdl/hal_arm_lpc2xxx.cdl ecos-devo/packages/hal/arm/lpc2xxx/var/current/cdl/hal_arm_lpc2xxx.cdl --- ecos/packages/hal/arm/lpc2xxx/var/current/cdl/hal_arm_lpc2xxx.cdl 2004-11-14 08:12:44.000000000 -0600 +++ ecos-devo/packages/hal/arm/lpc2xxx/var/current/cdl/hal_arm_lpc2xxx.cdl 2005-11-10 22:34:40.593750000 -0600 @@ -77,11 +77,11 @@ display "LPC2XXX variant used" flavor data default_value {"LPC210x"} legal_values {"LPC210x" "LPC2114" "LPC2119" "LPC2124" "LPC2129" "LPC2132" - "LPC2138" "LPC2194" "LPC2212" "LPC2214" "LPC2290" + "LPC2136" "LPC2138" "LPC2146" "LPC2148" "LPC2194" "LPC2212" "LPC2214" "LPC2290" "LPC2292" "LPC2294"} description "The LPC2XXX microcontroller family has several variants, the main differences being the amount of on-chip RAM, flash and peripherals. This option allows diff -r -u5 -N -x CVS -x '*~' -x '.#*' ecos/packages/hal/arm/lpc2xxx/var/current/include/hal_diag.h ecos-devo/packages/hal/arm/lpc2xxx/var/current/include/hal_diag.h --- ecos/packages/hal/arm/lpc2xxx/var/current/include/hal_diag.h 2004-11-14 08:12:44.000000000 -0600 +++ ecos-devo/packages/hal/arm/lpc2xxx/var/current/include/hal_diag.h 2005-11-10 22:34:40.593750000 -0600 @@ -50,22 +50,24 @@ // //####DESCRIPTIONEND#### // //============================================================================= +#include #include +#include +#include #include #include #define HAL_DIAG_INIT() hal_if_diag_init() #define HAL_DIAG_WRITE_CHAR(_c_) hal_if_diag_write_char(_c_) #define HAL_DIAG_READ_CHAR(_c_) hal_if_diag_read_char(&_c_) //----------------------------------------------------------------------------- -// LED externC void hal_diag_led(int mask); externC void hal_lpc2xxx_set_leds(int mask); //----------------------------------------------------------------------------- diff -r -u5 -N -x CVS -x '*~' -x '.#*' ecos/packages/hal/arm/lpc2xxx/var/current/include/var_io.h ecos-devo/packages/hal/arm/lpc2xxx/var/current/include/var_io.h --- ecos/packages/hal/arm/lpc2xxx/var/current/include/var_io.h 2004-11-14 08:12:44.000000000 -0600 +++ ecos-devo/packages/hal/arm/lpc2xxx/var/current/include/var_io.h 2005-11-10 22:34:40.593750000 -0600 @@ -38,14 +38,14 @@ //####ECOSGPLCOPYRIGHTEND#### //============================================================================= //#####DESCRIPTIONBEGIN#### // // Author(s): jlarmour -// Contributors: +// Contributors: elektrknight // Date: 2004-07-23 // Purpose: Philips LPC2xxx variant specific registers -// Description: +// Description: // Usage: #include // //####DESCRIPTIONEND#### // //============================================================================= @@ -458,10 +458,38 @@ #define CYGARC_HAL_LPC2XXX_REG_PLLSTAT_PLLE 0x100 // (1<<8) #define CYGARC_HAL_LPC2XXX_REG_PLLSTAT_PLLC 0x200 // (1<<9) #define CYGARC_HAL_LPC2XXX_REG_PLLSTAT_PLOCK 0x400 // (1<<10) #define CYGARC_HAL_LPC2XXX_REG_PLLFEED 0x008C +#if defined(CYGHWR_HAL_ARM_LPC2XXX_LPC214x) || \ + defined(CYGHWR_HAL_ARM_LPC2XXX_LPC2146) || \ + defined(CYGHWR_HAL_ARM_LPC2XXX_LPC2148) + +// PLL0 alternative to PLL +#define CYGARC_HAL_LPC2XXX_REG_PLL0CON CYGARC_HAL_LPC2XXX_REG_PLLCON +#define CYGARC_HAL_LPC2XXX_REG_PLL0CON_PLLE CYGARC_HAL_LPC2XXX_REG_PLLCON_PLLE +#define CYGARC_HAL_LPC2XXX_REG_PLL0CON_PLLC CYGARC_HAL_LPC2XXX_REG_PLLCON_PLLC +#define CYGARC_HAL_LPC2XXX_REG_PLL0CFG CYGARC_HAL_LPC2XXX_REG_PLLCFG +#define CYGARC_HAL_LPC2XXX_REG_PLL0STAT CYGARC_HAL_LPC2XXX_REG_PLLSTAT +#define CYGARC_HAL_LPC2XXX_REG_PLL0STAT_PLLE CYGARC_HAL_LPC2XXX_REG_PLLSTAT_PLLE +#define CYGARC_HAL_LPC2XXX_REG_PLL0STAT_PLLC CYGARC_HAL_LPC2XXX_REG_PLLSTAT_PLLC +#define CYGARC_HAL_LPC2XXX_REG_PLL0STAT_PLOCK CYGARC_HAL_LPC2XXX_REG_PLLSTAT_PLOCK +#define CYGARC_HAL_LPC2XXX_REG_PLL0FEED CYGARC_HAL_LPC2XXX_REG_PLLFEED + +// PLL1 +#define CYGARC_HAL_LPC2XXX_REG_PLL1CON 0x00A0 +#define CYGARC_HAL_LPC2XXX_REG_PLL1CON_PLLE (1<<0) +#define CYGARC_HAL_LPC2XXX_REG_PLL1CON_PLLC (1<<1) +#define CYGARC_HAL_LPC2XXX_REG_PLL1CFG 0x00A4 +#define CYGARC_HAL_LPC2XXX_REG_PLL1STAT 0x00A8 +#define CYGARC_HAL_LPC2XXX_REG_PLL1STAT_PLLE 0x100 // (1<<8) +#define CYGARC_HAL_LPC2XXX_REG_PLL1STAT_PLLC 0x200 // (1<<9) +#define CYGARC_HAL_LPC2XXX_REG_PLL1STAT_PLOCK 0x400 // (1<<10) +#define CYGARC_HAL_LPC2XXX_REG_PLL1FEED 0x00AC + +#endif + // Power Control #define CYGARC_HAL_LPC2XXX_REG_PCON 0x00C0 #define CYGARC_HAL_LPC2XXX_REG_PCON_IDL (1<<0) #define CYGARC_HAL_LPC2XXX_REG_PCON_PD (1<<1) #define CYGARC_HAL_LPC2XXX_REG_PCONP 0x00C4 @@ -488,11 +516,75 @@ #define CYGARC_HAL_LPC2XXX_REG_EXTxxx_INT0 (1<<0) #define CYGARC_HAL_LPC2XXX_REG_EXTxxx_INT1 (1<<1) #define CYGARC_HAL_LPC2XXX_REG_EXTxxx_INT2 (1<<2) #define CYGARC_HAL_LPC2XXX_REG_EXTxxx_INT3 (1<<3) +// USB Registers +#if defined(CYGHWR_HAL_ARM_LPC2XXX_LPC214x) || \ + defined(CYGHWR_HAL_ARM_LPC2XXX_LPC2146) || \ + defined(CYGHWR_HAL_ARM_LPC2XXX_LPC2148) + +//Device interrupt registers +#define CYGARC_HAL_LPC2XXX_REG_USBINTST 0xE01FC1C0 + + +#define CYGARC_HAL_LPC2XXX_REG_USB_BASE 0xE0090000 + +#define CYGARC_HAL_LPC2XXX_REG_DEVINTST 0x0000 +#define CYGARC_HAL_LPC2XXX_REG_DEVINTEN 0x0004 +#define CYGARC_HAL_LPC2XXX_REG_DEVINTCLR 0x0008 +#define CYGARC_HAL_LPC2XXX_REG_DEVINTSET 0x000C +#define CYGARC_HAL_LPC2XXX_REG_DEVINTPRI 0x002C + +//Endpoint interrupt registers +#define CYGARC_HAL_LPC2XXX_REG_EPINTST 0x0030 +#define CYGARC_HAL_LPC2XXX_REG_EPINTEN 0x0034 +#define CYGARC_HAL_LPC2XXX_REG_EPINTCLR 0x0038 +#define CYGARC_HAL_LPC2XXX_REG_EPINTSET 0x003C +#define CYGARC_HAL_LPC2XXX_REG_EPINTPRI 0x0040 + +//Endpoint realization registers +#define CYGARC_HAL_LPC2XXX_REG_REEP 0x0044 +#define CYGARC_HAL_LPC2XXX_REG_EPIND 0x0048 +#define CYGARC_HAL_LPC2XXX_REG_MAXPSIZE 0x004C + +//USB transfer registers +#define CYGARC_HAL_LPC2XXX_REG_RXDATA 0x0018 +#define CYGARC_HAL_LPC2XXX_REG_RXPLEN 0x0020 +#define CYGARC_HAL_LPC2XXX_REG_TXDATA 0x001C +#define CYGARC_HAL_LPC2XXX_REG_TXPLEN 0x0024 +#define CYGARC_HAL_LPC2XXX_REG_CTRL 0x0028 + +//Command registers +#define CYGARC_HAL_LPC2XXX_REG_CMDCODE 0x0010 +#define CYGARC_HAL_LPC2XXX_REG_CMDDATA 0x0014 + +//DMA registers (LPC2146/8 only) +#if defined(CYGHWR_HAL_ARM_LPC2XXX_LPC2146) || \ + defined(CYGHWR_HAL_ARM_LPC2XXX_LPC2148) + +#define CYGARC_HAL_LPC2XXX_REG_DMARST 0x0050 +#define CYGARC_HAL_LPC2XXX_REG_DMARCLR 0x0054 +#define CYGARC_HAL_LPC2XXX_REG_DMARSET 0x0058 +#define CYGARC_HAL_LPC2XXX_REG_UDCAH 0x0080 +#define CYGARC_HAL_LPC2XXX_REG_EPDMAST 0x0084 +#define CYGARC_HAL_LPC2XXX_REG_EPDMAEN 0x0088 +#define CYGARC_HAL_LPC2XXX_REG_EPDMADIS 0x008C +#define CYGARC_HAL_LPC2XXX_REG_DMAINTST 0x0090 +#define CYGARC_HAL_LPC2XXX_REG_DMAINTEN 0x0094 +#define CYGARC_HAL_LPC2XXX_REG_EOTINTST 0x00A0 +#define CYGARC_HAL_LPC2XXX_REG_EOTINTCLR 0x00A4 +#define CYGARC_HAL_LPC2XXX_REG_EOTINTSET 0x00A8 +#define CYGARC_HAL_LPC2XXX_REG_NDDRINTST 0x00AC +#define CYGARC_HAL_LPC2XXX_REG_NDDRINTCLR 0x00B0 +#define CYGARC_HAL_LPC2XXX_REG_NDDRINTSET 0x00B4 +#define CYGARC_HAL_LPC2XXX_REG_SYSERRINTST 0x00B8 +#define CYGARC_HAL_LPC2XXX_REG_SYSERRINTCLR 0x00BC +#define CYGARC_HAL_LPC2XXX_REG_SYSERRINTSET 0x00C0 +#endif +#endif //============================================================================= // External Memory Controller #if defined(CYGHWR_HAL_ARM_LPC2XXX_LPC2212) || \ defined(CYGHWR_HAL_ARM_LPC2XXX_LPC2214)