Add NXFFS configuration for Mirtoo

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4871 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2012-06-26 17:13:16 +00:00
parent b426006f96
commit fccb3c1385
16 changed files with 1463 additions and 37 deletions

View File

@ -375,23 +375,25 @@ Toolchains
Note that the tools will have the prefix, mypic32- so, for example, the
compiler will be called mypic32-gcc.
Penguino mips-elf Toolchain
Pinguino mips-elf Toolchain
---------------------------
Another option is the mips-elf toolchain used with the Penguino project. This
Another option is the mips-elf toolchain used with the Pinguino project. This
is a relatively current mips-elf GCC and should provide free C++ support as
well. This toolchain can be downloded from the Penguino website:
well. This toolchain can be downloded from the Pinguino website:
http://wiki.pinguino.cc/index.php/Main_Page#Download . There is some general
information about using the Penguino mips-elf toolchain in this thread:
information about using the Pinguino mips-elf toolchain in this thread:
http://tech.groups.yahoo.com/group/nuttx/message/1821
Experimental (and untested) support for the Penguino mips-elf toolchain has
Experimental (and untested) support for the Pinguino mips-elf toolchain has
been included in the Mirtoo configurations. Use this configuration option to
select the Penguino mips-elf toolchain:
select the Pinguino mips-elf toolchain:
CONFIG_PIC32MX_MIPSELFL - Penguino mips-elf toolchain for Linux
CONFIG_PIC32MX_PINGUINOW - Pinguino mips-elf toolchain for Windows
CONFIG_PIC32MX_PINGUINOL - Pinguino mips toolchain for Linux
And set the path appropriately in the setenv.sh file. And good luck!
And set the path appropriately in the setenv.sh file. These tool configurations
are untested -- expect some additional integration issues. Good luck!
MPLAB/C32 vs MPLABX/X32
-----------------------
@ -817,3 +819,49 @@ Where <subdir> is one of the following:
path to the toolchain in setenv.sh. See notes above with regard to
the XC32 toolchain.
nxffs:
This is a configuration very similar to the nsh configuration. This
configure also provides the NuttShell (NSH). This configuration use
UART1 which is available on FUNC 4 and 5 on connector X3 (as described
for the nsh configuration). This configuration differs in the fillowing
ways:
1) SPI2 is enabled and support is included for the NXFFS file system
on the 32Mbi SST25 device on the Mirtoo board.
CONFIG_PIC32MX_SPI2=y
CONFIG_MTD_SST25=y
CONFIG_SST25_SECTOR512=y
CONFIG_DISABLE_MOUNTPOINT=n
CONFIG_FS_NXFFS=y
CONFIG_NSH_ARCHINIT=y
2) Many operating system features are suppressed to produce a smaller
footprint.
CONFIG_SCHED_WAITPID=n
CONFIG_DISABLE_POSIX_TIMERS=y
CONFIG_DISABLE_PTHREAD=y
CONFIG_DISABLE_MQUEUE=y
CONFIG_DISABLE_MQUEUE=y
3) Many NSH commands are suppressed, also for a smaller FLASH footprint
CONFIG_NSH_DISABLESCRIPT=y
CONFIG_NSH_DISABLEBG=y
CONFIG_NSH_DISABLE_DD=y
CONFIG_NSH_DISABLE_EXEC=y
CONFIG_NSH_DISABLE_EXIT=y
CONFIG_NSH_DISABLE_GET=y
CONFIG_NSH_DISABLE_IFCONFIG=y
CONFIG_NSH_DISABLE_KILL=y
CONFIG_NSH_DISABLE_MKFATFS=y
CONFIG_NSH_DISABLE_MKFIFO=y
CONFIG_NSH_DISABLE_MKRD=y
CONFIG_NSH_DISABLE_NFSMOUNT=y
CONFIG_NSH_DISABLE_PING=y
CONFIG_NSH_DISABLE_PUT=y
CONFIG_NSH_DISABLE_SH=y
CONFIG_NSH_DISABLE_TEST=y
CONFIG_NSH_DISABLE_WGET=y

View File

