diff options
author | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2012-06-22 18:35:25 +0000 |
---|---|---|
committer | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2012-06-22 18:35:25 +0000 |
commit | cc329b27ce729d38790e56a5240ecb2eb7a9be27 (patch) | |
tree | 0675a23819f8cd3235c3d18fce8c98b7cc0b55b7 /nuttx/configs/mirtoo | |
parent | bafac891669737a88d84879cdc4035870937ee1a (diff) | |
download | px4-firmware-cc329b27ce729d38790e56a5240ecb2eb7a9be27.tar.gz px4-firmware-cc329b27ce729d38790e56a5240ecb2eb7a9be27.tar.bz2 px4-firmware-cc329b27ce729d38790e56a5240ecb2eb7a9be27.zip |
Enable LEDs on Mirtoo board
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4863 7fd9a85b-ad96-42d3-883c-3090e2eb8679
Diffstat (limited to 'nuttx/configs/mirtoo')
-rw-r--r-- | nuttx/configs/mirtoo/README.txt | 69 | ||||
-rw-r--r-- | nuttx/configs/mirtoo/ostest/Make.defs | 12 |
2 files changed, 68 insertions, 13 deletions
diff --git a/nuttx/configs/mirtoo/README.txt b/nuttx/configs/mirtoo/README.txt index 4e9c7ebea..5b1b9dd5b 100644 --- a/nuttx/configs/mirtoo/README.txt +++ b/nuttx/configs/mirtoo/README.txt @@ -322,21 +322,70 @@ Additional signals available via Peripheral Pin Selections (PPS) Toolchains ========== - I am using the free, LITE version of the PIC32MX toolchain available + MPLAB/C32 + --------- + + I am using the free, "Lite" version of the PIC32MX toolchain available for download from the microchip.com web site. I am using the Windows - version. The MicroChip toolchain is the only toolchaing currently + version. The MicroChip toolchain is the only toolchain currently supported in these configurations, but it should be a simple matter to adapt to other toolchains by modifying the Make.defs file include in each configuration. Toolchain Options: - CONFIG_PIC32MX_MICROCHIPW - MicroChip full toolchain for Windows - CONFIG_PIC32MX_MICROCHIPL - MicroChip full toolchain for Linux - CONFIG_PIC32MX_MICROCHIPW_LITE - MicroChip LITE toolchain for Windows - CONFIG_PIC32MX_MICROCHIPL_LITE - MicroChip LITE toolchain for Linux + CONFIG_PIC32MX_MICROCHIPW - MicroChip full toolchain for Windows (C32) + CONFIG_PIC32MX_MICROCHIPL - MicroChip full toolchain for Linux (C32) + CONFIG_PIC32MX_MICROCHIPW_LITE - MicroChip LITE toolchain for Windows (C32) + CONFIG_PIC32MX_MICROCHIPL_LITE - MicroChip LITE toolchain for Linux (C32) + + NOTE: The "Lite" versions of the toolchain does not support C++. Also + certain optimization levels are not supported by the Lite toolchain. + + MicrochipOpen + ------------- + + 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. + + 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. + + MPLAB/C32 vs MPLABX/X32 + ----------------------- + + It appears that Microchip is phasing out the MPLAB/C32 toolchain and replacing + it with MPLABX and XC32. At present, the XC32 toolchain is *not* compatible + with the NuttX build scripts. Here are some of the issues that I see when trying + to build with XC32: + + 1) Make.def changes: You have to change the tool prefix: + + CROSSDEV=xc32- + + 2) debug.ld/release.ld: The like expect some things that are not present in + the current linker scripts (or are expected with different names). Here + are some partial fixes: + + Rename: kseg0_progmem to kseg0_program_mem + Rename: kseg1_datamem to kseg1_data_mem + + Even then, there are more warnings from the linker and some undefined symbols + for non-NuttX code that resides in the unused Microchip libraries. See this + email thread at http://tech.groups.yahoo.com/group/nuttx/message/1458 for more + information. You will have to solve at least this undefined symbol problem if + you want to used the XC32 toolchain. Windows Native Toolchains + ------------------------- NOTE: There are several limitations to using a Windows based toolchain in a Cygwin environment. The three biggest are: @@ -708,7 +757,9 @@ Where <subdir> is one of the following: CONFIG_PIC32MX_MICROCHIPW_LITE=y : Lite version of widows toolchain - To switch to the Linux XC32 toolchain you will have to change (1) the - toolchain selection in .config (after configuratio) and (2) the - path to the toolchain in setenv.sh. + To switch to the Linux C32 toolchain you will have to change (1) the + toolchain selection in .config (after configuration) and (2) the + path to the toolchain in setenv.sh. See notes above with regard to + the XC32 toolchain. + diff --git a/nuttx/configs/mirtoo/ostest/Make.defs b/nuttx/configs/mirtoo/ostest/Make.defs index 0c9df2138..7f1ea6ed6 100644 --- a/nuttx/configs/mirtoo/ostest/Make.defs +++ b/nuttx/configs/mirtoo/ostest/Make.defs @@ -40,6 +40,7 @@ include ${TOPDIR}/.config 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 @@ -49,15 +50,17 @@ endif ifeq ($(CONFIG_PIC32MX_MICROCHIPW_LITE),y) # Microchip C32 toolchain under Windows CROSSDEV = pic32- + # CROSSDEV = xc32- WINTOOL = y -# MAXOPTIMIZATION = -O2 + # MAXOPTIMIZATION = -O2 ARCHCPUFLAGS = -mprocessor=elf32pic32mx -mno-float -mlong32 -membedded-data ARCHPICFLAGS = -fpic -membedded-pic LDFLAGS += -nostartfiles -nodefaultlibs endif ifeq ($(CONFIG_PIC32MX_MICROCHIPL),y) # Microchip XC32 toolchain under Linux - CROSSDEV = xc32- + CROSSDEV = pic32- + # CROSSDEV = xc32- MAXOPTIMIZATION = -O2 ARCHCPUFLAGS = -mprocessor=elf32pic32mx -mno-float -mlong32 -membedded-data ARCHPICFLAGS = -fpic -membedded-pic @@ -65,8 +68,9 @@ ifeq ($(CONFIG_PIC32MX_MICROCHIPL),y) endif ifeq ($(CONFIG_PIC32MX_MICROCHIPL_LITE),y) # Microchip XC32 toolchain under Linux - CROSSDEV = xc32- -# MAXOPTIMIZATION = -O2 + CROSSDEV = pic32- + # CROSSDEV = xc32- + # MAXOPTIMIZATION = -O2 ARCHCPUFLAGS = -mprocessor=elf32pic32mx -mno-float -mlong32 -membedded-data ARCHPICFLAGS = -fpic -membedded-pic LDFLAGS += -nostartfiles -nodefaultlibs |