MISOC LM32: configs/misoc board support for testing
This commit is contained in:
parent
1787a8143e
commit
19f5a5f49d
4
configs/misoc/Kconfig
Normal file
4
configs/misoc/Kconfig
Normal file
@ -0,0 +1,4 @@
|
||||
#
|
||||
# For a description of the syntax of this configuration file,
|
||||
# see the file kconfig-language.txt in the NuttX tools repository.
|
||||
#
|
101
configs/misoc/hello/Make.defs
Normal file
101
configs/misoc/hello/Make.defs
Normal file
@ -0,0 +1,101 @@
|
||||
############################################################################
|
||||
# configs/misoc/hello/Make.defs
|
||||
#
|
||||
# Copyright (C) 2016 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
# Ramtin Amin <keytwo@gmail.com>
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
include ${TOPDIR}/.config
|
||||
include ${TOPDIR}/tools/Config.mk
|
||||
CROSSDEV = lm32-elf-
|
||||
|
||||
LDSCRIPT = ld.script
|
||||
|
||||
ifeq ($(WINTOOL),y)
|
||||
# Windows-native toolchains
|
||||
DIRLINK = $(TOPDIR)/tools/copydir.sh
|
||||
DIRUNLINK = $(TOPDIR)/tools/unlink.sh
|
||||
MKDEP = $(TOPDIR)/tools/mkwindeps.sh
|
||||
ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}"
|
||||
ARCHXXINCLUDES = $(ARCHINCLUDES) "${shell cygpath -w $(TOPDIR)/include/cxx}"
|
||||
ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)}"
|
||||
else
|
||||
# Linux/Cygwin-native toolchain
|
||||
MKDEP = $(TOPDIR)/tools/mkdeps$(HOSTEXEEXT)
|
||||
ARCHINCLUDES = -I. -isystem "$(TOPDIR)/include"
|
||||
ARCHXXINCLUDES = $(ARCHINCLUDES) -isystem "$(TOPDIR)/include/cxx"
|
||||
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD_CUSTOM_NAME)/scripts/$(LDSCRIPT)
|
||||
endif
|
||||
|
||||
CC = $(CROSSDEV)gcc
|
||||
CXX = $(CROSSDEV)g++
|
||||
CPP = $(CROSSDEV)gcc -E
|
||||
LD = $(CROSSDEV)ld
|
||||
AR = $(CROSSDEV)ar rcs
|
||||
NM = $(CROSSDEV)nm
|
||||
OBJCOPY = $(CROSSDEV)objcopy
|
||||
OBJDUMP = $(CROSSDEV)objdump
|
||||
|
||||
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
|
||||
ARCHOPTIMIZATION = -g
|
||||
endif
|
||||
|
||||
ifneq ($(CONFIG_DEBUG_NOOPT),y)
|
||||
ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer
|
||||
endif
|
||||
|
||||
ARCHCFLAGS = -fno-builtin
|
||||
ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new
|
||||
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef
|
||||
ARCHWARNINGSXX = -Wall -Wshadow -Wundef
|
||||
ARCHDEFINES =
|
||||
|
||||
CFLAGS = $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe
|
||||
CXXFLAGS = $(ARCHCXXFLAGS) $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe
|
||||
CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS)
|
||||
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
|
||||
AFLAGS = $(CFLAGS) -D__ASSEMBLY__
|
||||
|
||||
NXFLATLDFLAGS1 = -r -d -warn-common
|
||||
NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-gotoff.ld -no-check-sections
|
||||
LDNXFLATFLAGS = -e main -s 2048
|
||||
|
||||
ASMEXT = .S
|
||||
OBJEXT = .o
|
||||
LIBEXT = .a
|
||||
EXEEXT =
|
||||
|
||||
|
||||
HOSTCC = gcc
|
||||
HOSTINCLUDES = -I.
|
||||
HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -g -pipe
|
||||
HOSTLDFLAGS =
|
609
configs/misoc/hello/defconfig
Normal file
609
configs/misoc/hello/defconfig
Normal file
@ -0,0 +1,609 @@
|
||||
#
|
||||
# Automatically generated file; DO NOT EDIT.
|
||||
# Nuttx/ Configuration
|
||||
#
|
||||
|
||||
#
|
||||
# Build Setup
|
||||
#
|
||||
# CONFIG_EXPERIMENTAL is not set
|
||||
CONFIG_DEFAULT_SMALL=y
|
||||
CONFIG_HOST_LINUX=y
|
||||
# CONFIG_HOST_OSX is not set
|
||||
# CONFIG_HOST_WINDOWS is not set
|
||||
# CONFIG_HOST_OTHER is not set
|
||||
|
||||
#
|
||||
# Build Configuration
|
||||
#
|
||||
# CONFIG_APPS_DIR="../apps"
|
||||
CONFIG_BUILD_FLAT=y
|
||||
# CONFIG_BUILD_2PASS is not set
|
||||
|
||||
#
|
||||
# Binary Output Formats
|
||||
#
|
||||
# CONFIG_RRLOAD_BINARY is not set
|
||||
# CONFIG_INTELHEX_BINARY is not set
|
||||
# CONFIG_MOTOROLA_SREC is not set
|
||||
CONFIG_RAW_BINARY=y
|
||||
# CONFIG_UBOOT_UIMAGE is not set
|
||||
|
||||
#
|
||||
# Customize Header Files
|
||||
#
|
||||
# CONFIG_ARCH_STDINT_H is not set
|
||||
# CONFIG_ARCH_STDBOOL_H is not set
|
||||
# CONFIG_ARCH_MATH_H is not set
|
||||
# CONFIG_ARCH_FLOAT_H is not set
|
||||
# CONFIG_ARCH_STDARG_H is not set
|
||||
# CONFIG_ARCH_DEBUG_H is not set
|
||||
|
||||
#
|
||||
# Debug Options
|
||||
#
|
||||
CONFIG_DEBUG_ALERT=y
|
||||
CONFIG_DEBUG_FEATURES=y
|
||||
|
||||
#
|
||||
# Debug SYSLOG Output Controls
|
||||
#
|
||||
# CONFIG_DEBUG_ERROR is not set
|
||||
# CONFIG_DEBUG_ASSERTIONS is not set
|
||||
|
||||
#
|
||||
# Subsystem Debug Options
|
||||
#
|
||||
# CONFIG_DEBUG_BINFMT is not set
|
||||
# CONFIG_DEBUG_FS is not set
|
||||
# CONFIG_DEBUG_GRAPHICS is not set
|
||||
# CONFIG_DEBUG_LIB is not set
|
||||
# CONFIG_DEBUG_MM is not set
|
||||
# CONFIG_DEBUG_SCHED is not set
|
||||
|
||||
#
|
||||
# OS Function Debug Options
|
||||
#
|
||||
# CONFIG_DEBUG_IRQ is not set
|
||||
|
||||
#
|
||||
# Driver Debug Options
|
||||
#
|
||||
# CONFIG_DEBUG_GPIO is not set
|
||||
# CONFIG_DEBUG_TIMER is not set
|
||||
# CONFIG_ARCH_HAVE_STACKCHECK is not set
|
||||
# CONFIG_ARCH_HAVE_HEAPCHECK is not set
|
||||
CONFIG_DEBUG_SYMBOLS=y
|
||||
# CONFIG_ARCH_HAVE_CUSTOMOPT is not set
|
||||
CONFIG_DEBUG_NOOPT=y
|
||||
# CONFIG_DEBUG_FULLOPT is not set
|
||||
|
||||
#
|
||||
# System Type
|
||||
#
|
||||
# CONFIG_ARCH_ARM is not set
|
||||
# CONFIG_ARCH_AVR is not set
|
||||
# CONFIG_ARCH_HC is not set
|
||||
# CONFIG_ARCH_MIPS is not set
|
||||
CONFIG_ARCH_MISOC=y
|
||||
# CONFIG_ARCH_RGMP is not set
|
||||
# CONFIG_ARCH_RENESAS is not set
|
||||
# CONFIG_ARCH_SIM is not set
|
||||
# CONFIG_ARCH_X86 is not set
|
||||
# CONFIG_ARCH_Z16 is not set
|
||||
# CONFIG_ARCH_Z80 is not set
|
||||
CONFIG_ARCH="misoc"
|
||||
CONFIG_ARCH_CHIP="lm32"
|
||||
CONFIG_ARCH_CHIP_LM32=y
|
||||
# CONFIG_ARCH_CHIP_MOR1K is not set
|
||||
|
||||
#
|
||||
# Architecture Options
|
||||
#
|
||||
# CONFIG_ARCH_NOINTC is not set
|
||||
# CONFIG_ARCH_VECNOTIRQ is not set
|
||||
# CONFIG_ARCH_DMA is not set
|
||||
# CONFIG_ARCH_HAVE_IRQPRIO is not set
|
||||
# CONFIG_ARCH_L2CACHE is not set
|
||||
# CONFIG_ARCH_HAVE_COHERENT_DCACHE is not set
|
||||
# CONFIG_ARCH_HAVE_ADDRENV is not set
|
||||
# CONFIG_ARCH_NEED_ADDRENV_MAPPING is not set
|
||||
# CONFIG_ARCH_HAVE_MULTICPU is not set
|
||||
# CONFIG_ARCH_HAVE_VFORK is not set
|
||||
# CONFIG_ARCH_HAVE_MMU is not set
|
||||
# CONFIG_ARCH_HAVE_MPU is not set
|
||||
# CONFIG_ARCH_NAND_HWECC is not set
|
||||
# CONFIG_ARCH_HAVE_EXTCLK is not set
|
||||
# CONFIG_ARCH_HAVE_POWEROFF is not set
|
||||
# CONFIG_ARCH_HAVE_RESET is not set
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
# CONFIG_ENDIAN_BIG is not set
|
||||
# CONFIG_ARCH_IDLE_CUSTOM is not set
|
||||
# CONFIG_ARCH_HAVE_RAMFUNCS is not set
|
||||
# CONFIG_ARCH_HAVE_RAMVECTORS is not set
|
||||
|
||||
#
|
||||
# Board Settings
|
||||
#
|
||||
CONFIG_BOARD_LOOPSPERMSEC=800
|
||||
# CONFIG_ARCH_CALIBRATION is not set
|
||||
|
||||
#
|
||||
# Interrupt options
|
||||
#
|
||||
# CONFIG_ARCH_HAVE_INTERRUPTSTACK is not set
|
||||
# CONFIG_ARCH_HAVE_HIPRI_INTERRUPT is not set
|
||||
|
||||
#
|
||||
# Boot options
|
||||
#
|
||||
# CONFIG_BOOT_RUNFROMEXTSRAM is not set
|
||||
CONFIG_BOOT_RUNFROMFLASH=y
|
||||
# CONFIG_BOOT_RUNFROMISRAM is not set
|
||||
# CONFIG_BOOT_RUNFROMSDRAM is not set
|
||||
# CONFIG_BOOT_COPYTORAM is not set
|
||||
|
||||
#
|
||||
# Boot Memory Configuration
|
||||
#
|
||||
CONFIG_RAM_START=0x40000000
|
||||
CONFIG_RAM_SIZE=524288
|
||||
# CONFIG_ARCH_HAVE_SDRAM is not set
|
||||
|
||||
#
|
||||
# Board Selection
|
||||
#
|
||||
CONFIG_ARCH_BOARD_CUSTOM=y
|
||||
|
||||
#
|
||||
# Custom Board Configuration
|
||||
#
|
||||
CONFIG_ARCH_BOARD_CUSTOM_NAME="misoc"
|
||||
CONFIG_ARCH_BOARD_CUSTOM_DIR="/configs/misoc/"
|
||||
CONFIG_ARCH_BOARD_CUSTOM_DIR_RELPATH=y
|
||||
# CONFIG_BOARD_CUSTOM_LEDS is not set
|
||||
# CONFIG_BOARD_CUSTOM_BUTTONS is not set
|
||||
|
||||
#
|
||||
# Common Board Options
|
||||
#
|
||||
|
||||
#
|
||||
# Board-Specific Options
|
||||
#
|
||||
# CONFIG_BOARD_CRASHDUMP is not set
|
||||
# CONFIG_LIB_BOARDCTL is not set
|
||||
|
||||
#
|
||||
# RTOS Features
|
||||
#
|
||||
CONFIG_DISABLE_OS_API=y
|
||||
CONFIG_DISABLE_POSIX_TIMERS=y
|
||||
CONFIG_DISABLE_PTHREAD=y
|
||||
CONFIG_DISABLE_SIGNALS=y
|
||||
CONFIG_DISABLE_MQUEUE=y
|
||||
CONFIG_DISABLE_ENVIRON=y
|
||||
|
||||
#
|
||||
# Clocks and Timers
|
||||
#
|
||||
CONFIG_USEC_PER_TICK=10000
|
||||
# CONFIG_SYSTEM_TIME64 is not set
|
||||
# CONFIG_CLOCK_MONOTONIC is not set
|
||||
# CONFIG_ARCH_HAVE_TIMEKEEPING is not set
|
||||
# CONFIG_JULIAN_TIME is not set
|
||||
CONFIG_START_YEAR=2011
|
||||
CONFIG_START_MONTH=6
|
||||
CONFIG_START_DAY=16
|
||||
CONFIG_MAX_WDOGPARMS=2
|
||||
CONFIG_PREALLOC_WDOGS=4
|
||||
CONFIG_WDOG_INTRESERVE=0
|
||||
CONFIG_PREALLOC_TIMERS=0
|
||||
|
||||
#
|
||||
# Tasks and Scheduling
|
||||
#
|
||||
# CONFIG_INIT_NONE is not set
|
||||
CONFIG_INIT_ENTRYPOINT=y
|
||||
# CONFIG_INIT_FILEPATH is not set
|
||||
CONFIG_USER_ENTRYPOINT="hello_main"
|
||||
CONFIG_RR_INTERVAL=0
|
||||
# CONFIG_SCHED_SPORADIC is not set
|
||||
CONFIG_TASK_NAME_SIZE=0
|
||||
CONFIG_MAX_TASKS=4
|
||||
# CONFIG_SCHED_HAVE_PARENT is not set
|
||||
# CONFIG_SCHED_WAITPID is not set
|
||||
|
||||
#
|
||||
# Performance Monitoring
|
||||
#
|
||||
# CONFIG_SCHED_CPULOAD is not set
|
||||
# CONFIG_SCHED_INSTRUMENTATION is not set
|
||||
|
||||
#
|
||||
# Files and I/O
|
||||
#
|
||||
CONFIG_DEV_CONSOLE=y
|
||||
# CONFIG_FDCLONE_DISABLE is not set
|
||||
# CONFIG_FDCLONE_STDIO is not set
|
||||
CONFIG_SDCLONE_DISABLE=y
|
||||
CONFIG_NFILE_DESCRIPTORS=4
|
||||
CONFIG_NFILE_STREAMS=4
|
||||
CONFIG_NAME_MAX=32
|
||||
# CONFIG_PRIORITY_INHERITANCE is not set
|
||||
|
||||
#
|
||||
# RTOS hooks
|
||||
#
|
||||
# CONFIG_BOARD_INITIALIZE is not set
|
||||
# CONFIG_SCHED_STARTHOOK is not set
|
||||
# CONFIG_SCHED_ATEXIT is not set
|
||||
# CONFIG_SCHED_ONEXIT is not set
|
||||
# CONFIG_MODULE is not set
|
||||
|
||||
#
|
||||
# Work queue support
|
||||
#
|
||||
|
||||
#
|
||||
# Stack and heap information
|
||||
#
|
||||
CONFIG_IDLETHREAD_STACKSIZE=512
|
||||
CONFIG_USERMAIN_STACKSIZE=512
|
||||
CONFIG_PTHREAD_STACK_MIN=256
|
||||
CONFIG_PTHREAD_STACK_DEFAULT=1024
|
||||
# CONFIG_LIB_SYSCALL is not set
|
||||
|
||||
#
|
||||
# Device Drivers
|
||||
#
|
||||
CONFIG_DISABLE_POLL=y
|
||||
CONFIG_DEV_NULL=y
|
||||
# CONFIG_DEV_ZERO is not set
|
||||
# CONFIG_DEV_URANDOM is not set
|
||||
# CONFIG_DEV_LOOP is not set
|
||||
|
||||
#
|
||||
# Buffering
|
||||
#
|
||||
# CONFIG_DRVR_WRITEBUFFER is not set
|
||||
# CONFIG_DRVR_READAHEAD is not set
|
||||
# CONFIG_RAMDISK is not set
|
||||
# CONFIG_CAN is not set
|
||||
# CONFIG_ARCH_HAVE_PWM_PULSECOUNT is not set
|
||||
# CONFIG_ARCH_HAVE_PWM_MULTICHAN is not set
|
||||
# CONFIG_PWM is not set
|
||||
# CONFIG_ARCH_HAVE_I2CRESET is not set
|
||||
# CONFIG_I2C is not set
|
||||
# CONFIG_SPI is not set
|
||||
# CONFIG_I2S is not set
|
||||
|
||||
#
|
||||
# Timer Driver Support
|
||||
#
|
||||
# CONFIG_TIMER is not set
|
||||
# CONFIG_ONESHOT is not set
|
||||
# CONFIG_RTC is not set
|
||||
# CONFIG_WATCHDOG is not set
|
||||
# CONFIG_ANALOG is not set
|
||||
# CONFIG_AUDIO_DEVICES is not set
|
||||
# CONFIG_VIDEO_DEVICES is not set
|
||||
# CONFIG_BCH is not set
|
||||
# CONFIG_INPUT is not set
|
||||
|
||||
#
|
||||
# IO Expander/GPIO Support
|
||||
#
|
||||
# CONFIG_IOEXPANDER is not set
|
||||
# CONFIG_DEV_GPIO is not set
|
||||
|
||||
#
|
||||
# LCD Driver Support
|
||||
#
|
||||
# CONFIG_LCD is not set
|
||||
# CONFIG_SLCD is not set
|
||||
|
||||
#
|
||||
# LED Support
|
||||
#
|
||||
# CONFIG_RGBLED is not set
|
||||
# CONFIG_PCA9635PW is not set
|
||||
# CONFIG_NCP5623C is not set
|
||||
# CONFIG_MMCSD is not set
|
||||
# CONFIG_MODEM is not set
|
||||
# CONFIG_MTD is not set
|
||||
# CONFIG_EEPROM is not set
|
||||
# CONFIG_PIPES is not set
|
||||
# CONFIG_PM is not set
|
||||
# CONFIG_POWER is not set
|
||||
# CONFIG_SENSORS is not set
|
||||
# CONFIG_SERCOMM_CONSOLE is not set
|
||||
CONFIG_SERIAL=y
|
||||
CONFIG_DEV_LOWCONSOLE=y
|
||||
# CONFIG_SERIAL_REMOVABLE is not set
|
||||
# CONFIG_SERIAL_CONSOLE is not set
|
||||
# CONFIG_16550_UART is not set
|
||||
# CONFIG_UART_SERIALDRIVER is not set
|
||||
# CONFIG_UART0_SERIALDRIVER is not set
|
||||
# CONFIG_UART1_SERIALDRIVER is not set
|
||||
# CONFIG_UART2_SERIALDRIVER is not set
|
||||
# CONFIG_UART3_SERIALDRIVER is not set
|
||||
# CONFIG_UART4_SERIALDRIVER is not set
|
||||
# CONFIG_UART5_SERIALDRIVER is not set
|
||||
# CONFIG_UART6_SERIALDRIVER is not set
|
||||
# CONFIG_UART7_SERIALDRIVER is not set
|
||||
# CONFIG_UART8_SERIALDRIVER is not set
|
||||
# CONFIG_SCI0_SERIALDRIVER is not set
|
||||
# CONFIG_SCI1_SERIALDRIVER is not set
|
||||
# CONFIG_USART0_SERIALDRIVER is not set
|
||||
# CONFIG_USART1_SERIALDRIVER is not set
|
||||
# CONFIG_USART2_SERIALDRIVER is not set
|
||||
# CONFIG_USART3_SERIALDRIVER is not set
|
||||
# CONFIG_USART4_SERIALDRIVER is not set
|
||||
# CONFIG_USART5_SERIALDRIVER is not set
|
||||
# CONFIG_USART6_SERIALDRIVER is not set
|
||||
# CONFIG_USART7_SERIALDRIVER is not set
|
||||
# CONFIG_USART8_SERIALDRIVER is not set
|
||||
# CONFIG_OTHER_UART_SERIALDRIVER is not set
|
||||
# CONFIG_MCU_SERIAL is not set
|
||||
# CONFIG_SERIAL_IFLOWCONTROL is not set
|
||||
# CONFIG_SERIAL_OFLOWCONTROL is not set
|
||||
# CONFIG_SERIAL_DMA is not set
|
||||
# CONFIG_ARCH_HAVE_SERIAL_TERMIOS is not set
|
||||
# CONFIG_PSEUDOTERM is not set
|
||||
# CONFIG_USBDEV is not set
|
||||
# CONFIG_USBHOST is not set
|
||||
# CONFIG_HAVE_USBTRACE is not set
|
||||
# CONFIG_DRIVERS_WIRELESS is not set
|
||||
# CONFIG_DRIVERS_CONTACTLESS is not set
|
||||
|
||||
#
|
||||
# System Logging
|
||||
#
|
||||
# CONFIG_ARCH_SYSLOG is not set
|
||||
# CONFIG_RAMLOG is not set
|
||||
# CONFIG_SYSLOG_INTBUFFER is not set
|
||||
# CONFIG_SYSLOG_TIMESTAMP is not set
|
||||
# CONFIG_SYSLOG_SERIAL_CONSOLE is not set
|
||||
# CONFIG_SYSLOG_CHAR is not set
|
||||
CONFIG_SYSLOG_CONSOLE=y
|
||||
# CONFIG_SYSLOG_NONE is not set
|
||||
# CONFIG_SYSLOG_FILE is not set
|
||||
# CONFIG_SYSLOG_CHARDEV is not set
|
||||
|
||||
#
|
||||
# Networking Support
|
||||
#
|
||||
# CONFIG_ARCH_HAVE_NET is not set
|
||||
# CONFIG_ARCH_HAVE_PHY is not set
|
||||
# CONFIG_NET is not set
|
||||
|
||||
#
|
||||
# Crypto API
|
||||
#
|
||||
# CONFIG_CRYPTO is not set
|
||||
|
||||
#
|
||||
# File Systems
|
||||
#
|
||||
|
||||
#
|
||||
# File system configuration
|
||||
#
|
||||
CONFIG_DISABLE_MOUNTPOINT=y
|
||||
CONFIG_DISABLE_PSEUDOFS_OPERATIONS=y
|
||||
# CONFIG_FS_READABLE is not set
|
||||
# CONFIG_FS_WRITABLE is not set
|
||||
# CONFIG_FS_NAMED_SEMAPHORES is not set
|
||||
# CONFIG_FS_RAMMAP is not set
|
||||
# CONFIG_FS_PROCFS is not set
|
||||
# CONFIG_FS_UNIONFS is not set
|
||||
|
||||
#
|
||||
# Graphics Support
|
||||
#
|
||||
# CONFIG_NX is not set
|
||||
|
||||
#
|
||||
# Memory Management
|
||||
#
|
||||
CONFIG_MM_SMALL=y
|
||||
CONFIG_MM_REGIONS=1
|
||||
# CONFIG_ARCH_HAVE_HEAP2 is not set
|
||||
# CONFIG_GRAN is not set
|
||||
|
||||
#
|
||||
# Audio Support
|
||||
#
|
||||
# CONFIG_AUDIO is not set
|
||||
|
||||
#
|
||||
# Wireless Support
|
||||
#
|
||||
|
||||
#
|
||||
# Binary Loader
|
||||
#
|
||||
# CONFIG_BINFMT_DISABLE is not set
|
||||
# CONFIG_NXFLAT is not set
|
||||
# CONFIG_ELF is not set
|
||||
# CONFIG_BUILTIN is not set
|
||||
# CONFIG_PIC is not set
|
||||
# CONFIG_SYMTAB_ORDEREDBYNAME is not set
|
||||
|
||||
#
|
||||
# Library Routines
|
||||
#
|
||||
|
||||
#
|
||||
# Standard C Library Options
|
||||
#
|
||||
CONFIG_STDIO_BUFFER_SIZE=0
|
||||
CONFIG_STDIO_LINEBUFFER=y
|
||||
CONFIG_NUNGET_CHARS=0
|
||||
# CONFIG_LIBM is not set
|
||||
# CONFIG_NOPRINTF_FIELDWIDTH is not set
|
||||
# CONFIG_LIBC_FLOATINGPOINT is not set
|
||||
# CONFIG_LIBC_LONG_LONG is not set
|
||||
# CONFIG_LIBC_IOCTL_VARIADIC is not set
|
||||
CONFIG_LIB_RAND_ORDER=1
|
||||
# CONFIG_EOL_IS_CR is not set
|
||||
# CONFIG_EOL_IS_LF is not set
|
||||
# CONFIG_EOL_IS_BOTH_CRLF is not set
|
||||
CONFIG_EOL_IS_EITHER_CRLF=y
|
||||
# CONFIG_LIBC_EXECFUNCS is not set
|
||||
CONFIG_POSIX_SPAWN_PROXY_STACKSIZE=1024
|
||||
CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE=2048
|
||||
# CONFIG_LIBC_STRERROR is not set
|
||||
# CONFIG_LIBC_PERROR_STDOUT is not set
|
||||
CONFIG_ARCH_LOWPUTC=y
|
||||
# CONFIG_TIME_EXTENDED is not set
|
||||
CONFIG_LIB_SENDFILE_BUFSIZE=512
|
||||
# CONFIG_ARCH_ROMGETC is not set
|
||||
# CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set
|
||||
# CONFIG_ARCH_HAVE_TLS is not set
|
||||
# CONFIG_LIBC_NETDB is not set
|
||||
|
||||
#
|
||||
# Non-standard Library Support
|
||||
#
|
||||
# CONFIG_LIB_CRC64_FAST is not set
|
||||
# CONFIG_LIB_KBDCODEC is not set
|
||||
# CONFIG_LIB_SLCDCODEC is not set
|
||||
# CONFIG_LIB_HEX2BIN is not set
|
||||
|
||||
#
|
||||
# Basic CXX Support
|
||||
#
|
||||
# CONFIG_C99_BOOL8 is not set
|
||||
# CONFIG_HAVE_CXX is not set
|
||||
|
||||
#
|
||||
# Application Configuration
|
||||
#
|
||||
|
||||
#
|
||||
# CAN Utilities
|
||||
#
|
||||
|
||||
#
|
||||
# Examples
|
||||
#
|
||||
# CONFIG_EXAMPLES_CHAT is not set
|
||||
# CONFIG_EXAMPLES_CONFIGDATA is not set
|
||||
# CONFIG_EXAMPLES_DHCPD is not set
|
||||
# CONFIG_EXAMPLES_ELF is not set
|
||||
# CONFIG_EXAMPLES_FTPC is not set
|
||||
# CONFIG_EXAMPLES_FTPD is not set
|
||||
CONFIG_EXAMPLES_HELLO=y
|
||||
CONFIG_EXAMPLES_HELLO_PRIORITY=100
|
||||
CONFIG_EXAMPLES_HELLO_STACKSIZE=2048
|
||||
# CONFIG_EXAMPLES_HIDKBD is not set
|
||||
# CONFIG_EXAMPLES_IGMP is not set
|
||||
# CONFIG_EXAMPLES_JSON is not set
|
||||
# CONFIG_EXAMPLES_KEYPADTEST is not set
|
||||
# CONFIG_EXAMPLES_MEDIA is not set
|
||||
# CONFIG_EXAMPLES_MM is not set
|
||||
# CONFIG_EXAMPLES_MODBUS is not set
|
||||
# CONFIG_EXAMPLES_MOUNT is not set
|
||||
# CONFIG_EXAMPLES_NRF24L01TERM is not set
|
||||
# CONFIG_EXAMPLES_NSH is not set
|
||||
# CONFIG_EXAMPLES_NULL is not set
|
||||
# CONFIG_EXAMPLES_NXFFS is not set
|
||||
# CONFIG_EXAMPLES_NXHELLO is not set
|
||||
# CONFIG_EXAMPLES_NXIMAGE is not set
|
||||
# CONFIG_EXAMPLES_NX is not set
|
||||
# CONFIG_EXAMPLES_NXLINES is not set
|
||||
# CONFIG_EXAMPLES_NXTERM is not set
|
||||
# CONFIG_EXAMPLES_NXTEXT is not set
|
||||
# CONFIG_EXAMPLES_OSTEST is not set
|
||||
# CONFIG_EXAMPLES_PCA9635 is not set
|
||||
# CONFIG_EXAMPLES_POSIXSPAWN is not set
|
||||
# CONFIG_EXAMPLES_PPPD is not set
|
||||
# CONFIG_EXAMPLES_RFID_READUID is not set
|
||||
# CONFIG_EXAMPLES_RGBLED is not set
|
||||
# CONFIG_EXAMPLES_RGMP is not set
|
||||
# CONFIG_EXAMPLES_SENDMAIL is not set
|
||||
# CONFIG_EXAMPLES_SERIALBLASTER is not set
|
||||
# CONFIG_EXAMPLES_SERIALRX is not set
|
||||
# CONFIG_EXAMPLES_SERLOOP is not set
|
||||
# CONFIG_EXAMPLES_SLCD is not set
|
||||
# CONFIG_EXAMPLES_SMART is not set
|
||||
# CONFIG_EXAMPLES_SMP is not set
|
||||
# CONFIG_EXAMPLES_TCPECHO is not set
|
||||
# CONFIG_EXAMPLES_TELNETD is not set
|
||||
# CONFIG_EXAMPLES_TIFF is not set
|
||||
# CONFIG_EXAMPLES_TOUCHSCREEN is not set
|
||||
# CONFIG_EXAMPLES_USBTERM is not set
|
||||
# CONFIG_EXAMPLES_WATCHDOG is not set
|
||||
# CONFIG_EXAMPLES_WEBSERVER is not set
|
||||
|
||||
#
|
||||
# File System Utilities
|
||||
#
|
||||
# CONFIG_FSUTILS_INIFILE is not set
|
||||
|
||||
#
|
||||
# GPS Utilities
|
||||
#
|
||||
# CONFIG_GPSUTILS_MINMEA_LIB is not set
|
||||
|
||||
#
|
||||
# Graphics Support
|
||||
#
|
||||
# CONFIG_TIFF is not set
|
||||
# CONFIG_GRAPHICS_TRAVELER is not set
|
||||
|
||||
#
|
||||
# Interpreters
|
||||
#
|
||||
# CONFIG_INTERPRETERS_FICL is not set
|
||||
# CONFIG_INTERPRETERS_MICROPYTHON is not set
|
||||
# CONFIG_INTERPRETERS_MINIBASIC is not set
|
||||
# CONFIG_INTERPRETERS_PCODE is not set
|
||||
|
||||
#
|
||||
# FreeModBus
|
||||
#
|
||||
# CONFIG_MODBUS is not set
|
||||
|
||||
#
|
||||
# Network Utilities
|
||||
#
|
||||
# CONFIG_NETUTILS_CODECS is not set
|
||||
# CONFIG_NETUTILS_ESP8266 is not set
|
||||
# CONFIG_NETUTILS_FTPC is not set
|
||||
# CONFIG_NETUTILS_JSON is not set
|
||||
# CONFIG_NETUTILS_SMTP is not set
|
||||
|
||||
#
|
||||
# NSH Library
|
||||
#
|
||||
# CONFIG_NSH_LIBRARY is not set
|
||||
|
||||
#
|
||||
# NxWidgets/NxWM
|
||||
#
|
||||
|
||||
#
|
||||
# Platform-specific Support
|
||||
#
|
||||
# CONFIG_PLATFORM_CONFIGDATA is not set
|
||||
|
||||
#
|
||||
# System Libraries and NSH Add-Ons
|
||||
#
|
||||
# CONFIG_SYSTEM_CLE is not set
|
||||
# CONFIG_SYSTEM_CUTERM is not set
|
||||
# CONFIG_SYSTEM_FREE is not set
|
||||
# CONFIG_SYSTEM_HEX2BIN is not set
|
||||
# CONFIG_SYSTEM_HEXED is not set
|
||||
# CONFIG_SYSTEM_INSTALL is not set
|
||||
# CONFIG_SYSTEM_RAMTEST is not set
|
||||
# CONFIG_READLINE_HAVE_EXTMATCH is not set
|
||||
# CONFIG_SYSTEM_READLINE is not set
|
||||
# CONFIG_SYSTEM_SUDOKU is not set
|
||||
# CONFIG_SYSTEM_TEE is not set
|
||||
# CONFIG_SYSTEM_UBLOXMODEM is not set
|
||||
# CONFIG_SYSTEM_VI is not set
|
||||
# CONFIG_SYSTEM_ZMODEM is not set
|
64
configs/misoc/hello/setenv.sh
Normal file
64
configs/misoc/hello/setenv.sh
Normal file
@ -0,0 +1,64 @@
|
||||
#!/bin/bash
|
||||
# configs/amber/hello/setenv.sh
|
||||
#
|
||||
# Copyright (C) 2016 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
# Ramtin Amin <keytwo@gmail.com>
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
if [ "$_" = "$0" ] ; then
|
||||
echo "You must source this script, not run it!" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
WD=`pwd`
|
||||
if [ ! -x "setenv.sh" ]; then
|
||||
echo "This script must be executed from the top-level NuttX build directory"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "${PATH_ORIG}" ]; then
|
||||
export PATH_ORIG="${PATH}"
|
||||
fi
|
||||
|
||||
# This is the Cygwin path to the location where I installed the WinAVR
|
||||
# toolchain under windows. This is *not* the default install
|
||||
# location so you will probably have to edit this. You will also have
|
||||
# to edit this if you install the Linux AVR toolchain as well
|
||||
#export TOOLCHAIN_BIN="/cygdrive/c/WinAVR/bin"
|
||||
|
||||
# This is the Cygwin path to the location where I build the buildroot
|
||||
# toolchain.
|
||||
#export TOOLCHAIN_BIN="${WD}/../buildroot/build_avr/staging_dir/bin"
|
||||
|
||||
# Add the path to the toolchain to the PATH varialble
|
||||
#export PATH="${TOOLCHAIN_BIN}:/sbin:/usr/sbin:${PATH_ORIG}"
|
||||
|
||||
echo "PATH : ${PATH}"
|
100
configs/misoc/include/board.h
Normal file
100
configs/misoc/include/board.h
Normal file
@ -0,0 +1,100 @@
|
||||
/****************************************************************************
|
||||
* configs/misoc/include/board.h
|
||||
*
|
||||
* Copyright (C) 2016 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
* Ramtin Amin <keytwo@gmail.com>
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __CONFIGS_AMBER_INCLUDE_BOARD_H
|
||||
#define __CONFIGS_AMBER_INCLUDE_BOARD_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* Clocking *****************************************************************/
|
||||
/* Assume default CLKDIV8 fuse setting is overridden to CLKDIV1 */
|
||||
|
||||
#define BOARD_XTAL_FREQ 14745600 /* 14.7456MHz crystal */
|
||||
#define BOARD_CPU_CLOCK BOARD_XTAL_FREQ /* F_CPU = 14.7456MHz */
|
||||
#define BOARD_TOSCK_CLOCK 32768 /* TOSC = 32.768KHz */
|
||||
|
||||
/* LED definitions **********************************************************/
|
||||
/* The Amber Web Server has a reset switch and four LEDs. The LEDs indicate
|
||||
* the status of power, programming state, Ethernet link status and reset
|
||||
* status (Active). None are available for software use.
|
||||
*/
|
||||
|
||||
#define LED_STARTED 0
|
||||
#define LED_HEAPALLOCATE 1
|
||||
#define LED_IRQSENABLED 2
|
||||
#define LED_STACKCREATED 3
|
||||
#define LED_INIRQ 4
|
||||
#define LED_SIGNAL 5
|
||||
#define LED_ASSERTION 6
|
||||
#define LED_PANIC 7
|
||||
|
||||
/****************************************************************************
|
||||
* Public Types
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
/****************************************************************************
|
||||
* Inline Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
#define EXTERN extern "C"
|
||||
extern "C"
|
||||
{
|
||||
#else
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
#undef EXTERN
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __CONFIGS_AMBER_INCLUDE_BOARD_H */
|
49
configs/misoc/include/generated/common.h
Normal file
49
configs/misoc/include/generated/common.h
Normal file
@ -0,0 +1,49 @@
|
||||
/****************************************************************************
|
||||
* configs/misoc/include/generated/common.h
|
||||
*
|
||||
* Copyright (C) 2016 Gregory Nutt. All rights reserved.
|
||||
* Author: Ramtin Amin <keytwo@gmail.com>
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __CONFIGS_MISOC_INCLUDE_GENERATED_COMMON_H
|
||||
#define __CONFIGS_MISOC_INCLUDE_GENERATED_COMMON_H
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef __ASSEMBLER__
|
||||
# define MMPTR(x) x
|
||||
#else
|
||||
# define MMPTR(x) (*((volatile unsigned int *)(x)))
|
||||
#endif
|
||||
|
||||
#endif /* __CONFIGS_MISOC_INCLUDE_GENERATED_COMMON_H */
|
397
configs/misoc/include/generated/csr.h
Normal file
397
configs/misoc/include/generated/csr.h
Normal file
@ -0,0 +1,397 @@
|
||||
/****************************************************************************
|
||||
* configs/misoc/include/generated/csr.h
|
||||
*
|
||||
* Copyright (C) 2016 Gregory Nutt. All rights reserved.
|
||||
* Author: Ramtin Amin <keytwo@gmail.com>
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __CONFIGS_MISOC_INCLUDE_GENERATED_CSR_H
|
||||
#define __CONFIGS_MISOC_INCLUDE_GENERATED_CSR_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include "hw/common.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* SDRAM */
|
||||
|
||||
#define CSR_SDRAM_BASE 0xe0004000
|
||||
#define CSR_SDRAM_DFII_CONTROL_ADDR 0xe0004000
|
||||
#define CSR_SDRAM_DFII_CONTROL_SIZE 1
|
||||
|
||||
#define CSR_SDRAM_DFII_PI0_COMMAND_ADDR 0xe0004004
|
||||
#define CSR_SDRAM_DFII_PI0_COMMAND_SIZE 1
|
||||
|
||||
#define CSR_SDRAM_DFII_PI0_COMMAND_ISSUE_ADDR 0xe0004008
|
||||
#define CSR_SDRAM_DFII_PI0_COMMAND_ISSUE_SIZE 1
|
||||
|
||||
#define CSR_SDRAM_DFII_PI0_ADDRESS_ADDR 0xe000400c
|
||||
#define CSR_SDRAM_DFII_PI0_ADDRESS_SIZE 2
|
||||
|
||||
#define CSR_SDRAM_DFII_PI0_BADDRESS_ADDR 0xe0004014
|
||||
#define CSR_SDRAM_DFII_PI0_BADDRESS_SIZE 1
|
||||
|
||||
#define CSR_SDRAM_DFII_PI0_WRDATA_ADDR 0xe0004018
|
||||
#define CSR_SDRAM_DFII_PI0_WRDATA_SIZE 2
|
||||
|
||||
#define CSR_SDRAM_DFII_PI0_RDDATA_ADDR 0xe0004020
|
||||
#define CSR_SDRAM_DFII_PI0_RDDATA_SIZE 2
|
||||
|
||||
#define CSR_TIMER0_BASE 0xe0002000
|
||||
#define CSR_TIMER0_LOAD_ADDR 0xe0002000
|
||||
#define CSR_TIMER0_LOAD_SIZE 4
|
||||
|
||||
#define CSR_TIMER0_RELOAD_ADDR 0xe0002010
|
||||
#define CSR_TIMER0_RELOAD_SIZE 4
|
||||
|
||||
#define CSR_TIMER0_EN_ADDR 0xe0002020
|
||||
#define CSR_TIMER0_EN_SIZE 1
|
||||
|
||||
#define CSR_TIMER0_UPDATE_VALUE_ADDR 0xe0002024
|
||||
#define CSR_TIMER0_UPDATE_VALUE_SIZE 1
|
||||
|
||||
#define CSR_TIMER0_VALUE_ADDR 0xe0002028
|
||||
#define CSR_TIMER0_VALUE_SIZE 4
|
||||
|
||||
#define CSR_TIMER0_EV_STATUS_ADDR 0xe0002038
|
||||
#define CSR_TIMER0_EV_STATUS_SIZE 1
|
||||
|
||||
#define CSR_TIMER0_EV_PENDING_ADDR 0xe000203c
|
||||
#define CSR_TIMER0_EV_PENDING_SIZE 1
|
||||
|
||||
#define CSR_TIMER0_EV_ENABLE_ADDR 0xe0002040
|
||||
#define CSR_TIMER0_EV_ENABLE_SIZE 1
|
||||
|
||||
#define CSR_UART_TXFULL_ADDR 0xe0001004
|
||||
#define CSR_UART_TXFULL_SIZE 1
|
||||
|
||||
#define CSR_UART_RXEMPTY_ADDR 0xe0001008
|
||||
#define CSR_UART_RXEMPTY_SIZE 1
|
||||
|
||||
#define CSR_UART_EV_STATUS_ADDR 0xe000100c
|
||||
#define CSR_UART_EV_STATUS_SIZE 1
|
||||
|
||||
#define CSR_UART_EV_PENDING_ADDR 0xe0001010
|
||||
#define CSR_UART_EV_PENDING_SIZE 1
|
||||
|
||||
#define CSR_UART_EV_ENABLE_ADDR 0xe0001014
|
||||
#define CSR_UART_EV_ENABLE_SIZE 1
|
||||
|
||||
#define CSR_UART_PHY_BASE 0xe0000800
|
||||
#define CSR_UART_PHY_TUNING_WORD_ADDR 0xe0000800
|
||||
#define CSR_UART_PHY_TUNING_WORD_SIZE 4
|
||||
|
||||
/* Constants */
|
||||
|
||||
#define UART_INTERRUPT 0
|
||||
#define TIMER0_INTERRUPT 1
|
||||
#define SYSTEM_CLOCK_FREQUENCY 80000000
|
||||
#define L2_SIZE 8192
|
||||
|
||||
/****************************************************************************
|
||||
* Inline Functions
|
||||
****************************************************************************/
|
||||
|
||||
static inline unsigned char sdram_dfii_control_read(void)
|
||||
{
|
||||
unsigned char r = MMPTR(0xe0004000);
|
||||
return r;
|
||||
}
|
||||
|
||||
static inline void sdram_dfii_control_write(unsigned char value)
|
||||
{
|
||||
MMPTR(0xe0004000) = value;
|
||||
}
|
||||
|
||||
static inline unsigned char sdram_dfii_pi0_command_read(void)
|
||||
{
|
||||
unsigned char r = MMPTR(0xe0004004);
|
||||
return r;
|
||||
}
|
||||
|
||||
static inline void sdram_dfii_pi0_command_write(unsigned char value)
|
||||
{
|
||||
MMPTR(0xe0004004) = value;
|
||||
}
|
||||
|
||||
static inline unsigned char sdram_dfii_pi0_command_issue_read(void)
|
||||
{
|
||||
unsigned char r = MMPTR(0xe0004008);
|
||||
return r;
|
||||
}
|
||||
|
||||
static inline void sdram_dfii_pi0_command_issue_write(unsigned char value)
|
||||
{
|
||||
MMPTR(0xe0004008) = value;
|
||||
}
|
||||
|
||||
static inline unsigned short int sdram_dfii_pi0_address_read(void)
|
||||
{
|
||||
unsigned short int r = MMPTR(0xe000400c);
|
||||
r <<= 8;
|
||||
r |= MMPTR(0xe0004010);
|
||||
return r;
|
||||
}
|
||||
|
||||
static inline void sdram_dfii_pi0_address_write(unsigned short int value)
|
||||
{
|
||||
MMPTR(0xe000400c) = value >> 8;
|
||||
MMPTR(0xe0004010) = value;
|
||||
}
|
||||
|
||||
static inline unsigned char sdram_dfii_pi0_baddress_read(void)
|
||||
{
|
||||
unsigned char r = MMPTR(0xe0004014);
|
||||
return r;
|
||||
}
|
||||
|
||||
static inline void sdram_dfii_pi0_baddress_write(unsigned char value)
|
||||
{
|
||||
MMPTR(0xe0004014) = value;
|
||||
}
|
||||
|
||||
static inline unsigned short int sdram_dfii_pi0_wrdata_read(void)
|
||||
{
|
||||
unsigned short int r = MMPTR(0xe0004018);
|
||||
r <<= 8;
|
||||
r |= MMPTR(0xe000401c);
|
||||
return r;
|
||||
}
|
||||
|
||||
static inline void sdram_dfii_pi0_wrdata_write(unsigned short int value)
|
||||
{
|
||||
MMPTR(0xe0004018) = value >> 8;
|
||||
MMPTR(0xe000401c) = value;
|
||||
}
|
||||
|
||||
static inline unsigned short int sdram_dfii_pi0_rddata_read(void)
|
||||
{
|
||||
unsigned short int r = MMPTR(0xe0004020);
|
||||
r <<= 8;
|
||||
r |= MMPTR(0xe0004024);
|
||||
return r;
|
||||
}
|
||||
|
||||
/* Timer0 */
|
||||
|
||||
static inline unsigned int timer0_load_read(void)
|
||||
{
|
||||
unsigned int r = MMPTR(0xe0002000);
|
||||
r <<= 8;
|
||||
r |= MMPTR(0xe0002004);
|
||||
r <<= 8;
|
||||
r |= MMPTR(0xe0002008);
|
||||
r <<= 8;
|
||||
r |= MMPTR(0xe000200c);
|
||||
return r;
|
||||
}
|
||||
|
||||
static inline void timer0_load_write(unsigned int value)
|
||||
{
|
||||
MMPTR(0xe0002000) = value >> 24;
|
||||
MMPTR(0xe0002004) = value >> 16;
|
||||
MMPTR(0xe0002008) = value >> 8;
|
||||
MMPTR(0xe000200c) = value;
|
||||
}
|
||||
|
||||
static inline unsigned int timer0_reload_read(void)
|
||||
{
|
||||
unsigned int r = MMPTR(0xe0002010);
|
||||
r <<= 8;
|
||||
r |= MMPTR(0xe0002014);
|
||||
r <<= 8;
|
||||
r |= MMPTR(0xe0002018);
|
||||
r <<= 8;
|
||||
r |= MMPTR(0xe000201c);
|
||||
return r;
|
||||
}
|
||||
|
||||
static inline void timer0_reload_write(unsigned int value)
|
||||
{
|
||||
MMPTR(0xe0002010) = value >> 24;
|
||||
MMPTR(0xe0002014) = value >> 16;
|
||||
MMPTR(0xe0002018) = value >> 8;
|
||||
MMPTR(0xe000201c) = value;
|
||||
}
|
||||
|
||||
static inline unsigned char timer0_en_read(void)
|
||||
{
|
||||
unsigned char r = MMPTR(0xe0002020);
|
||||
return r;
|
||||
}
|
||||
|
||||
static inline void timer0_en_write(unsigned char value)
|
||||
{
|
||||
MMPTR(0xe0002020) = value;
|
||||
}
|
||||
|
||||
static inline unsigned char timer0_update_value_read(void)
|
||||
{
|
||||
unsigned char r = MMPTR(0xe0002024);
|
||||
return r;
|
||||
}
|
||||
|
||||
static inline void timer0_update_value_write(unsigned char value)
|
||||
{
|
||||
MMPTR(0xe0002024) = value;
|
||||
}
|
||||
|
||||
static inline unsigned int timer0_value_read(void)
|
||||
{
|
||||
unsigned int r = MMPTR(0xe0002028);
|
||||
r <<= 8;
|
||||
r |= MMPTR(0xe000202c);
|
||||
r <<= 8;
|
||||
r |= MMPTR(0xe0002030);
|
||||
r <<= 8;
|
||||
r |= MMPTR(0xe0002034);
|
||||
return r;
|
||||
}
|
||||
|
||||
static inline unsigned char timer0_ev_status_read(void)
|
||||
{
|
||||
unsigned char r = MMPTR(0xe0002038);
|
||||
return r;
|
||||
}
|
||||
|
||||
static inline void timer0_ev_status_write(unsigned char value)
|
||||
{
|
||||
MMPTR(0xe0002038) = value;
|
||||
}
|
||||
|
||||
static inline unsigned char timer0_ev_pending_read(void)
|
||||
{
|
||||
unsigned char r = MMPTR(0xe000203c);
|
||||
return r;
|
||||
}
|
||||
|
||||
static inline void timer0_ev_pending_write(unsigned char value)
|
||||
{
|
||||
MMPTR(0xe000203c) = value;
|
||||
}
|
||||
|
||||
static inline unsigned char timer0_ev_enable_read(void)
|
||||
{
|
||||
unsigned char r = MMPTR(0xe0002040);
|
||||
return r;
|
||||
}
|
||||
|
||||
static inline void timer0_ev_enable_write(unsigned char value)
|
||||
{
|
||||
MMPTR(0xe0002040) = value;
|
||||
}
|
||||
|
||||
/* UART */
|
||||
|
||||
static inline unsigned char uart_rxtx_read(void)
|
||||
{
|
||||
unsigned char r = MMPTR(0xe0001000);
|
||||
return r;
|
||||
}
|
||||
|
||||
static inline void uart_rxtx_write(unsigned char value)
|
||||
{
|
||||
MMPTR(0xe0001000) = value;
|
||||
}
|
||||
|
||||
static inline unsigned char uart_txfull_read(void)
|
||||
{
|
||||
unsigned char r = MMPTR(0xe0001004);
|
||||
return r;
|
||||
}
|
||||
|
||||
static inline unsigned char uart_rxempty_read(void)
|
||||
{
|
||||
unsigned char r = MMPTR(0xe0001008);
|
||||
return r;
|
||||
}
|
||||
|
||||
static inline unsigned char uart_ev_status_read(void)
|
||||
{
|
||||
unsigned char r = MMPTR(0xe000100c);
|
||||
return r;
|
||||
}
|
||||
|
||||
static inline void uart_ev_status_write(unsigned char value)
|
||||
{
|
||||
MMPTR(0xe000100c) = value;
|
||||
}
|
||||
|
||||
static inline unsigned char uart_ev_pending_read(void)
|
||||
{
|
||||
unsigned char r = MMPTR(0xe0001010);
|
||||
return r;
|
||||
}
|
||||
|
||||
static inline void uart_ev_pending_write(unsigned char value)
|
||||
{
|
||||
MMPTR(0xe0001010) = value;
|
||||
}
|
||||
|
||||
static inline unsigned char uart_ev_enable_read(void)
|
||||
{
|
||||
unsigned char r = MMPTR(0xe0001014);
|
||||
return r;
|
||||
}
|
||||
|
||||
static inline void uart_ev_enable_write(unsigned char value)
|
||||
{
|
||||
MMPTR(0xe0001014) = value;
|
||||
}
|
||||
|
||||
/* uart_phy */
|
||||
|
||||
static inline unsigned int uart_phy_tuning_word_read(void)
|
||||
{
|
||||
unsigned int r = MMPTR(0xe0000800);
|
||||
r <<= 8;
|
||||
r |= MMPTR(0xe0000804);
|
||||
r <<= 8;
|
||||
r |= MMPTR(0xe0000808);
|
||||
r <<= 8;
|
||||
r |= MMPTR(0xe000080c);
|
||||
return r;
|
||||
}
|
||||
|
||||
static inline void uart_phy_tuning_word_write(unsigned int value)
|
||||
{
|
||||
MMPTR(0xe0000800) = value >> 24;
|
||||
MMPTR(0xe0000804) = value >> 16;
|
||||
MMPTR(0xe0000808) = value >> 8;
|
||||
MMPTR(0xe000080c) = value;
|
||||
}
|
||||
|
||||
#endif /* __CONFIGS_MISOC_INCLUDE_GENERATED_CSR_H */
|
52
configs/misoc/include/generated/mem.h
Normal file
52
configs/misoc/include/generated/mem.h
Normal file
@ -0,0 +1,52 @@
|
||||
/****************************************************************************
|
||||
* configs/misoc/include/generated/mem.h
|
||||
*
|
||||
* Copyright (C) 2016 Gregory Nutt. All rights reserved.
|
||||
* Author: Ramtin Amin <keytwo@gmail.com>
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __CONFIGS_MISOC_INCLUDE_GENERATED_MEM_H
|
||||
#define __CONFIGS_MISOC_INCLUDE_GENERATED_MEM_H
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
#define ROM_BASE 0x00000000
|
||||
#define ROM_SIZE 0x00008000
|
||||
|
||||
#define SRAM_BASE 0x10000000
|
||||
#define SRAM_SIZE 0x00001000
|
||||
|
||||
#define MAIN_RAM_BASE 0x40000000
|
||||
#define MAIN_RAM_SIZE 0x00800000
|
||||
|
||||
#endif /* __CONFIGS_MISOC_INCLUDE_GENERATED_MEM_H /
|
1
configs/misoc/include/generated/output_format.ld
Normal file
1
configs/misoc/include/generated/output_format.ld
Normal file
@ -0,0 +1 @@
|
||||
OUTPUT_FORMAT("elf32-lm32")
|
6
configs/misoc/include/generated/regions.ld
Normal file
6
configs/misoc/include/generated/regions.ld
Normal file
@ -0,0 +1,6 @@
|
||||
MEMORY
|
||||
{
|
||||
rom : ORIGIN = 0x00000000, LENGTH = 0x00008000
|
||||
sram : ORIGIN = 0x10000000, LENGTH = 0x00001000
|
||||
main_ram : ORIGIN = 0x40000000, LENGTH = 0x00800000
|
||||
}
|
144
configs/misoc/include/generated/sdram_phy.h
Normal file
144
configs/misoc/include/generated/sdram_phy.h
Normal file
@ -0,0 +1,144 @@
|
||||
/****************************************************************************
|
||||
* configs/misoc/include/generated/common.h
|
||||
*
|
||||
* Copyright (C) 2016 Gregory Nutt. All rights reserved.
|
||||
* Author: Ramtin Amin <keytwo@gmail.com>
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __CONFIGS_MISOC_INCLUDE_GENERATED_SDRAM_PHY_H
|
||||
#define __CONFIGS_MISOC_INCLUDE_GENERATED_SDRAM_PHY_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Filese
|
||||
****************************************************************************/
|
||||
|
||||
#include "hw/common.h"
|
||||
#include "hw/flags.h"
|
||||
|
||||
#include <arch/board/generated/csr.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
#define DFII_NPHASES 1
|
||||
|
||||
#define sdram_dfii_pird_address_write(X) sdram_dfii_pi0_address_write(X)
|
||||
#define sdram_dfii_piwr_address_write(X) sdram_dfii_pi0_address_write(X)
|
||||
|
||||
#define sdram_dfii_pird_baddress_write(X) sdram_dfii_pi0_baddress_write(X)
|
||||
#define sdram_dfii_piwr_baddress_write(X) sdram_dfii_pi0_baddress_write(X)
|
||||
|
||||
#define command_prd(X) command_p0(X)
|
||||
#define command_pwr(X) command_p0(X)
|
||||
|
||||
#define DFII_PIX_DATA_SIZE CSR_SDRAM_DFII_PI0_WRDATA_SIZE
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
const unsigned int sdram_dfii_pix_wrdata_addr[1] =
|
||||
{
|
||||
CSR_SDRAM_DFII_PI0_WRDATA_ADDR
|
||||
};
|
||||
|
||||
const unsigned int sdram_dfii_pix_rddata_addr[1] =
|
||||
{
|
||||
CSR_SDRAM_DFII_PI0_RDDATA_ADDR
|
||||
};
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
static void cdelay(int i);
|
||||
|
||||
static void command_p0(int cmd)
|
||||
{
|
||||
sdram_dfii_pi0_command_write(cmd);
|
||||
sdram_dfii_pi0_command_issue_write(1);
|
||||
}
|
||||
|
||||
static void init_sequence(void)
|
||||
{
|
||||
/* Bring CKE high */
|
||||
|
||||
sdram_dfii_pi0_address_write(0x0);
|
||||
sdram_dfii_pi0_baddress_write(0);
|
||||
sdram_dfii_control_write(DFII_CONTROL_CKE | DFII_CONTROL_ODT |
|
||||
DFII_CONTROL_RESET_N);
|
||||
cdelay(20000);
|
||||
|
||||
/* Precharge All */
|
||||
|
||||
sdram_dfii_pi0_address_write(0x400);
|
||||
sdram_dfii_pi0_baddress_write(0);
|
||||
command_p0(DFII_COMMAND_RAS | DFII_COMMAND_WE | DFII_COMMAND_CS);
|
||||
|
||||
/* Load Mode Register / Reset DLL, CL=2, BL=1 */
|
||||
|
||||
sdram_dfii_pi0_address_write(0x120);
|
||||
sdram_dfii_pi0_baddress_write(0);
|
||||
command_p0(DFII_COMMAND_RAS | DFII_COMMAND_CAS | DFII_COMMAND_WE |
|
||||
DFII_COMMAND_CS);
|
||||
cdelay(200);
|
||||
|
||||
/* Precharge All */
|
||||
|
||||
sdram_dfii_pi0_address_write(0x400);
|
||||
sdram_dfii_pi0_baddress_write(0);
|
||||
command_p0(DFII_COMMAND_RAS | DFII_COMMAND_WE | DFII_COMMAND_CS);
|
||||
|
||||
/* Auto Refresh */
|
||||
|
||||
sdram_dfii_pi0_address_write(0x0);
|
||||
sdram_dfii_pi0_baddress_write(0);
|
||||
command_p0(DFII_COMMAND_RAS | DFII_COMMAND_CAS | DFII_COMMAND_CS);
|
||||
cdelay(4);
|
||||
|
||||
/* Auto Refresh */
|
||||
|
||||
sdram_dfii_pi0_address_write(0x0);
|
||||
sdram_dfii_pi0_baddress_write(0);
|
||||
command_p0(DFII_COMMAND_RAS | DFII_COMMAND_CAS | DFII_COMMAND_CS);
|
||||
cdelay(4);
|
||||
|
||||
/* Load Mode Register / CL=2, BL=1 */
|
||||
|
||||
sdram_dfii_pi0_address_write(0x20);
|
||||
sdram_dfii_pi0_baddress_write(0);
|
||||
command_p0(DFII_COMMAND_RAS | DFII_COMMAND_CAS | DFII_COMMAND_WE |
|
||||
DFII_COMMAND_CS);
|
||||
cdelay(200);
|
||||
}
|
||||
|
||||
#endif /* __CONFIGS_MISOC_INCLUDE_GENERATED_SDRAM_PHY_H
|
11
configs/misoc/include/generated/variables.mak
Normal file
11
configs/misoc/include/generated/variables.mak
Normal file
@ -0,0 +1,11 @@
|
||||
TRIPLE=lm32-elf
|
||||
CPU=lm32
|
||||
CPUFLAGS=-mbarrel-shift-enabled -mmultiply-enabled -mdivide-enabled -msign-extend-enabled
|
||||
CPUENDIANNESS=big
|
||||
CLANG=0
|
||||
SOC_DIRECTORY=/usr/local/lib/python3.5/dist-packages/litex-0.1-py3.5.egg/litex/soc
|
||||
BUILDINC_DIRECTORY=/home/lenovo/fpga/litex/litex/boards/targets/soc_basesoc_papilio_pro/software/include
|
||||
LIBBASE_DIRECTORY=/usr/local/lib/python3.5/dist-packages/litex-0.1-py3.5.egg/litex/soc/software/libbase
|
||||
LIBCOMPILER_RT_DIRECTORY=/usr/local/lib/python3.5/dist-packages/litex-0.1-py3.5.egg/litex/soc/software/libcompiler_rt
|
||||
LIBNET_DIRECTORY=/usr/local/lib/python3.5/dist-packages/litex-0.1-py3.5.egg/litex/soc/software/libnet
|
||||
BIOS_DIRECTORY=/usr/local/lib/python3.5/dist-packages/litex-0.1-py3.5.egg/litex/soc/software/bios
|
106
configs/misoc/scripts/ld.script
Normal file
106
configs/misoc/scripts/ld.script
Normal file
@ -0,0 +1,106 @@
|
||||
/****************************************************************************
|
||||
* configs/misoc/hello/script/ld.script
|
||||
*
|
||||
* Copyright (C) 2016 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
OUTPUT_FORMAT("elf32-lm32")
|
||||
ENTRY(_stext)
|
||||
|
||||
MEMORY
|
||||
{
|
||||
rom : ORIGIN = 0x00000000, LENGTH = 0x00008000
|
||||
sram : ORIGIN = 0x10000000, LENGTH = 0x00004000
|
||||
main_ram : ORIGIN = 0x40000000, LENGTH = 0x00080000
|
||||
}
|
||||
|
||||
/*
|
||||
MEMORY
|
||||
{
|
||||
flash (rxai!w) : ORIGIN = 0x80002000, LENGTH = 256K - 8K
|
||||
intram (wxa!ri) : ORIGIN = 0x00000004, LENGTH = 32K
|
||||
userpage : ORIGIN = 0x80800000, LENGTH = 512
|
||||
factorypage : ORIGIN = 0x80800200, LENGTH = 512
|
||||
}
|
||||
*/
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
.text : {
|
||||
_stext = ABSOLUTE(.);
|
||||
*(.vectors)
|
||||
*(.text .text.*)
|
||||
*(.fixup)
|
||||
*(.gnu.warning)
|
||||
*(.rodata .rodata.*)
|
||||
*(.gnu.linkonce.t.*)
|
||||
*(.glue_7)
|
||||
*(.glue_7t)
|
||||
*(.got)
|
||||
*(.gcc_except_table)
|
||||
*(.gnu.linkonce.r.*)
|
||||
_etext = ABSOLUTE(.);
|
||||
} > main_ram
|
||||
|
||||
_eronly = ABSOLUTE(.); /* See below */
|
||||
|
||||
.data : {
|
||||
_sdata = ABSOLUTE(.);
|
||||
*(.data .data.*)
|
||||
*(.gnu.linkonce.d.*)
|
||||
CONSTRUCTORS
|
||||
_edata = ABSOLUTE(.);
|
||||
} > main_ram
|
||||
|
||||
.bss : { /* BSS */
|
||||
_sbss = ABSOLUTE(.);
|
||||
*(.bss .bss.*)
|
||||
*(.gnu.linkonce.b.*)
|
||||
*(COMMON)
|
||||
_ebss = ABSOLUTE(.);
|
||||
} > main_ram
|
||||
/* Stabs debugging sections. */
|
||||
.stab 0 : { *(.stab) }
|
||||
.stabstr 0 : { *(.stabstr) }
|
||||
.stab.excl 0 : { *(.stab.excl) }
|
||||
.stab.exclstr 0 : { *(.stab.exclstr) }
|
||||
.stab.index 0 : { *(.stab.index) }
|
||||
.stab.indexstr 0 : { *(.stab.indexstr) }
|
||||
.comment 0 : { *(.comment) }
|
||||
.debug_abbrev 0 : { *(.debug_abbrev) }
|
||||
.debug_info 0 : { *(.debug_info) }
|
||||
.debug_line 0 : { *(.debug_line) }
|
||||
.debug_pubnames 0 : { *(.debug_pubnames) }
|
||||
.debug_aranges 0 : { *(.debug_aranges) }
|
||||
}
|
||||
|
||||
PROVIDE(_fstack = ORIGIN(main_ram) + LENGTH(main_ram) - 4);
|
2
configs/misoc/src/.gitignore
vendored
Normal file
2
configs/misoc/src/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
/.depend
|
||||
/Make.dep
|
42
configs/misoc/src/Makefile
Normal file
42
configs/misoc/src/Makefile
Normal file
@ -0,0 +1,42 @@
|
||||
############################################################################
|
||||
# configs/misoc/src/Makefile
|
||||
#
|
||||
# Copyright (C) 2016 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
# Ramtin Amin <keytwo@gmail.com>
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
-include $(TOPDIR)/Make.defs
|
||||
|
||||
ASRCS =
|
||||
CSRCS = atmega_boot.c
|
||||
|
||||
include $(TOPDIR)/configs/Board.mk
|
68
configs/misoc/src/lm32_boot.c
Normal file
68
configs/misoc/src/lm32_boot.c
Normal file
@ -0,0 +1,68 @@
|
||||
/************************************************************************************
|
||||
* configs/misoc/src/lm32_boot.c
|
||||
*
|
||||
* Copyright (C) 2016 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
* Ramtin Amin <keytwo@gmail.com>
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
* Included Files
|
||||
************************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <debug.h>
|
||||
|
||||
#include <arch/board/board.h>
|
||||
|
||||
/************************************************************************************
|
||||
* Public Functions
|
||||
************************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
* Name: lm32_board_initialize
|
||||
*
|
||||
* Description:
|
||||
* All LM32 architectures must provide the following entry point. This entry
|
||||
* point is called early in the initialization -- after all memory has been
|
||||
* configured and mapped but before any devices have been initialized.
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
void lm32_board_initialize(void)
|
||||
{
|
||||
/* Configure SSP chip selects if 1) at least one SSP is enabled, and 2) the weak
|
||||
* function atmega_spidev_initialize() has been brought into the link.
|
||||
*/
|
||||
|
||||
/* Configure on-board LEDs if LED support has been selected. */
|
||||
}
|
102
configs/misoc/src/misoc.h
Normal file
102
configs/misoc/src/misoc.h
Normal file
@ -0,0 +1,102 @@
|
||||
/****************************************************************************
|
||||
* configs/misoc/src/misoc.h
|
||||
*
|
||||
* Copyright (C) 2016 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
* Ramtin Amin <keytwo@gmail.com>
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __CONFIGS_MISOC_SRC_MISOC_H
|
||||
#define __CONFIGS_MISOC_SRC_MISOC_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Types
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
/****************************************************************************
|
||||
* Inline Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
#define EXTERN extern "C"
|
||||
extern "C"
|
||||
{
|
||||
#else
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
/************************************************************************************
|
||||
* Name: lm32_spidev_initialize
|
||||
*
|
||||
* Description:
|
||||
* Called to configure SPI chip select GPIO pins for the Amber Web Server.
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
#if defined(CONFIG_AVR_SPI1) || defined(CONFIG_AVR_SPI2)
|
||||
void weak_function lm32_spidev_initialize(void);
|
||||
#endif
|
||||
|
||||
/************************************************************************************
|
||||
* Name: lm32_led_initialize
|
||||
*
|
||||
* Description:
|
||||
* Configure on-board LEDs if LED support has been selected.
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
#ifdef CONFIG_ARCH_LEDS
|
||||
void lm32_led_initialize(void);
|
||||
#endif
|
||||
|
||||
#undef EXTERN
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __CONFIGS_MISOC_SRC_MISOC_H */
|
Loading…
Reference in New Issue
Block a user