@ -88,10 +88,20 @@ ifeq ($(CONFIG_PIC32MX_MICROCHIPOPENL),y)
LDFLAGS += -nostartfiles -nodefaultlibs
LDSCRIPT = c32-debug.ld
endif
ifeq ($(CONFIG_PIC32MX_MIPSELFL),y)
ifeq ($(CONFIG_PIC32MX_PINGUINOW),y)
# Penquino mips-elf toolchain under Windows
CROSSDEV = mips-
WINTOOL = y
MAXOPTIMIZATION = -O2
ARCHCPUFLAGS = -mlong32 -membedded-data -msoft-float -march=24kc -EL
ARCHPICFLAGS = -fpic -membedded-pic
LDFLAGS += -nostartfiles -nodefaultlibs
LDSCRIPT = mips-elf-debug.ld
endif
ifeq ($(CONFIG_PIC32MX_PINGUINOL),y)
# Penquino mips-elf toolchain under Linux
CROSSDEV = mips-elf-
# MAXOPTIMIZATION = -O2
MAXOPTIMIZATION = -O2
ARCHCPUFLAGS = -mlong32 -membedded-data -msoft-float -march=24kc -EL
ARCHPICFLAGS = -fpic -membedded-pic
LDFLAGS += -nostartfiles -nodefaultlibs

View File

@ -106,7 +106,7 @@ CONFIG_ARCH_DMA=n
#
# Enable support for RAM-based functions
# (If selected, then modifications are needed in ld.script as well)
# (If selected, then modifications are needed in linker scripts as well)
#
CONFIG_PIC32MX_RAMFUNCS=n
@ -118,6 +118,8 @@ CONFIG_PIC32MX_MICROCHIPL=n
CONFIG_PIC32MX_MICROCHIPW_LITE=y
CONFIG_PIC32MX_MICROCHIPL_LITE=n
CONFIG_PIC32MX_MICROCHIPOPENL=n
CONFIG_PIC32MX_PINGUINOW=n
CONFIG_PIC32MX_PINGUINOL=n
#
# Individual subsystems can be enabled:
@ -185,7 +187,7 @@ CONFIG_SST25_SECTOR512=n
# DEVCFG1: All settings determined by selections in board.h. Except
# CONFIG_PIC32MX_OSCOUT - May be used to disable oscillator output (enabled by default)
# DEVCFG2: (All settings determined by selections in board.h)
# DEVCFG3:
# DEVCFG3:
# CONFIG_PIC32MX_USBIDO - USB USBID Selection. Default 1 if USB enabled
# (USBID pin is controlled by the USB module), but 0 (GPIO) otherwise.
# CONFIG_PIC32MX_VBUSIO - USB VBUSON Selection (Default 1 if USB enabled
@ -281,7 +283,7 @@ CONFIG_HAVE_LIBM=n
# CONFIG_RR_INTERVAL - The round robin timeslice will be set
# this number of milliseconds; Round robin scheduling can
# be disabled by setting this value to zero.
# CONFIG_SCHED_INSTRUMENTATION - enables instrumentation in
# CONFIG_SCHED_INSTRUMENTATION - enables instrumentation in
# scheduler to monitor system performance
# CONFIG_TASK_NAME_SIZE - Spcifies that maximum size of a
# task name to save in the TCB. Useful if scheduler
@ -302,11 +304,11 @@ CONFIG_HAVE_LIBM=n
# CONFIG_MUTEX_TYPES: Set to enable support for recursive and
# errorcheck mutexes. Enables pthread_mutexattr_settype().
# CONFIG_PRIORITY_INHERITANCE : Set to enable support for priority
# inheritance on mutexes and semaphores.
# inheritance on mutexes and semaphores.
# CONFIG_SEM_PREALLOCHOLDERS: This setting is only used if priority
# inheritance is enabled. It defines the maximum number of
# different threads (minus one) that can take counts on a
# semaphore with priority inheritance support. This may be
# semaphore with priority inheritance support. This may be
# set to zero if priority inheritance is disabled OR if you
# are only using semaphores as mutexes (only one holder) OR
# if no more than two threads participate using a counting
@ -543,7 +545,6 @@ CONFIG_PREALLOC_TIMERS=4
# implemented by copying whole files into memory.
#
CONFIG_FS_FAT=n
CONFIG_FS_FAT=y
CONFIG_FAT_LCNAMES=y
CONFIG_FAT_LFN=y
CONFIG_FAT_MAXFNAME=32
@ -820,7 +821,7 @@ CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3
# CONFIG_NSH_FATNSECTORS - FAT FS number of sectors
# CONFIG_NSH_FATMOUNTPT - FAT FS mountpoint
#
CONFIG_NSH_BUILTIN_APPS=y
CONFIG_NSH_BUILTIN_APPS=n
CONFIG_NSH_FILEIOSIZE=512
CONFIG_NSH_STRERROR=n
CONFIG_NSH_LINELEN=64

