Basic imx infrastructure

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1693 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2009-04-09 22:53:18 +00:00
parent 2700dc12d4
commit 1dc7718dea
5 changed files with 70 additions and 12 deletions

View File

@ -0,0 +1,54 @@
############################################################################
# arch/arm/src/imx/Make.defs
#
# Copyright (C) 2009 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# 3. Neither the name NuttX nor the names of its contributors may be
# used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
############################################################################
HEAD_ASRC = up_head.S
CMN_ASRCS = up_cache.S up_fullcontextrestore.S up_saveusercontext.S \
up_vectors.S up_vectoraddrexcptn.S up_vectortab.S
CMN_CSRCS = up_assert.c up_blocktask.c up_copystate.c up_createstack.c \
up_dataabort.c up_mdelay.c up_udelay.c up_exit.c up_idle.c \
up_initialize.c up_initialstate.c up_interruptcontext.c \
up_prefetchabort.c up_releasepending.c up_releasestack.c \
up_reprioritizertr.c up_schedulesigaction.c \
up_sigdeliver.c up_syscall.c up_unblocktask.c \
up_undefinedinsn.c up_usestack.c
CHIP_ASRCS = #imx_lowputc.S imx_restart.S
CHIP_CSRCS = #imx_allocateheap.c imx_boot.c imx_decodeirq.c \
#imx_irq.c imx_serial.c imx_timerisr.c imx_framebuffer.c
ifeq ($(CONFIG_USBDEV),y)
CHIP_CSRCS += imx_usbdev.c
endif

View File

@ -74,9 +74,13 @@
/* Virtual Memory Map ***************************************************************/
#define IMX_SDRAM_VSECTION 0x00000000 /* -(+CONFIG_DRAM_SIZE) */
#define IMX_FLASH_VSECTION 0x80000000 /* -(+CONFIG_FLASH_SIZE) */
#define IMX_PERIPHERALS_VSECTION 0xe0000000 /* -0xe00fffff 1Mb */
/* We use a simple identity mapping. The MMU is really only used to control the
* D-cache
*/
#define IMX_PERIPHERALS_VSECTION 0x00200000 /* -0x002fffff 1Mb */
#define IMX_SDRAM_VSECTION 0x08000000 /* -(+CONFIG_DRAM_SIZE) */
#define IMX_FLASH_VSECTION 0x10000000 /* -(+CONFIG_FLASH_SIZE) */
/* Peripheral Register Offsets ******************************************************/
@ -157,7 +161,7 @@
* This offset reserves space for the MMU page cache.
*/
#define NUTTX_START_VBASE (IMX_SDRAM_VBASE+PGTABLE_SIZE)
#define NUTTX_START_VADDR (IMX_SDRAM_VSECTION+PGTABLE_SIZE)
/* Section MMU Flags */

View File

@ -160,7 +160,7 @@
#define UART2_UCR3_PARERREN (1 << 12) /* Bit 12: Parity Error Interrupt Enable */
#define UART2_UCR3_DTREN (1 << 13) /* Bit 13: Data Terminal Ready Interrupt Enable */
#define UART2_UCR3_DPEC_SHIFT 14 /* Bit 14-15: DTR Interrupt Edge Control */
#define UART2_UCR3_DPEC_SHIFT (0x03 << UART_UCR4_DPEC_SHIFT)
#define UART2_UCR3_DPEC_MASK (0x03 << UART_UCR4_DPEC_SHIFT)
/* UART Control Register 4 */

View File

@ -214,8 +214,8 @@
#define USBD_DADR_DADR_SHIFT 0 /* Bit 0-8: Desired RAM Address */
#define USBD_DADR_DADR_MASK (0x1ff << USBD_DADR_DADR_SHIFT)
#define USBD_DADR_BSY:1; (1 << 30) /* Bit 30: Busy */
#define USBD_DADR_CFG:1; (1 << 31) /* Bit 31: Configuration */
#define USBD_DADR_BSY (1 << 30) /* Bit 30: Busy */
#define USBD_DADR_CFG (1 << 31) /* Bit 31: Configuration */
/* USBD DDAT Register */

View File

@ -8,7 +8,7 @@ Toolchain
be modified to point to the correct path to the SH toolchain (if
different from the default).
If you have no SH toolchain, one can be downloaded from the NuttX
If you have no ARM toolchain, one can be downloaded from the NuttX
SourceForge download site (https://sourceforge.net/project/showfiles.php?group_id=189573).
1. You must have already configured Nuttx in <some-dir>nuttx.
@ -45,20 +45,20 @@ ARM/DM320-specific Configuration Options
CONFIG_ARCH_CHIP - Identifies the arch/*/chip subdirectory
CONFIG_ARCH_CHIP=c5471
CONFIG_ARCH_CHIP=dm320
CONFIG_ARCH_CHIP_name - For use in C code
CONFIG_ARCH_CHIP_C5471
CONFIG_ARCH_CHIP_DM320
CONFIG_ARCH_BOARD - Identifies the configs subdirectory and
hence, the board that supports the particular chip or SoC.
CONFIG_ARCH_BOARD=c5471evm (for the Spectrum Digital C5471 EVM)
CONFIG_ARCH_BOARD=ntosd-dm320
CONFIG_ARCH_BOARD_name - For use in C code
CONFIG_ARCH_BOARD_C5471EVM (for the Spectrum Digital C5471 EVM)
CONFIG_ARCH_BOARD_NTOSD_DM320 (for the Spectrum Digital C5471 EVM)
CONFIG_ARCH_LOOPSPERMSEC - Must be calibrated for correct operation
of delay loops