From 781b6644f9f46c979bf36dfecd8c69546513da12 Mon Sep 17 00:00:00 2001 From: patacongo Date: Fri, 22 Jun 2012 18:58:24 +0000 Subject: [PATCH] Add support for the microchipOpen toolchain git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4864 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- nuttx/configs/mirtoo/README.txt | 24 ++++++++++++++++++++--- nuttx/configs/mirtoo/ostest/Make.defs | 12 ++++++++++-- nuttx/configs/mirtoo/ostest/defconfig | 1 + nuttx/configs/mirtoo/ostest/setenv.sh | 7 ++++++- nuttx/configs/pcblogic-pic32mx/README.txt | 16 +++++++++++++-- nuttx/configs/pic32-starterkit/README.txt | 16 +++++++++++++-- nuttx/configs/pic32mx7mmb/README.txt | 16 +++++++++++++-- nuttx/configs/sure-pic32mx/README.txt | 16 +++++++++++++-- nuttx/configs/ubw32/README.txt | 18 +++++++++++++---- 9 files changed, 108 insertions(+), 18 deletions(-) diff --git a/nuttx/configs/mirtoo/README.txt b/nuttx/configs/mirtoo/README.txt index 5b1b9dd5b..9074c6875 100644 --- a/nuttx/configs/mirtoo/README.txt +++ b/nuttx/configs/mirtoo/README.txt @@ -348,14 +348,32 @@ Toolchains An alternative, build-it-yourself toolchain is available here: http://sourceforge.net/projects/microchipopen/ . These tools were last updated circa 2010. However, this is the only way that I know of - to get free C++ support. + to get free C++ support. Use this option to select the microchipopen + toolchain: + + CONFIG_PIC32MX_MICROCHIPOPENL - microchipOpen toolchain for Linux + + And set the path appropriately in the setenv.sh file. Building MicrochipOpen (on Linux) + --------------------------------- 1) Get the build script from this location: - http://microchipopen.svn.sourceforge.net/viewvc/microchipopen/ccompiler4pic32/buildscripts/trunk/ + + http://microchipopen.svn.sourceforge.net/viewvc/microchipopen/ccompiler4pic32/buildscripts/trunk/ + 2) Build the code using the build script, for example: - ./build.sh -b v105_freeze + + ./build.sh -b v105_freeze + + This will check out the selected branch and build the tools. + + 3) Binaries will then be available in a subdirectory with a name something like + pic32-v105-freeze-20120622/install-image/bin (depending on the current data + and the branch that you selected. + + Note that the tools will have the prefix, mypic32- so, for example, the + compiler will be called mypic32-gcc. This will check out the selected branch and build the tools. diff --git a/nuttx/configs/mirtoo/ostest/Make.defs b/nuttx/configs/mirtoo/ostest/Make.defs index 7f1ea6ed6..4e7ce69b4 100644 --- a/nuttx/configs/mirtoo/ostest/Make.defs +++ b/nuttx/configs/mirtoo/ostest/Make.defs @@ -58,7 +58,7 @@ ifeq ($(CONFIG_PIC32MX_MICROCHIPW_LITE),y) LDFLAGS += -nostartfiles -nodefaultlibs endif ifeq ($(CONFIG_PIC32MX_MICROCHIPL),y) - # Microchip XC32 toolchain under Linux + # Microchip C32 toolchain under Linux CROSSDEV = pic32- # CROSSDEV = xc32- MAXOPTIMIZATION = -O2 @@ -67,7 +67,7 @@ ifeq ($(CONFIG_PIC32MX_MICROCHIPL),y) LDFLAGS += -nostartfiles -nodefaultlibs endif ifeq ($(CONFIG_PIC32MX_MICROCHIPL_LITE),y) - # Microchip XC32 toolchain under Linux + # Microchip C32 toolchain under Linux CROSSDEV = pic32- # CROSSDEV = xc32- # MAXOPTIMIZATION = -O2 @@ -75,6 +75,14 @@ ifeq ($(CONFIG_PIC32MX_MICROCHIPL_LITE),y) ARCHPICFLAGS = -fpic -membedded-pic LDFLAGS += -nostartfiles -nodefaultlibs 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 +endif ifeq ($(WINTOOL),y) # Windows-native toolchains diff --git a/nuttx/configs/mirtoo/ostest/defconfig b/nuttx/configs/mirtoo/ostest/defconfig index c15d7b7e1..5ed0043cc 100644 --- a/nuttx/configs/mirtoo/ostest/defconfig +++ b/nuttx/configs/mirtoo/ostest/defconfig @@ -117,6 +117,7 @@ CONFIG_PIC32MX_MICROCHIPW=n CONFIG_PIC32MX_MICROCHIPL=n CONFIG_PIC32MX_MICROCHIPW_LITE=y CONFIG_PIC32MX_MICROCHIPL_LITE=n +CONFIG_PIC32MX_MICROCHIPOPENL=n # # Individual subsystems can be enabled: diff --git a/nuttx/configs/mirtoo/ostest/setenv.sh b/nuttx/configs/mirtoo/ostest/setenv.sh index 1175bd482..8551e9bbc 100755 --- a/nuttx/configs/mirtoo/ostest/setenv.sh +++ b/nuttx/configs/mirtoo/ostest/setenv.sh @@ -53,11 +53,16 @@ fi 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 Linus. This is the default install +# 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 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" diff --git a/nuttx/configs/pcblogic-pic32mx/README.txt b/nuttx/configs/pcblogic-pic32mx/README.txt index fbc8e4704..a28f42ee1 100644 --- a/nuttx/configs/pcblogic-pic32mx/README.txt +++ b/nuttx/configs/pcblogic-pic32mx/README.txt @@ -195,9 +195,21 @@ Toolchains Building MicrochipOpen (on Linux) 1) Get the build script from this location: - http://microchipopen.svn.sourceforge.net/viewvc/microchipopen/ccompiler4pic32/buildscripts/trunk/ + + http://microchipopen.svn.sourceforge.net/viewvc/microchipopen/ccompiler4pic32/buildscripts/trunk/ + 2) Build the code using the build script, for example: - ./build.sh -b v105_freeze + + ./build.sh -b v105_freeze + + This will check out the selected branch and build the tools. + + 3) Binaries will then be available in a subdirectory with a name something like + pic32-v105-freeze-20120622/install-image/bin (depending on the current data + and the branch that you selected. + + Note that the tools will have the prefix, mypic32- so, for example, the + compiler will be called mypic32-gcc. This will check out the selected branch and build the tools. diff --git a/nuttx/configs/pic32-starterkit/README.txt b/nuttx/configs/pic32-starterkit/README.txt index 27c312d56..0ebb95d18 100644 --- a/nuttx/configs/pic32-starterkit/README.txt +++ b/nuttx/configs/pic32-starterkit/README.txt @@ -412,9 +412,21 @@ Toolchains Building MicrochipOpen (on Linux) 1) Get the build script from this location: - http://microchipopen.svn.sourceforge.net/viewvc/microchipopen/ccompiler4pic32/buildscripts/trunk/ + + http://microchipopen.svn.sourceforge.net/viewvc/microchipopen/ccompiler4pic32/buildscripts/trunk/ + 2) Build the code using the build script, for example: - ./build.sh -b v105_freeze + + ./build.sh -b v105_freeze + + This will check out the selected branch and build the tools. + + 3) Binaries will then be available in a subdirectory with a name something like + pic32-v105-freeze-20120622/install-image/bin (depending on the current data + and the branch that you selected. + + Note that the tools will have the prefix, mypic32- so, for example, the + compiler will be called mypic32-gcc. This will check out the selected branch and build the tools. diff --git a/nuttx/configs/pic32mx7mmb/README.txt b/nuttx/configs/pic32mx7mmb/README.txt index b1297fa2d..7f5e7cb0f 100644 --- a/nuttx/configs/pic32mx7mmb/README.txt +++ b/nuttx/configs/pic32mx7mmb/README.txt @@ -180,9 +180,21 @@ Toolchains Building MicrochipOpen (on Linux) 1) Get the build script from this location: - http://microchipopen.svn.sourceforge.net/viewvc/microchipopen/ccompiler4pic32/buildscripts/trunk/ + + http://microchipopen.svn.sourceforge.net/viewvc/microchipopen/ccompiler4pic32/buildscripts/trunk/ + 2) Build the code using the build script, for example: - ./build.sh -b v105_freeze + + ./build.sh -b v105_freeze + + This will check out the selected branch and build the tools. + + 3) Binaries will then be available in a subdirectory with a name something like + pic32-v105-freeze-20120622/install-image/bin (depending on the current data + and the branch that you selected. + + Note that the tools will have the prefix, mypic32- so, for example, the + compiler will be called mypic32-gcc. This will check out the selected branch and build the tools. diff --git a/nuttx/configs/sure-pic32mx/README.txt b/nuttx/configs/sure-pic32mx/README.txt index 594dad59b..32f93ba00 100644 --- a/nuttx/configs/sure-pic32mx/README.txt +++ b/nuttx/configs/sure-pic32mx/README.txt @@ -261,9 +261,21 @@ Toolchains Building MicrochipOpen (on Linux) 1) Get the build script from this location: - http://microchipopen.svn.sourceforge.net/viewvc/microchipopen/ccompiler4pic32/buildscripts/trunk/ + + http://microchipopen.svn.sourceforge.net/viewvc/microchipopen/ccompiler4pic32/buildscripts/trunk/ + 2) Build the code using the build script, for example: - ./build.sh -b v105_freeze + + ./build.sh -b v105_freeze + + This will check out the selected branch and build the tools. + + 3) Binaries will then be available in a subdirectory with a name something like + pic32-v105-freeze-20120622/install-image/bin (depending on the current data + and the branch that you selected. + + Note that the tools will have the prefix, mypic32- so, for example, the + compiler will be called mypic32-gcc. This will check out the selected branch and build the tools. diff --git a/nuttx/configs/ubw32/README.txt b/nuttx/configs/ubw32/README.txt index d4d44be03..7a34745cb 100644 --- a/nuttx/configs/ubw32/README.txt +++ b/nuttx/configs/ubw32/README.txt @@ -205,11 +205,21 @@ Toolchains Building MicrochipOpen (on Linux) 1) Get the build script from this location: - http://microchipopen.svn.sourceforge.net/viewvc/microchipopen/ccompiler4pic32/buildscripts/trunk/ - 2) Build the code using the build script, for example: - ./build.sh -b v105_freeze - This will check out the selected branch and build the tools. + http://microchipopen.svn.sourceforge.net/viewvc/microchipopen/ccompiler4pic32/buildscripts/trunk/ + + 2) Build the code using the build script, for example: + + ./build.sh -b v105_freeze + + This will check out the selected branch and build the tools. + + 3) Binaries will then be available in a subdirectory with a name something like + pic32-v105-freeze-20120622/install-image/bin (depending on the current data + and the branch that you selected. + + Note that the tools will have the prefix, mypic32- so, for example, the + compiler will be called mypic32-gcc. MPLAB/C32 vs MPLABX/X32 -----------------------