View File

@ -58,6 +58,11 @@ export TOOLCHAIN_BIN="/cygdrive/c/MicroChip/mplabc32/v1.12/bin"
# version of if you install the toolchain at a different location
#export TOOLCHAIN_BIN="/opt/microchip/xc32/v1.00/bin"
# This the Cygwin path to the location where I installed the Pinguino
# toolchain under Windows. You will have to edit this if you install the
# tool chain in a different location or use a different version
#export TOOLCHAIN_BIN="/cygdrive/c/PinguinoX.3/win32/p32/bin"
# This the Linux path to the location where I installed the microchipOpen
# toolchain under Linux. You will have to edit this if you use the
# microchipOpen toolchain.

View File

@ -0,0 +1,196 @@
############################################################################
# configs/mirtoo/nxffs/Make.defs
#
# Copyright (C) 2012 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.
#
############################################################################
include ${TOPDIR}/.config
# Setup for the selected toolchain
ifeq ($(CONFIG_PIC32MX_MICROCHIPW),y)
# Microchip C32 toolchain under Windows
CROSSDEV = pic32-
# CROSSDEV = xc32-
WINTOOL = y
MAXOPTIMIZATION = -O2
ARCHCPUFLAGS = -mprocessor=elf32pic32mx -mno-float -mlong32 -membedded-data
ARCHPICFLAGS = -fpic -membedded-pic
LDFLAGS += -nostartfiles -nodefaultlibs
LDSCRIPT = c32-debug.ld
endif
ifeq ($(CONFIG_PIC32MX_MICROCHIPW_LITE),y)
# Microchip C32 toolchain under Windows
CROSSDEV = pic32-
# CROSSDEV = xc32-
WINTOOL = y
# MAXOPTIMIZATION = -O2
ARCHCPUFLAGS = -mprocessor=elf32pic32mx -mno-float -mlong32 -membedded-data
ARCHPICFLAGS = -fpic -membedded-pic
LDFLAGS += -nostartfiles -nodefaultlibs
LDSCRIPT = c32-debug.ld
endif
ifeq ($(CONFIG_PIC32MX_MICROCHIPL),y)
# Microchip C32 toolchain under Linux
CROSSDEV = pic32-
# CROSSDEV = xc32-
MAXOPTIMIZATION = -O2
ARCHCPUFLAGS = -mprocessor=elf32pic32mx -mno-float -mlong32 -membedded-data
ARCHPICFLAGS = -fpic -membedded-pic
LDFLAGS += -nostartfiles -nodefaultlibs
LDSCRIPT = xc32-debug.ld
endif
ifeq ($(CONFIG_PIC32MX_MICROCHIPL_LITE),y)
# Microchip C32 toolchain under Linux
CROSSDEV = pic32-
# CROSSDEV = xc32-
# MAXOPTIMIZATION = -O2
ARCHCPUFLAGS = -mprocessor=elf32pic32mx -mno-float -mlong32 -membedded-data
ARCHPICFLAGS = -fpic -membedded-pic
LDFLAGS += -nostartfiles -nodefaultlibs
LDSCRIPT = xc32-debug.ld
endif
ifeq ($(CONFIG_PIC32MX_MICROCHIPOPENL),y)
# microchipOpen toolchain under Linux
CROSSDEV = mypic32-
# MAXOPTIMIZATION = -O2
ARCHCPUFLAGS = -mprocessor=elf32pic32mx -mno-float -mlong32 -membedded-data
ARCHPICFLAGS = -fpic -membedded-pic
LDFLAGS += -nostartfiles -nodefaultlibs
LDSCRIPT = c32-debug.ld
endif
ifeq ($(CONFIG_PIC32MX_PINGUINOW),y)
# Penquino mips-elf toolchain under Windows
CROSSDEV = mips-
WINTOOL = y
MAXOPTIMIZATION = -O2
ARCHCPUFLAGS = -mlong32 -membedded-data -msoft-float -march=24kc -EL
ARCHPICFLAGS = -fpic -membedded-pic
LDFLAGS += -nostartfiles -nodefaultlibs
LDSCRIPT = mips-elf-debug.ld
endif
ifeq ($(CONFIG_PIC32MX_PINGUINOL),y)
# Penquino mips-elf toolchain under Linux
CROSSDEV = mips-elf-
MAXOPTIMIZATION = -O2
ARCHCPUFLAGS = -mlong32 -membedded-data -msoft-float -march=24kc -EL
ARCHPICFLAGS = -fpic -membedded-pic
LDFLAGS += -nostartfiles -nodefaultlibs
LDSCRIPT = mips-elf-debug.ld
endif
ifeq ($(WINTOOL),y)
# Windows-native toolchains
DIRLINK = $(TOPDIR)/tools/winlink.sh
DIRUNLINK = $(TOPDIR)/tools/unlink.sh
MKDEP = $(TOPDIR)/tools/mknulldeps.sh
ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}"
ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${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.sh
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/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
else
ARCHOPTIMIZATION = $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer
endif
ARCHCFLAGS = -fno-builtin
ARCHCXXFLAGS = -fno-builtin -fno-exceptions
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow
ARCHWARNINGSXX = -Wall -Wshadow
ARCHDEFINES =
CFLAGS = $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe
CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS)
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.ld -no-check-sections
LDNXFLATFLAGS = -e main -s 2048
OBJEXT = .o
LIBEXT = .a
EXEEXT =
define PREPROCESS
@echo "CPP: $1->$2"
@$(CPP) $(CPPFLAGS) $1 -o $2
endef
define COMPILE
@echo "CC: $1"
@$(CC) -c $(CFLAGS) $1 -o $2
endef
define COMPILEXX
@echo "CXX: $1"
@$(CXX) -c $(CXXFLAGS) $1 -o $2
endef
define ASSEMBLE
@echo "AS: $1"
@$(CC) -c $(AFLAGS) $1 -o $2
endef
define ARCHIVE
echo "AR: $2"; \
$(AR) $1 $2 || { echo "$(AR) $1 $2 FAILED!" ; exit 1 ; }
endef
define CLEAN
@rm -f *.o *.a
endef
HOSTCC = gcc
HOSTINCLUDES = -I.
HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe
HOSTLDFLAGS =

View File

@ -0,0 +1,43 @@
############################################################################
# configs/mirtoo/nxffs/appconfig
#
# Copyright (C) 2012 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.
#
############################################################################
# Path to example in apps/examples containing the user_start entry point
CONFIGURED_APPS += examples/nsh
# The NSH application library
CONFIGURED_APPS += system/readline
CONFIGURED_APPS += nshlib

File diff suppressed because it is too large Load Diff

77
configs/mirtoo/nxffs/setenv.sh Executable file
View File

@ -0,0 +1,77 @@
#!/bin/bash
# configs/mirtoo/nxffs/setenv.sh
#
# Copyright (C) 2012 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.
#
if [ "$_" = "$0" ] ; then
echo "You must source this script, not run it!" 1>&2
exit 1
fi
if [ -z "${PATH_ORIG}" ]; then export PATH_ORIG="${PATH}"; fi
WD=`pwd`
if [ ! -x "setenv.sh" ]; then
echo "This script must be executed from the top-level NuttX build directory"
exit 1
fi
# This the Cygwin path to the location where I installed the MicroChip
# PIC32MX C32 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 a different version of if you install the
# toolchain at a different location
export TOOLCHAIN_BIN="/cygdrive/c/MicroChip/mplabc32/v1.12/bin"
# This the Linux path to the location where I installed the MicroChip
# PIC32MX XC32 toolchain under Linux. This is the default install
# location. You will also have to edit this if you install a different
# version of if you install the toolchain at a different location
#export TOOLCHAIN_BIN="/opt/microchip/xc32/v1.00/bin"
# This the Cygwin path to the location where I installed the Pinguino
# toolchain under Windows. You will have to edit this if you install the
# tool chain in a different location or use a different version
#export TOOLCHAIN_BIN="/cygdrive/c/PinguinoX.3/win32/p32/bin"
# This the Linux path to the location where I installed the microchipOpen
# toolchain under Linux. You will have to edit this if you use the
# microchipOpen toolchain.
#export TOOLCHAIN_BIN="~/projects/microchipopen/v105_freeze/pic32-v105-freeze-20120622/install-image/bin"
# This is the path to the toosl subdirectory
export PIC32TOOL_DIR="${WD}/tools/pic32mx"
# Add the path to the toolchain to the PATH varialble
export PATH="${TOOLCHAIN_BIN}:${PIC32TOOL_DIR}:/sbin:/usr/sbin:${PATH_ORIG}"
echo "PATH : ${PATH}"

View File

@ -88,10 +88,20 @@ ifeq ($(CONFIG_PIC32MX_MICROCHIPOPENL),y)
LDFLAGS += -nostartfiles -nodefaultlibs
LDSCRIPT = c32-debug.ld
endif
ifeq ($(CONFIG_PIC32MX_MIPSELFL),y)
ifeq ($(CONFIG_PIC32MX_PINGUINOW),y)
# Penquino mips-elf toolchain under Windows
CROSSDEV = mips-
WINTOOL = y
MAXOPTIMIZATION = -O2
ARCHCPUFLAGS = -mlong32 -membedded-data -msoft-float -march=24kc -EL
ARCHPICFLAGS = -fpic -membedded-pic
LDFLAGS += -nostartfiles -nodefaultlibs
LDSCRIPT = mips-elf-debug.ld
endif
ifeq ($(CONFIG_PIC32MX_PINGUINOL),y)
# Penquino mips-elf toolchain under Linux
CROSSDEV = mips-elf-
# MAXOPTIMIZATION = -O2
MAXOPTIMIZATION = -O2
ARCHCPUFLAGS = -mlong32 -membedded-data -msoft-float -march=24kc -EL
ARCHPICFLAGS = -fpic -membedded-pic
LDFLAGS += -nostartfiles -nodefaultlibs

View File

@ -106,7 +106,7 @@ CONFIG_ARCH_DMA=n
#
# Enable support for RAM-based functions
# (If selected, then modifications are needed in ld.script as well)
# (If selected, then modifications are needed in linker scripts as well)
#
CONFIG_PIC32MX_RAMFUNCS=n
@ -118,6 +118,8 @@ CONFIG_PIC32MX_MICROCHIPL=n
CONFIG_PIC32MX_MICROCHIPW_LITE=y
CONFIG_PIC32MX_MICROCHIPL_LITE=n
CONFIG_PIC32MX_MICROCHIPOPENL=n
CONFIG_PIC32MX_PINGUINOW=n
CONFIG_PIC32MX_PINGUINOL=n
#
# Individual subsystems can be enabled:

View File

@ -58,6 +58,11 @@ export TOOLCHAIN_BIN="/cygdrive/c/MicroChip/mplabc32/v1.12/bin"
# version of if you install the toolchain at a different location
#export TOOLCHAIN_BIN="/opt/microchip/xc32/v1.00/bin"
# This the Cygwin path to the location where I installed the Pinguino
# toolchain under Windows. You will have to edit this if you install the
# tool chain in a different location or use a different version
#export TOOLCHAIN_BIN="/cygdrive/c/PinguinoX.3/win32/p32/bin"
# This the Linux path to the location where I installed the microchipOpen
# toolchain under Linux. You will have to edit this if you use the
# microchipOpen toolchain.

View File

@ -40,6 +40,8 @@
#include <nuttx/config.h>
#include <sys/mount.h>
#include <stdbool.h>
#include <stdio.h>
#include <errno.h>
@ -48,6 +50,7 @@
#ifdef CONFIG_PIC32MX_SPI2
# include <nuttx/spi.h>
# include <nuttx/mtd.h>
# include <nuttx/fs/nxffs.h>
#endif
#include "pic32mx-internal.h"
@ -76,6 +79,12 @@
# define CONFIG_NSH_SST25MINOR 0
#endif
/* Can't support both FAT and NXFFS */
#if defined(CONFIG_FS_FAT) && defined(CONFIG_FS_NXFFS)
# warning "Can't support both FAT and NXFFS -- using FAT"
#endif
/****************************************************************************
* Public Functions
****************************************************************************/
@ -113,14 +122,34 @@ int nsh_archinitialize(void)
return -ENODEV;
}
#ifndef CONFIG_FS_NXFFS
/* And finally, use the FTL layer to wrap the MTD driver as a block driver */
ret = ftl_initialize(CONFIG_NSH_SST25MINOR, mtd);
if (ret < 0)
{
fdbg("ERROR: Initialize the FTL layer\n");
return -ENODEV;
return ret;
}
#else
/* Initialize to provide NXFFS on the MTD interface */
ret = nxffs_initialize(mtd);
if (ret < 0)
{
fdbg("ERROR: NXFFS initialization failed: %d\n", -ret);
return ret;
}
/* Mount the file system at /mnt/sst25 */
ret = mount(NULL, "/mnt/sst25", "nxffs", 0, NULL);
if (ret < 0)
{
fdbg("ERROR: Failed to mount the NXFFS volume: %d\n", errno);
return ret;
}
#endif
#endif
return OK;
}

View File

@ -211,14 +211,14 @@ Toolchains
Note that the tools will have the prefix, mypic32- so, for example, the
compiler will be called mypic32-gcc.
Penguino mips-elf Toolchain
Pinguino mips-elf Toolchain
---------------------------
Another option is the mips-elf toolchain used with the Penguino project. This
Another option is the mips-elf toolchain used with the Pinguino project. This
is a relatively current mips-elf GCC and should provide free C++ support as
well. This toolchain can be downloded from the Penguino website:
well. This toolchain can be downloded from the Pinguino website:
http://wiki.pinguino.cc/index.php/Main_Page#Download . There is some general
information about using the Penguino mips-elf toolchain in this thread:
information about using the Pinguino mips-elf toolchain in this thread:
http://tech.groups.yahoo.com/group/nuttx/message/1821
See also configs/mirtoo/README.txt. There is an experimental (untested)

View File

@ -428,14 +428,14 @@ Toolchains
Note that the tools will have the prefix, mypic32- so, for example, the
compiler will be called mypic32-gcc.
Penguino mips-elf Toolchain
Pinguino mips-elf Toolchain
---------------------------
Another option is the mips-elf toolchain used with the Penguino project. This
Another option is the mips-elf toolchain used with the Pinguino project. This
is a relatively current mips-elf GCC and should provide free C++ support as
well. This toolchain can be downloded from the Penguino website:
well. This toolchain can be downloded from the Pinguino website:
http://wiki.pinguino.cc/index.php/Main_Page#Download . There is some general
information about using the Penguino mips-elf toolchain in this thread:
information about using the Pinguino mips-elf toolchain in this thread:
http://tech.groups.yahoo.com/group/nuttx/message/1821
See also configs/mirtoo/README.txt. There is an experimental (untested)

View File

@ -196,14 +196,14 @@ Toolchains
Note that the tools will have the prefix, mypic32- so, for example, the
compiler will be called mypic32-gcc.
Penguino mips-elf Toolchain
Pinguino mips-elf Toolchain
---------------------------
Another option is the mips-elf toolchain used with the Penguino project. This
Another option is the mips-elf toolchain used with the Pinguino project. This
is a relatively current mips-elf GCC and should provide free C++ support as
well. This toolchain can be downloded from the Penguino website:
well. This toolchain can be downloded from the Pinguino website:
http://wiki.pinguino.cc/index.php/Main_Page#Download . There is some general
information about using the Penguino mips-elf toolchain in this thread:
information about using the Pinguino mips-elf toolchain in this thread:
http://tech.groups.yahoo.com/group/nuttx/message/1821
See also configs/mirtoo/README.txt. There is an experimental (untested)

View File

@ -221,14 +221,14 @@ Toolchains
Note that the tools will have the prefix, mypic32- so, for example, the
compiler will be called mypic32-gcc.
Penguino mips-elf Toolchain
Pinguino mips-elf Toolchain
---------------------------
Another option is the mips-elf toolchain used with the Penguino project. This
Another option is the mips-elf toolchain used with the Pinguino project. This
is a relatively current mips-elf GCC and should provide free C++ support as
well. This toolchain can be downloded from the Penguino website:
well. This toolchain can be downloded from the Pinguino website:
http://wiki.pinguino.cc/index.php/Main_Page#Download . There is some general
information about using the Penguino mips-elf toolchain in this thread:
information about using the Pinguino mips-elf toolchain in this thread:
http://tech.groups.yahoo.com/group/nuttx/message/1821
See also configs/mirtoo/README.txt. There is an experimental (untested)