diff options
-rw-r--r-- | misc/buildroot/ChangeLog | 2 | ||||
-rw-r--r-- | misc/buildroot/Config.in | 6 | ||||
-rw-r--r-- | misc/buildroot/configs/README.txt | 157 | ||||
-rw-r--r-- | misc/buildroot/configs/cortexm0-eabi-defconfig-4.6.3 | 124 | ||||
-rw-r--r-- | misc/buildroot/toolchain/binutils/Config.in | 12 | ||||
-rw-r--r-- | misc/buildroot/toolchain/gcc/Config.in | 8 | ||||
-rw-r--r-- | misc/buildroot/toolchain/gcc/Makefile.in | 3 | ||||
-rw-r--r-- | nuttx/arch/arm/include/nuc1xx/chip.h | 104 | ||||
-rw-r--r-- | nuttx/arch/arm/include/nuc1xx/irq.h | 5 | ||||
-rw-r--r-- | nuttx/arch/arm/src/armv6-m/Kconfig | 12 | ||||
-rw-r--r-- | nuttx/arch/arm/src/armv6-m/Toolchain.defs | 22 | ||||
-rw-r--r-- | nuttx/arch/arm/src/nuc1xx/chip/nuc_config.h | 8 | ||||
-rw-r--r-- | nuttx/configs/nutiny-nuc120/README.txt | 43 | ||||
-rw-r--r-- | nuttx/configs/nutiny-nuc120/ostest/defconfig | 169 | ||||
-rwxr-xr-x | nuttx/configs/nutiny-nuc120/ostest/setenv.sh | 4 | ||||
-rw-r--r-- | nuttx/fs/fs_closedir.c | 4 |
16 files changed, 421 insertions, 262 deletions
diff --git a/misc/buildroot/ChangeLog b/misc/buildroot/ChangeLog index 0053b1e92..e6ad07646 100644 --- a/misc/buildroot/ChangeLog +++ b/misc/buildroot/ChangeLog @@ -131,3 +131,5 @@ buildroot-1.12 2011-xx-xx <gnutt@nuttx.org> * Fix typo toolchain/gdb/Config.in that prevented GDB 7.4 from building (from Ken Bannister). + * Add support for a Cortex-M0 toolchain based on GCC 4.6.3. + diff --git a/misc/buildroot/Config.in b/misc/buildroot/Config.in index fe33b158d..21444f056 100644 --- a/misc/buildroot/Config.in +++ b/misc/buildroot/Config.in @@ -92,7 +92,9 @@ config BR2_arm926t config BR2_arm1136jf_s bool "ARM1136JF-S" config BR2_cortex_m3 - bool "Cortex-M3" + bool "Cortex-M3/M4" +config BR2_cortex_m0 + bool "Cortex-M0" config BR2_sa110 bool "SA110" config BR2_sa1100 @@ -217,6 +219,7 @@ config BR2_GCC_TARGET_TUNE default arm9tdmi if BR2_arm926t default arm1136jf-s if BR2_arm1136jf_s default cortex-m3 if BR2_cortex_m3 + default cortex-m0 if BR2_cortex_m0 default strongarm110 if BR2_sa110 default strongarm1100 if BR2_sa1100 default xscale if BR2_xscale @@ -235,6 +238,7 @@ config BR2_GCC_TARGET_ARCH default armv5te if BR2_arm926t || BR2_arm10t || BR2_xscale default armv6j if BR2_arm1136jf_s default armv7-m if BR2_cortex_m3 + default armv6-m if BR2_cortex_m0 default iwmmxt if BR2_iwmmxt config BR2_GCC_TARGET_ABI diff --git a/misc/buildroot/configs/README.txt b/misc/buildroot/configs/README.txt index 6b76ff80d..0e9c6df5e 100644 --- a/misc/buildroot/configs/README.txt +++ b/misc/buildroot/configs/README.txt @@ -14,117 +14,124 @@ AVAILABLE CONFIGURATIONS ^^^^^^^^^^^^^^^^^^^^^^^^ arm-defconfig - Builds an OABI ARM toolchain using gcc 3.4.6 + Builds an OABI ARM toolchain using gcc 3.4.6 arm7tdmi-defconfig-4.2.4 arm920t-defconfig-4.2.4 arm926t-defconfig-4.2.4 - Builds an OABI ARM toolchain using gcc 4.2.4. This configuration - builds both gcc and g++. There are three versions: one for - arm7tdmi (armv4t), arm920t (armv4t) and arm926t (arv5t) because - of differences in the way that soft floating is handled in between - the armv4t and arm5t architectures. + Builds an OABI ARM toolchain using gcc 4.2.4. This configuration + builds both gcc and g++. There are three versions: one for + arm7tdmi (armv4t), arm920t (armv4t) and arm926t (arv5t) because + of differences in the way that soft floating is handled in between + the armv4t and arm5t architectures. - NOTE: The newer versions of GCC generate new sections and can - cause some problems for NuttX configurations developed under older - toolchains. In particular, arm-elf-objcopy may fail with strange - errors. If this occurs, try adding the following arguments to the - arm-elf-objcopy command "-R .note -R .note.gnu.build-id -R .comment" + NOTE: The newer versions of GCC generate new sections and can + cause some problems for NuttX configurations developed under older + toolchains. In particular, arm-elf-objcopy may fail with strange + errors. If this occurs, try adding the following arguments to the + arm-elf-objcopy command "-R .note -R .note.gnu.build-id -R .comment" - This logic is several configuration Make.defs files: + This logic is several configuration Make.defs files: - HOSTOS = ${shell uname -o} + HOSTOS = ${shell uname -o} - ARCHCCVERSION = ${shell $(CC) -v 2>&1 | sed -n '/^gcc version/p' | sed -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q'} - ARCHCCMAJOR = ${shell echo $(ARCHCCVERSION) | cut -d'.' -f1} + ARCHCCVERSION = ${shell $(CC) -v 2>&1 | sed -n '/^gcc version/p' | sed -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q'} + ARCHCCMAJOR= ${shell echo $(ARCHCCVERSION) | cut -d'.' -f1} - ifeq ($(ARCHCCMAJOR),4) - ifneq ($(HOSTOS),Cygwin) - OBJCOPYARGS = -R .note -R .note.gnu.build-id -R .comment - endif - endif + ifeq ($(ARCHCCMAJOR),4) + ifneq ($(HOSTOS),Cygwin) + OBJCOPYARGS = -R .note -R .note.gnu.build-id -R .comment + endif + endif - This change probably applies to other architectures as well (?) + This change probably applies to other architectures as well (?) arm920t-defconfig-4.3.3 arm7tdmi-defconfig-4.3.3 - Builds an OABI ARM toolchain using gcc 4.3.3. These configurations - builds both gcc and g++ for the arm7tdmi (armv4t) or the arm920t - (armv4t). These are udates to *-defconfig-4.2.4 (see notes above). + Builds an OABI ARM toolchain using gcc 4.3.3. These configurations + builds both gcc and g++ for the arm7tdmi (armv4t) or the arm920t + (armv4t). These are udates to *-defconfig-4.2.4 (see notes above). + +arm926t-defconfig-nxflat + This configuration build an NXFLAT toolchain (only) for + use with the ARM9. avr-defconfig-4.3.3 avr-defconfig-5.4.2 - Builds an AVR toolchain using gcc 4.3.3 or 4.5.2. This configuration - builds both gcc and g++ for the AVR (armv4t). This toolchain - is intended to support the NuttX ATmega128 port. + Builds an AVR toolchain using gcc 4.3.3 or 4.5.2. This configuration + builds both gcc and g++ for the AVR (armv4t). This toolchain + is intended to support the NuttX ATmega128 port. + +cortexm0-eabi-defconfig-4.6.3 + Builds an EABI ARM toolchain for the Cortex-M0 using gcc 4.6.3. + This configuration builds gcc and g++ (NXFLAT is not currently + supported for the Cortex-M0). cortexm3-defconfig-4.3.3 - Builds an OABI ARM toolchain for the Cortex-M3 using gcc 4.3.3. - This configuration builds gcc, g++ and the NXFLAT toolchain. + Builds an OABI ARM toolchain for the Cortex-M3 using gcc 4.3.3. + This configuration builds gcc, g++ and the NXFLAT toolchain. + +cortexm3-eabi-defconfig-4.5.2 + Builds an EABI ARM toolchain for the Cortex-M3 using gcc 4.5.2. + This configuration builds gcc, g++ and the NXFLAT toolchain. cortexm3-eabi-defconfig-4.6.3 - Builds an EABI ARM toolchain for the Cortex-M3 using gcc 4.6.3. - This configuration builds gcc, g++ and the NXFLAT toolchain. + Builds an EABI ARM toolchain for the Cortex-M3 using gcc 4.6.3. + This configuration builds gcc, g++ and the NXFLAT toolchain. cortexm3-defconfig-nxflat -arm926t-defconfig-nxflat - This configuration build an NXFLAT toolchain (only) for - use with the Cortex-M3 or ARM9 (untested on ARM9 as of this - writing). - -cortexm3-eabi-defconfig-4.5.2 - Builds an EABI ARM toolchain for the Cortex-M3 using gcc 4.5.2. - This configuration builds gcc, g++ and the NXFLAT toolchain. + This configuration build an NXFLAT toolchain (only) for + use with the Cortex-M3. bfin-defconfig-4.2.4 - Builds an Blackfin toolchain using gcc 4.2.4 + Builds an Blackfin toolchain using gcc 4.2.4 h8300_config - Builds an H8/300 toolchain using gcc 3.4.6 + Builds an H8/300 toolchain using gcc 3.4.6 i486-defconfig-4.3.3 - Builds an i486 cross development toolchain using gcc 4.3.3. Why would - you want such a thing? On Linux, of course, such a thing is not needed - because you can use the installed GCC to build i486 ELF binaries. But - that will not work under Cygwin! The Cygwin toolchain (and probably - MinGW), build DOS MZ format executables (i.e., .exe files). That is - probably not usable for most NuttX targets. Instead, you should use this - i486-elf-gcc to generate true ELF binaries under Cygwin. + Builds an i486 cross development toolchain using gcc 4.3.3. Why would + you want such a thing? On Linux, of course, such a thing is not needed + because you can use the installed GCC to build i486 ELF binaries. But + that will not work under Cygwin! The Cygwin toolchain (and probably + MinGW), build DOS MZ format executables (i.e., .exe files). That is + probably not usable for most NuttX targets. Instead, you should use this + i486-elf-gcc to generate true ELF binaries under Cygwin. m32c_defconfig_4.2.4 m32c_defconfig_4.3.3 - Build a toolchain for use with the M16C port using eith gcc 4.2.4 or 4.3.3 + Build a toolchain for use with the M16C port using eith gcc 4.2.4 or 4.3.3 m68hc11-config m68hc12-config-3.4.6 - Builds an hc11/hc12 toolchain using gcc 3.4.6 . NOT RECOMMENDED for hcs12; + Builds an hc11/hc12 toolchain using gcc 3.4.6 . NOT RECOMMENDED for hcs12; Use m9s12x_config_3.3.6 m68hc12-config-4.3.3 - Builds an hc11/hc12 toolchain using gcc 4.3.3.NOT RECOMMENDED for hcs12; + Builds an hc11/hc12 toolchain using gcc 4.3.3.NOT RECOMMENDED for hcs12; Use m9s12x_config_3.3.6 - This configuration fails to build with the following error: + This configuration fails to build with the following error: - make[3]: Entering directory `blabla/buildroot/toolchain_build_m68hc12/gcc-4.3.3-build/m68hc12-elf/libgcc' - ... - blabla/buildroot/toolchain_build_m68hc12/gcc-4.3.3/libgcc/../gcc/libgcc2.c:566: internal compiler error: in init_move_cost, at regclass.c:323 - Please submit a full bug report, - with preprocessed source if appropriate. - See <http://gcc.gnu.org/bugs.html> for instructions. - make[3]: *** [_muldi3.o] Error 1 - make[3]: Leaving directory `blabla/buildroot/toolchain_build_m68hc12/gcc-4.3.3-build/m68hc12-elf/libgcc' + make[3]: Entering directory `blabla/buildroot/toolchain_build_m68hc12/gcc-4.3.3-build/m68hc12-elf/libgcc' + ... + blabla/buildroot/toolchain_build_m68hc12/gcc-4.3.3/libgcc/../gcc/libgcc2.c:566: internal compiler error: in init_move_cost, at regclass.c:323 + Please submit a full bug report, + with preprocessed source if appropriate. + See <http://gcc.gnu.org/bugs.html> for instructions. + make[3]: *** [_muldi3.o] Error 1 + make[3]: Leaving directory `blabla/buildroot/toolchain_build_m68hc12/gcc-4.3.3-build/m68hc12-elf/libgcc' - Use m68hc12-config-3.4.6 + Use m68hc12-config-3.4.6 m9s12x_config_3.3.6 - Builds a hcs12 toolchain using gcc 3.3.6 and extensive m9x12x-specific patches. + Builds a hcs12 toolchain using gcc 3.3.6 and extensive m9x12x-specific patches. m68k-config - Builds an M68K toolchain using gcc 3.4.6 + Builds an M68K toolchain using gcc 3.4.6 sh-defconfig - Builds an SH-1/2 toolchain using gcc 3.4.6 + Builds an SH-1/2 toolchain using gcc 3.4.6 GENERAL BUILD STEPS ^^^^^^^^^^^^^^^^^^^ @@ -282,14 +289,14 @@ Cygwin GCC BUILD NOTES and, apparently, the make variable "exeext" is set incorrectly. A work around after the above occurs is: - cd toolchain_build_<arch>/gcc-4.2.4-build/gcc # Go to the directory where error occurred - mv cc1-dummy.exe cc1-dummy # Rename the executable without .exe - rm cc1-checksum.c # Get rid of the bad generated file + cd toolchain_build_<arch>/gcc-4.2.4-build/gcc # Go to the directory where error occurred + mv cc1-dummy.exe cc1-dummy # Rename the executable without .exe + rm cc1-checksum.c # Get rid of the bad generated file Then resume the buildroot make: - cd - # Back to the buildroot make directory - make # Restart the build + cd - # Back to the buildroot make directory + make # Restart the build If you build g++, you will see another similar error: @@ -300,14 +307,14 @@ Cygwin GCC BUILD NOTES The fix is similar: - cd toolchain_build_<arch>/gcc-4.2.4-build/gcc # Go to the directory where error occurred - mv cc1plus-dummy.exe cc1plus-dummy # Rename the executable without .exe - rm cc1plus-checksum.c # Get rid of the bad generated file + cd toolchain_build_<arch>/gcc-4.2.4-build/gcc # Go to the directory where error occurred + mv cc1plus-dummy.exe cc1plus-dummy # Rename the executable without .exe + rm cc1plus-checksum.c # Get rid of the bad generated file Then resume the buildroot make: - cd - # Back to the buildroot make directory - make # Restart the build + cd - # Back to the buildroot make directory + make # Restart the build o Once I had problems building the toolchain on Cygwin. In this case, I would occasioinally get "Permission denied" errors will trying to configure @@ -341,4 +348,4 @@ Building GDB Under Cygwin directory if it is needed: cp configs/gdb-1_8-cygwin-1_7.patch toolchain/gdb/6.8/. - +
\ No newline at end of file diff --git a/misc/buildroot/configs/cortexm0-eabi-defconfig-4.6.3 b/misc/buildroot/configs/cortexm0-eabi-defconfig-4.6.3 new file mode 100644 index 000000000..663d548db --- /dev/null +++ b/misc/buildroot/configs/cortexm0-eabi-defconfig-4.6.3 @@ -0,0 +1,124 @@ +# +# Automatically generated make config: don't edit +# +BR2_HAVE_DOT_CONFIG=y +# BR2_alpha is not set +BR2_arm=y +# BR2_armeb is not set +# BR2_avr is not set +# BR2_avr32 is not set +# BR2_bfin is not set +# BR2_cris is not set +# BR2_i386 is not set +# BR2_m32c is not set +# BR2_m68k is not set +# BR2_m68hc11 is not set +# BR2_m68hc12 is not set +# BR2_m9s12x is not set +# BR2_mips is not set +# BR2_mipsel is not set +# BR2_nios2 is not set +# BR2_powerpc is not set +# BR2_sh is not set +# BR2_sh64 is not set +# BR2_h8300 is not set +# BR2_sparc is not set +# BR2_x86_64 is not set +# BR2_generic_arm is not set +# BR2_arm610 is not set +# BR2_arm7tdmi is not set +# BR2_arm710 is not set +# BR2_arm720t is not set +# BR2_arm740t is not set +# BR2_arm920t is not set +# BR2_arm922t is not set +# BR2_arm926t is not set +# BR2_arm1136jf_s is not set +# BR2_cortex_m3 is not set +BR2_cortex_m0=y +# BR2_sa110 is not set +# BR2_sa1100 is not set +# BR2_xscale is not set +# BR2_iwmmxt is not set +# BR2_ARM_OABI is not set +BR2_ARM_EABI=y +BR2_ARCH="arm" +BR2_GCC_TARGET_TUNE="cortex-m0" +BR2_GCC_TARGET_ARCH="armv6-m" +BR2_GCC_TARGET_ABI="aapcs-linux" +BR2_ENDIAN="LITTLE" + +# +# Build options +# +BR2_WGET="wget --passive-ftp" +BR2_SVN="svn co" +BR2_ZCAT="zcat" +BR2_BZCAT="bzcat" +BR2_TAR_OPTIONS="" +BR2_DL_DIR="$(BASE_DIR)/../archives" +BR2_STAGING_DIR="$(BUILD_DIR)/staging_dir" +BR2_NUTTX_DIR="$(TOPDIR)/../../nuttx" +BR2_TOPDIR_PREFIX="" +BR2_TOPDIR_SUFFIX="" +BR2_GNU_BUILD_SUFFIX="pc-elf" +BR2_GNU_TARGET_SUFFIX="nuttx-eabi" +# BR2_PREFER_IMA is not set + +# +# Toolchain Options +# + +# +# Binutils Options +# +# BR2_BINUTILS_VERSION_2_17 is not set +# BR2_BINUTILS_VERSION_2_18 is not set +# BR2_BINUTILS_VERSION_2_19 is not set +# BR2_BINUTILS_VERSION_2_19_1 is not set +# BR2_BINUTILS_VERSION_2_21_1 is not set +BR2_BINUTILS_VERSION_2_22=y +BR2_BINUTILS_VERSION="2.22" +BR2_EXTRA_BINUTILS_CONFIG_OPTIONS="" + +# +# GCC Options +# +BR2_PACKAGE_GCC=y +# BR2_GCC_VERSION_3_3_6 is not set +# BR2_GCC_VERSION_3_4_6 is not set +# BR2_GCC_VERSION_4_2_4 is not set +# BR2_GCC_VERSION_4_3_3 is not set +# BR2_GCC_VERSION_4_5_2 is not set +BR2_GCC_VERSION_4_6_3=y +BR2_GCC_SUPPORTS_SYSROOT=y +BR2_GCC_VERSION="4.6.3" +# BR2_GCC_USE_SJLJ_EXCEPTIONS is not set +BR2_EXTRA_GCC_CONFIG_OPTIONS="" +BR2_INSTALL_LIBSTDCPP=y +# BR2_INSTALL_LIBGCJ is not set +# BR2_INSTALL_OBJC is not set +# BR2_INSTALL_FORTRAN is not set + +# +# Gdb Options +# +# BR2_PACKAGE_GDB is not set +# BR2_PACKAGE_GDB_SERVER is not set +# BR2_PACKAGE_GDB_HOST is not set + +# +# NuttX Binary Support +# +# BR2_PACKAGE_NXFLAT is not set +BR2_PACKAGE_GENROMFS=y + +# +# Common Toolchain Options +# +# BR2_PACKAGE_SSTRIP_TARGET is not set +# BR2_PACKAGE_SSTRIP_HOST is not set +# BR2_ENABLE_MULTILIB is not set +BR2_LARGEFILE=y +BR2_SOFT_FLOAT=y +BR2_TARGET_OPTIMIZATION="-Os -pipe" diff --git a/misc/buildroot/toolchain/binutils/Config.in b/misc/buildroot/toolchain/binutils/Config.in index 028ac0412..96cff013f 100644 --- a/misc/buildroot/toolchain/binutils/Config.in +++ b/misc/buildroot/toolchain/binutils/Config.in @@ -4,23 +4,23 @@ comment "Binutils Options" choice prompt "Binutils Version" - default BR2_BINUTILS_VERSION_2_19_1 if BR2_cortex_m3 - default BR2_BINUTILS_VERSION_2_19 if !BR2_avr32 && !BR2_cortex_m3 && !BR2_m9s12x + default BR2_BINUTILS_VERSION_2_19_1 if BR2_cortex_m3 || BR2_cortex_m0 + default BR2_BINUTILS_VERSION_2_19 if !BR2_avr32 && !BR2_cortex_m3 && !BR2_cortex_m0 && !BR2_m9s12x default BR2_BINUTILS_VERSION_2_18 if BR2_m9s12x - default BR2_BINUTILS_VERSION_2_17 if !BR2_cortex_m3 && !BR2_m9s12x + default BR2_BINUTILS_VERSION_2_17 if !BR2_cortex_m3 && !BR2_cortex_m0 && !BR2_m9s12x help Select the version of binutils you wish to use. config BR2_BINUTILS_VERSION_2_17 - depends !BR2_nios2 && !BR2_cortex_m3 && !BR2_m9s12x + depends !BR2_nios2 && !BR2_cortex_m3 && !BR2_cortex_m0 && !BR2_m9s12x bool "binutils 2.17" config BR2_BINUTILS_VERSION_2_18 - depends !BR2_avr32 && !BR2_nios2 && !BR2_cortex_m3 + depends !BR2_avr32 && !BR2_nios2 && !BR2_cortex_m3 && !BR2_cortex_m0 bool "binutils 2.18" config BR2_BINUTILS_VERSION_2_19 - depends !BR2_avr32 && !BR2_nios2 && !BR2_cortex_m3 && !BR2_m9s12x + depends !BR2_avr32 && !BR2_nios2 && !BR2_cortex_m3 && !BR2_cortex_m0 &&!BR2_m9s12x bool "binutils 2.19" config BR2_BINUTILS_VERSION_2_19_1 diff --git a/misc/buildroot/toolchain/gcc/Config.in b/misc/buildroot/toolchain/gcc/Config.in index 822cfd4b9..edef88a3e 100644 --- a/misc/buildroot/toolchain/gcc/Config.in +++ b/misc/buildroot/toolchain/gcc/Config.in @@ -10,8 +10,8 @@ config BR2_PACKAGE_GCC choice prompt "GCC compiler Version" - default BR2_GCC_VERSION_4_3_3 if BR2_cortex_m3 - default BR2_GCC_VERSION_4_2_4 if !BR2_avr32 && !BR2_cortex_m3 && !BR2_m9s12x + default BR2_GCC_VERSION_4_3_3 if BR2_cortex_m3 || BR2_cortex_m0 + default BR2_GCC_VERSION_4_2_4 if !BR2_avr32 && !BR2_cortex_m3 && !BR2_cortex_m0 && !BR2_m9s12x default BR2_GCC_VERSION_3_4_6 if BR2_avr32 default BR2_GCC_VERSION_3_3_6 if BR2_m9s12x depends on BR2_PACKAGE_GCC @@ -23,11 +23,11 @@ choice bool "gcc 3.3.6" config BR2_GCC_VERSION_3_4_6 - depends on !BR2_m32c && !BR2_cortex_m3 && !BR2_m9s12x + depends on !BR2_m32c && !BR2_cortex_m3 && !BR2_cortex_m0 && !BR2_m9s12x bool "gcc 3.4.6" config BR2_GCC_VERSION_4_2_4 - depends on !BR2_avr32 && !BR2_nios2 && !BR2_cortex_m3 && !BR2_m9s12x + depends on !BR2_avr32 && !BR2_nios2 && !BR2_cortex_m3 && !BR2_cortex_m0 && !BR2_m9s12x select BR2_GCC_SUPPORTS_SYSROOT bool "gcc 4.2.4" diff --git a/misc/buildroot/toolchain/gcc/Makefile.in b/misc/buildroot/toolchain/gcc/Makefile.in index aaec774dc..7ae07cfe8 100644 --- a/misc/buildroot/toolchain/gcc/Makefile.in +++ b/misc/buildroot/toolchain/gcc/Makefile.in @@ -57,6 +57,9 @@ ifneq ($(strip $(subst ",,$(BR2_GCC_TARGET_ABI))),) # "))) GCC_WITH_ABI:=--with-abi=$(BR2_GCC_TARGET_ABI) endif +ifdef BR2_cortex_m0 +GCC_WITH_MODE:=--with-mode=thumb +endif ifdef BR2_cortex_m3 GCC_WITH_MODE:=--with-mode=thumb endif diff --git a/nuttx/arch/arm/include/nuc1xx/chip.h b/nuttx/arch/arm/include/nuc1xx/chip.h index 0cf2c89b8..bfc018947 100644 --- a/nuttx/arch/arm/include/nuc1xx/chip.h +++ b/nuttx/arch/arm/include/nuc1xx/chip.h @@ -50,6 +50,10 @@ /* NUC100 Advanced Line (Low Density) */ #if defined(CONFIG_ARCH_CHIP_NUC100LC1BN) /* Flash 32K SRAM 4K, LQFP48 package */ +# define NUC100 1 /* NUC100 family */ +# undef NUC120 /* NUC120 family */ +# define NUC_LOW 1 /* Low density part */ +# undef NUC_MEDIUM /* Medium density part */ # define NUC_FLASH (32*1024) /* 32K FLASH */ # define NUC_SRAM (4*1024) /* 4K SRAM */ # define NUC_NIO 35 /* (35) GPIO */ @@ -68,6 +72,10 @@ # define NUC_RTC 1 /* RTC */ # undef NUC_EBI /* No EBI */ #elif defined(CONFIG_ARCH_CHIP_NUC100LD1BN) /* Flash 64K SRAM 4K, LQFP48 package */ +# define NUC100 1 /* NUC100 family */ +# undef NUC120 /* NUC120 family */ +# define NUC_LOW 1 /* Low density part */ +# undef NUC_MEDIUM /* Medium density part */ # define NUC_FLASH (64*1024) /* 64K FLASH */ # define NUC_SRAM (4*1024) /* 4K SRAM */ # define NUC_NIO 31 /* (35) GPIO */ @@ -86,6 +94,10 @@ # define NUC_RTC 1 /* RTC */ # undef NUC_EBI /* No EBI */ #elif defined(CONFIG_ARCH_CHIP_NUC100LD2BN) /* Flash 64K SRAM 8K, LQFP48 package */ +# define NUC100 1 /* NUC100 family */ +# undef NUC120 /* NUC120 family */ +# define NUC_LOW 1 /* Low density part */ +# undef NUC_MEDIUM /* Medium density part */ # define NUC_FLASH (64*1024) /* 64K FLASH */ # define NUC_SRAM (8*1024) /* 8K SRAM */ # define NUC_NIO 31 /* (35) GPIO */ @@ -104,6 +116,10 @@ # define NUC_RTC 1 /* RTC */ # undef NUC_EBI /* No EBI */ #elif defined(CONFIG_ARCH_CHIP_NUC100RC1BN) /* Flash 32K SRAM 4K, LQFP64 package */ +# define NUC100 1 /* NUC100 family */ +# undef NUC120 /* NUC120 family */ +# define NUC_LOW 1 /* Low density part */ +# undef NUC_MEDIUM /* Medium density part */ # define NUC_FLASH (32*1024) /* 32K FLASH */ # define NUC_SRAM (4*1024) /* 4K SRAM */ # define NUC_NIO 49 /* (49) GPIO */ @@ -122,6 +138,10 @@ # define NUC_RTC 1 /* RTC */ # define NUC_EBI 1 /* Supports EBI */ #elif defined(CONFIG_ARCH_CHIP_NUC100RD1BN) /* Flash 64K SRAM 4K, LQFP64 package */ +# define NUC100 1 /* NUC100 family */ +# undef NUC120 /* NUC120 family */ +# define NUC_LOW 1 /* Low density part */ +# undef NUC_MEDIUM /* Medium density part */ # define NUC_FLASH (64*1024) /* 64K FLASH */ # define NUC_SRAM (4*1024) /* 4K SRAM */ # define NUC_NIO 49 /* (49) GPIO */ @@ -140,6 +160,10 @@ # define NUC_RTC 1 /* RTC */ # define NUC_EBI 1 /* Supports EBI */ #elif defined(CONFIG_ARCH_CHIP_NUC100RD2BN) /* Flash 64K SRAM 8K, LQFP64 package */ +# define NUC100 1 /* NUC100 family */ +# undef NUC120 /* NUC120 family */ +# define NUC_LOW 1 /* Low density part */ +# undef NUC_MEDIUM /* Medium density part */ # define NUC_FLASH (64*1024) /* 64K FLASH */ # define NUC_SRAM (8*1024) /* 4K SRAM */ # define NUC_NIO 49 /* (49) GPIO */ @@ -161,6 +185,10 @@ /* NUC100 Advanced Line (Medium Density) */ #elif defined(CONFIG_ARCH_CHIP_NUC100LD3AN) /* Flash 64K SRAM 16K, LQFP48 package */ +# define NUC100 1 /* NUC100 family */ +# undef NUC120 /* NUC120 family */ +# undef NUC_LOW /* Low density part */ +# define NUC_MEDIUM 1 /* Medium density part */ # define NUC_FLASH (64*1024) /* 64K FLASH */ # define NUC_SRAM (16*1024) /* 16K SRAM */ # define NUC_NIO 35 /* (35) GPIO */ @@ -179,6 +207,10 @@ # define NUC_RTC 1 /* RTC */ # undef NUC_EBI /* No EBI */ #elif defined(CONFIG_ARCH_CHIP_NUC100LE3AN) /* Flash 128K SRAM 16K, LQFP48 package */ +# define NUC100 1 /* NUC100 family */ +# undef NUC120 /* NUC120 family */ +# undef NUC_LOW /* Low density part */ +# define NUC_MEDIUM 1 /* Medium density part */ # define NUC_FLASH (128*1024) /* 64K FLASH */ # define NUC_SRAM (16*1024) /* 16K SRAM */ # define NUC_NIO 35 /* (35) GPIO */ @@ -197,6 +229,10 @@ # define NUC_RTC 1 /* RTC */ # undef NUC_EBI /* No EBI */ #elif defined(CONFIG_ARCH_CHIP_NUC100RD3AN) /* Flash 64K SRAM 16K, LQFP64 package */ +# define NUC100 1 /* NUC100 family */ +# undef NUC120 /* NUC120 family */ +# undef NUC_LOW /* Low density part */ +# define NUC_MEDIUM 1 /* Medium density part */ # define NUC_FLASH (64*1024) /* 64K FLASH */ # define NUC_SRAM (16*1024) /* 16K SRAM */ # define NUC_NIO 49 /* (49) GPIO */ @@ -215,6 +251,10 @@ # define NUC_RTC 1 /* RTC */ # undef NUC_EBI /* No EBI */ #elif defined(CONFIG_ARCH_CHIP_NUC100RE3AN) /* Flash 128K SRAM 16K, LQFP64 package */ +# define NUC100 1 /* NUC100 family */ +# undef NUC120 /* NUC120 family */ +# undef NUC_LOW /* Low density part */ +# define NUC_MEDIUM 1 /* Medium density part */ # define NUC_FLASH (128*1024) /* 128K FLASH */ # define NUC_SRAM (16*1024) /* 16K SRAM */ # define NUC_NIO 49 /* (49) GPIO */ @@ -233,6 +273,10 @@ # define NUC_RTC 1 /* RTC */ # undef NUC_EBI /* No EBI */ #elif defined(CONFIG_ARCH_CHIP_NUC100VD2AN) /* Flash 64K SRAM 8K, LQFP100 package */ +# define NUC100 1 /* NUC100 family */ +# undef NUC120 /* NUC120 family */ +# undef NUC_LOW /* Low density part */ +# define NUC_MEDIUM 1 /* Medium density part */ # define NUC_FLASH (64*1024) /* 64K FLASH */ # define NUC_SRAM (8*1024) /* 8K SRAM */ # define NUC_NIO 80 /* (80) GPIO */ @@ -251,6 +295,10 @@ # define NUC_RTC 1 /* RTC */ # undef NUC_EBI /* No EBI */ #elif defined(CONFIG_ARCH_CHIP_NUC100VD3AN) /* Flash 64K SRAM 16K, LQFP100 package */ +# define NUC100 1 /* NUC100 family */ +# undef NUC120 /* NUC120 family */ +# undef NUC_LOW /* Low density part */ +# define NUC_MEDIUM 1 /* Medium density part */ # define NUC_FLASH (64*1024) /* 64K FLASH */ # define NUC_SRAM (16*1024) /* 16K SRAM */ # define NUC_NIO 80 /* (80) GPIO */ @@ -269,6 +317,10 @@ # define NUC_RTC 1 /* RTC */ # undef NUC_EBI /* No EBI */ #elif defined(CONFIG_ARCH_CHIP_NUC100VE3AN) /* Flash 128K SRAM 8K, LQFP100 package */ +# define NUC100 1 /* NUC100 family */ +# undef NUC120 /* NUC120 family */ +# undef NUC_LOW /* Low density part */ +# define NUC_MEDIUM 1 /* Medium density part */ # define NUC_FLASH (128*1024) /* 128K FLASH */ # define NUC_SRAM (16*1024) /* 16K SRAM */ # define NUC_NIO 80 /* (80) GPIO */ @@ -290,6 +342,10 @@ /* NUC120 USB Line (Low Density) */ #elif defined(CONFIG_ARCH_CHIP_NUC120LC1BN) /* Flash 32K SRAM 4K, LQFP48 package */ +# undef NUC100 /* NUC100 family */ +# define NUC120 1 /* NUC120 family */ +# define NUC_LOW 1 /* Low density part */ +# undef NUC_MEDIUM /* Medium density part */ # define NUC_FLASH (32*1024) /* 32K FLASH */ # define NUC_SRAM (4*1024) /* 4K SRAM */ # define NUC_NIO 31 /* (31) GPIO */ @@ -308,6 +364,10 @@ # define NUC_RTC 1 /* RTC */ # undef NUC_EBI /* No EBI */ #elif defined(CONFIG_ARCH_CHIP_NUC120LD1BN) /* Flash 64K SRAM 4K, LQFP48 package */ +# undef NUC100 /* NUC100 family */ +# define NUC120 1 /* NUC120 family */ +# define NUC_LOW 1 /* Low density part */ +# undef NUC_MEDIUM /* Medium density part */ # define NUC_FLASH (64*1024) /* 64K FLASH */ # define NUC_SRAM (4*1024) /* 4K SRAM */ # define NUC_NIO 31 /* (31) GPIO */ @@ -326,6 +386,10 @@ # define NUC_RTC 1 /* RTC */ # undef NUC_EBI /* No EBI */ #elif defined(CONFIG_ARCH_CHIP_NUC120LD2BN) /* Flash 64K SRAM 8K, LQFP48 package */ +# undef NUC100 /* NUC100 family */ +# define NUC120 1 /* NUC120 family */ +# define NUC_LOW 1 /* Low density part */ +# undef NUC_MEDIUM /* Medium density part */ # define NUC_FLASH (64*1024) /* 64K FLASH */ # define NUC_SRAM (8*1024) /* 8K SRAM */ # define NUC_NIO 31 /* (31) GPIO */ @@ -344,6 +408,10 @@ # define NUC_RTC 1 /* RTC */ # undef NUC_EBI /* No EBI */ #elif defined(CONFIG_ARCH_CHIP_NUC120RC1BN) /* Flash 32K SRAM 4K, LQFP64 package */ +# undef NUC100 /* NUC100 family */ +# define NUC120 1 /* NUC120 family */ +# define NUC_LOW 1 /* Low density part */ +# undef NUC_MEDIUM /* Medium density part */ # define NUC_FLASH (32*1024) /* 32K FLASH */ # define NUC_SRAM (4*1024) /* 4K SRAM */ # define NUC_NIO 45 /* (45) GPIO */ @@ -362,6 +430,10 @@ # define NUC_RTC 1 /* RTC */ # define NUC_EBI 1 /* Have EBI */ #elif defined(CONFIG_ARCH_CHIP_NUC120RD1BN) /* Flash 64K SRAM 4K, LQFP64 package */ +# undef NUC100 /* NUC100 family */ +# define NUC120 1 /* NUC120 family */ +# define NUC_LOW 1 /* Low density part */ +# undef NUC_MEDIUM /* Medium density part */ # define NUC_FLASH (64*1024) /* 64K FLASH */ # define NUC_SRAM (4*1024) /* 4K SRAM */ # define NUC_NIO 45 /* (45) GPIO */ @@ -380,6 +452,10 @@ # define NUC_RTC 1 /* RTC */ # define NUC_EBI 1 /* Have EBI */ #elif defined(CONFIG_ARCH_CHIP_NUC120RD2BN) /* Flash 64K SRAM 8K, LQFP64 package */ +# undef NUC100 /* NUC100 family */ +# define NUC120 1 /* NUC120 family */ +# define NUC_LOW 1 /* Low density part */ +# undef NUC_MEDIUM /* Medium density part */ # define NUC_FLASH (64*1024) /* 64K FLASH */ # define NUC_SRAM (8*1024) /* 8K SRAM */ # define NUC_NIO 45 /* (45) GPIO */ @@ -401,6 +477,10 @@ /* NUC120 USB Line (Medium Density) */ #elif defined(CONFIG_ARCH_CHIP_NUC120LD3AN) /* Flash 64K SRAM 16K, LQFP48 package */ +# undef NUC100 /* NUC100 family */ +# define NUC120 1 /* NUC120 family */ +# undef NUC_LOW /* Low density part */ +# define NUC_MEDIUM 1 /* Medium density part */ # define NUC_FLASH (64*1024) /* 64K FLASH */ # define NUC_SRAM (16*1024) /* 16K SRAM */ # define NUC_NIO 31 /* (31) GPIO */ @@ -419,6 +499,10 @@ # define NUC_RTC 1 /* RTC */ # undef NUC_EBI /* No EBI */ #elif defined(CONFIG_ARCH_CHIP_NUC120LE3AN) /* Flash 128K SRAM 16K, LQFP48 package */ +# undef NUC100 /* NUC100 family */ +# define NUC120 1 /* NUC120 family */ +# undef NUC_LOW /* Low density part */ +# define NUC_MEDIUM 1 /* Medium density part */ # define NUC_FLASH (128*1024) /* 128K FLASH */ # define NUC_SRAM (16*1024) /* 16K SRAM */ # define NUC_NIO 31 /* (31) GPIO */ @@ -437,6 +521,10 @@ # define NUC_RTC 1 /* RTC */ # undef NUC_EBI /* No EBI */ #elif defined(CONFIG_ARCH_CHIP_NUC120RD3AN) /* Flash 64K SRAM 16K, LQFP64 package */ +# undef NUC100 /* NUC100 family */ +# define NUC120 1 /* NUC120 family */ +# undef NUC_LOW /* Low density part */ +# define NUC_MEDIUM 1 /* Medium density part */ # define NUC_FLASH (64*1024) /* 64K FLASH */ # define NUC_SRAM (16*1024) /* 16K SRAM */ # define NUC_NIO 45 /* (45) GPIO */ @@ -455,6 +543,10 @@ # define NUC_RTC 1 /* RTC */ # undef NUC_EBI /* No EBI */ #elif defined(CONFIG_ARCH_CHIP_NUC120RE3AN) /* Flash 128K SRAM 16K, LQFP64 package */ +# undef NUC100 /* NUC100 family */ +# define NUC120 1 /* NUC120 family */ +# undef NUC_LOW /* Low density part */ +# define NUC_MEDIUM 1 /* Medium density part */ # define NUC_FLASH (128*1024) /* 128K FLASH */ # define NUC_SRAM (16*1024) /* 16K SRAM */ # define NUC_NIO 45 /* (45) GPIO */ @@ -473,6 +565,10 @@ # define NUC_RTC 1 /* RTC */ # undef NUC_EBI /* No EBI */ #elif defined(CONFIG_ARCH_CHIP_NUC120VD2AN) /* Flash 64K SRAM 8K, LQFP100 package */ +# undef NUC100 /* NUC100 family */ +# define NUC120 1 /* NUC120 family */ +# undef NUC_LOW /* Low density part */ +# define NUC_MEDIUM 1 /* Medium density part */ # define NUC_FLASH (64*1024) /* 64K FLASH */ # define NUC_SRAM (8*1024) /* 8K SRAM */ # define NUC_NIO 76 /* (76) GPIO */ @@ -491,6 +587,10 @@ # define NUC_RTC 1 /* RTC */ # undef NUC_EBI /* No EBI */ #elif defined(CONFIG_ARCH_CHIP_NUC120VD3AN) /* Flash 64K SRAM 16K, LQFP100 package */ +# undef NUC100 /* NUC100 family */ +# define NUC120 1 /* NUC120 family */ +# undef NUC_LOW /* Low density part */ +# define NUC_MEDIUM 1 /* Medium density part */ # define NUC_FLASH (64*1024) /* 64K FLASH */ # define NUC_SRAM (16*1024) /* 16K SRAM */ # define NUC_NIO 76 /* (76) GPIO */ @@ -509,6 +609,10 @@ # define NUC_RTC 1 /* RTC */ # undef NUC_EBI /* No EBI */ #elif defined(CONFIG_ARCH_CHIP_NUC120VE3AN) /* Flash 128K SRAM 16K, LQFP100 package */ +# undef NUC100 /* NUC100 family */ +# define NUC120 1 /* NUC120 family */ +# undef NUC_LOW /* Low density part */ +# define NUC_MEDIUM 1 /* Medium density part */ # define NUC_FLASH (128*1024) /* 128K FLASH */ # define NUC_SRAM (16*1024) /* 16K SRAM */ # define NUC_NIO 76 /* (76) GPIO */ diff --git a/nuttx/arch/arm/include/nuc1xx/irq.h b/nuttx/arch/arm/include/nuc1xx/irq.h index fcea3e165..4c2eea267 100644 --- a/nuttx/arch/arm/include/nuc1xx/irq.h +++ b/nuttx/arch/arm/include/nuc1xx/irq.h @@ -45,6 +45,7 @@ ************************************************************************************/ #include <nuttx/config.h> +#include <arch/nuc1xx/chip.h> /************************************************************************************ * Pre-processor Definitions @@ -72,10 +73,10 @@ #define NUC_IRQ_INTERRUPT (16) -#if defined(CONFIG_ARCH_CHIP_NUC120) +#if defined(NUC120) # include <arch/nuc1xx/nuc120_irq.h> #else -# error "Unrecognized NUC chip" +# error "Unrecognized/unsupported NUC chip" #endif /************************************************************************************ diff --git a/nuttx/arch/arm/src/armv6-m/Kconfig b/nuttx/arch/arm/src/armv6-m/Kconfig index 3dea706d4..e22ef5a8f 100644 --- a/nuttx/arch/arm/src/armv6-m/Kconfig +++ b/nuttx/arch/arm/src/armv6-m/Kconfig @@ -44,16 +44,4 @@ config ARMV6M_TOOLCHAIN_GNU_EABI This option should work for any modern GNU toolchain (GCC 4.5 or newer) configured for arm-none-eabi. -config ARMV6M_TOOLCHAIN_RAISONANCE - bool "STMicro Raisonance for Windows" - depends on HOST_WINDOWS - endchoice - -config ARMV6M_OABI_TOOLCHAIN - bool "OABI (vs EABI)" - default y - depends on ARMV6M_TOOLCHAIN_BUILDROOT - ---help--- - Most of the older buildroot toolchains are OABI and are named arm-nuttx-elf- vs. arm-nuttx-eabi- - diff --git a/nuttx/arch/arm/src/armv6-m/Toolchain.defs b/nuttx/arch/arm/src/armv6-m/Toolchain.defs index 064517014..a85a97a3b 100644 --- a/nuttx/arch/arm/src/armv6-m/Toolchain.defs +++ b/nuttx/arch/arm/src/armv6-m/Toolchain.defs @@ -66,9 +66,6 @@ endif ifeq ($(filter y, $(CONFIG_ARMV6M_TOOLCHAIN_GNU_EABI)),y) CONFIG_ARMV6M_TOOLCHAIN ?= GNU_EABI endif -ifeq ($(filter y, $(CONFIG_ARMV6M_TOOLCHAIN_RAISONANCE)),y) - CONFIG_ARMV6M_TOOLCHAIN ?= RAISONANCE -endif # # Supported toolchains @@ -102,16 +99,10 @@ endif # NuttX buildroot under Linux or Cygwin ifeq ($(CONFIG_ARMV6M_TOOLCHAIN),BUILDROOT) -ifeq ($(CONFIG_ARMV6M_OABI_TOOLCHAIN),y) - CROSSDEV ?= arm-nuttx-elf- - ARCROSSDEV ?= arm-nuttx-elf- - ARCHCPUFLAGS = -mtune=cortex-m0 -march=armv6-m -mfloat-abi=soft -else CROSSDEV ?= arm-nuttx-eabi- ARCROSSDEV ?= arm-nuttx-eabi- ARCHCPUFLAGS = -mcpu=cortex-m0 -mthumb -mfloat-abi=soft -endif -MAXOPTIMIZATION = -Os + MAXOPTIMIZATION = -Os endif # Code Red RedSuite under Linux @@ -172,14 +163,3 @@ ifeq ($(CONFIG_ARMV6M_TOOLCHAIN),GNU_EABI) MAXOPTIMIZATION = -O3 ARCHCPUFLAGS = -mcpu=cortex_m0 -mthumb -march=armv6e-m -mfloat-abi=soft endif - -# Raisonance RIDE7 under Windows - -ifeq ($(CONFIG_ARMV6M_TOOLCHAIN),RAISONANCE) - CROSSDEV ?= arm-none-eabi- - ARCROSSDEV ?= arm-none-eabi- - ifneq ($(CONFIG_WINDOWS_NATIVE),y) - WINTOOL = y - endif - ARCHCPUFLAGS = -mcpu=cortex-m0 -mthumb -mfloat-abi=soft -endif diff --git a/nuttx/arch/arm/src/nuc1xx/chip/nuc_config.h b/nuttx/arch/arm/src/nuc1xx/chip/nuc_config.h index 24f394bd2..cfc15bae9 100644 --- a/nuttx/arch/arm/src/nuc1xx/chip/nuc_config.h +++ b/nuttx/arch/arm/src/nuc1xx/chip/nuc_config.h @@ -1,5 +1,5 @@ /******************************************************************************************** - * arch/arm/src/nuc1xx/chip/nuc_adc.h + * arch/arm/src/nuc1xx/chip/nuc_config.h * * Copyright (C) 2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> @@ -33,8 +33,8 @@ * ********************************************************************************************/ -#ifndef __ARCH_ARM_SRC_NUC1XX_CHIP_NUC_ADC_H -#define __ARCH_ARM_SRC_NUC1XX_CHIP_NUC_ADC_H +#ifndef __ARCH_ARM_SRC_NUC1XX_CHIP_NUC_CONFIG_H +#define __ARCH_ARM_SRC_NUC1XX_CHIP_NUC_CONFIG_H /******************************************************************************************** * Included Files @@ -114,4 +114,4 @@ * Public Functions ********************************************************************************************/ -#endif /* __ARCH_ARM_SRC_NUC1XX_CHIP_NUC_ADC_H */ +#endif /* __ARCH_ARM_SRC_NUC1XX_CHIP_NUC_CONFIG_H */ diff --git a/nuttx/configs/nutiny-nuc120/README.txt b/nuttx/configs/nutiny-nuc120/README.txt index 5e486e480..3f1e84df9 100644 --- a/nuttx/configs/nutiny-nuc120/README.txt +++ b/nuttx/configs/nutiny-nuc120/README.txt @@ -10,6 +10,7 @@ Contents - Development Environment - GNU Toolchain Options + - NuttX Buildroot Toolchain - LEDs - Serial Console - Debugging @@ -26,7 +27,47 @@ Development Environment GNU Toolchain Options ===================== - As of this writing I have used only the CodeSourcery GCC toolchain for windows. + As of this writing, all testing has been performed using the NuttX buildroot + toolchain described below. I have also verified the build using the + CodeSourcery GCC toolchain for windows. Most any contemporary EABI GCC + toolchain should work will a little tinkering. + +NuttX Buildroot Toolchain +========================= + + A GNU GCC-based toolchain is assumed. The files */setenv.sh should + be modified to point to the correct path to the Cortex-M3 GCC toolchain (if + different from the default in your PATH variable). + + If you have no Cortex-M0 toolchain, one can be downloaded from the NuttX + SourceForge download site (https://sourceforge.net/projects/nuttx/files/buildroot/). + This GNU toolchain builds and executes in the Linux or Cygwin environment. + + 1. You must have already configured Nuttx in <some-dir>/nuttx. + + cd tools + ./configure.sh nutiny-nuc120/<sub-dir> + + 2. Download the latest buildroot package into <some-dir> + + 3. unpack the buildroot tarball. The resulting directory may + have versioning information on it like buildroot-x.y.z. If so, + rename <some-dir>/buildroot-x.y.z to <some-dir>/buildroot. + + 4. cd <some-dir>/buildroot + + 5. cp configs/cortexm0-eabi-defconfig-4.6.3 .config + + 6. make oldconfig + + 7. make + + 8. Edit setenv.h, if necessary, so that the PATH variable includes + the path to the newly built binaries. + + See the file configs/README.txt in the buildroot source tree. That has more + details PLUS some special instructions that you will need to follow if you are + building a Cortex-M3 toolchain for Cygwin under Windows. LEDs ==== diff --git a/nuttx/configs/nutiny-nuc120/ostest/defconfig b/nuttx/configs/nutiny-nuc120/ostest/defconfig index 964155240..9141ea1f2 100644 --- a/nuttx/configs/nutiny-nuc120/ostest/defconfig +++ b/nuttx/configs/nutiny-nuc120/ostest/defconfig @@ -75,19 +75,16 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_LPC2378 is not set # CONFIG_ARCH_CHIP_LPC31XX is not set # CONFIG_ARCH_CHIP_LPC43XX is not set -# CONFIG_ARCH_CHIP_SAM3U is not set CONFIG_ARCH_CHIP_NUC1XX=y -CONFIG_ARCH_CHIP_NUC120LE3AN=y +# CONFIG_ARCH_CHIP_SAM3U is not set +# CONFIG_ARCH_CHIP_STM32 is not set # CONFIG_ARCH_CHIP_STR71X is not set CONFIG_ARCH_CORTEXM0=y CONFIG_ARCH_FAMILY="armv6-m" CONFIG_ARCH_CHIP="nuc1xx" -# CONFIG_ARMV6M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y -# CONFIG_ARMV6M_CMNVECTOR is not set -# CONFIG_ARCH_FPU is not set -CONFIG_ARCH_HAVE_MPU=y -# CONFIG_ARMV6M_MPU is not set +# CONFIG_ARMV7M_CMNVECTOR is not set +# CONFIG_ARCH_HAVE_MPU is not set CONFIG_BOARD_LOOPSPERMSEC=6522 # CONFIG_ARCH_CALIBRATION is not set @@ -95,117 +92,41 @@ CONFIG_BOARD_LOOPSPERMSEC=6522 # ARMV6M Configuration Options # # CONFIG_ARMV6M_TOOLCHAIN_ATOLLIC is not set -# CONFIG_ARMV6M_TOOLCHAIN_BUILDROOT is not set +CONFIG_ARMV6M_TOOLCHAIN_BUILDROOT=y # CONFIG_ARMV6M_TOOLCHAIN_CODEREDW is not set -CONFIG_ARMV6M_TOOLCHAIN_CODESOURCERYW=y +# CONFIG_ARMV6M_TOOLCHAIN_CODESOURCERYW is not set # CONFIG_ARMV6M_TOOLCHAIN_DEVKITARM is not set # CONFIG_ARMV6M_TOOLCHAIN_GNU_EABI is not set -# CONFIG_ARMV6M_TOOLCHAIN_RAISONANCE is not set -# CONFIG_SERIAL_TERMIOS is not set - -# -# STM32 Configuration Options -# -# CONFIG_ARCH_CHIP_STM32F100C8 is not set -# CONFIG_ARCH_CHIP_STM32F100CB is not set -# CONFIG_ARCH_CHIP_STM32F100R8 is not set -# CONFIG_ARCH_CHIP_STM32F100RB is not set -# CONFIG_ARCH_CHIP_STM32F100RC is not set -# CONFIG_ARCH_CHIP_STM32F100RD is not set -# CONFIG_ARCH_CHIP_STM32F100RE is not set -# CONFIG_ARCH_CHIP_STM32F100V8 is not set -# CONFIG_ARCH_CHIP_STM32F100VB is not set -# CONFIG_ARCH_CHIP_STM32F100VC is not set -# CONFIG_ARCH_CHIP_STM32F100VD is not set -# CONFIG_ARCH_CHIP_STM32F100VE is not set -# CONFIG_ARCH_CHIP_STM32F103RET6 is not set -# CONFIG_ARCH_CHIP_STM32F103VCT6 is not set -# CONFIG_ARCH_CHIP_STM32F103VET6 is not set -# CONFIG_ARCH_CHIP_STM32F103ZET6 is not set -# CONFIG_ARCH_CHIP_STM32F105VBT7 is not set -# CONFIG_ARCH_CHIP_STM32F107VC is not set -# CONFIG_ARCH_CHIP_STM32F207IG is not set -# CONFIG_ARCH_CHIP_STM32F302CB is not set -# CONFIG_ARCH_CHIP_STM32F302CC is not set -# CONFIG_ARCH_CHIP_STM32F302RB is not set -# CONFIG_ARCH_CHIP_STM32F302RC is not set -# CONFIG_ARCH_CHIP_STM32F302VB is not set -# CONFIG_ARCH_CHIP_STM32F302VC is not set -# CONFIG_ARCH_CHIP_STM32F303CB is not set -# CONFIG_ARCH_CHIP_STM32F303CC is not set -# CONFIG_ARCH_CHIP_STM32F303RB is not set -# CONFIG_ARCH_CHIP_STM32F303RC is not set -# CONFIG_ARCH_CHIP_STM32F303VB is not set -CONFIG_ARCH_CHIP_NUC120=y -# CONFIG_ARCH_CHIP_STM32F405RG is not set -# CONFIG_ARCH_CHIP_STM32F405VG is not set -# CONFIG_ARCH_CHIP_STM32F405ZG is not set -# CONFIG_ARCH_CHIP_STM32F407VE is not set -# CONFIG_ARCH_CHIP_STM32F407VG is not set -# CONFIG_ARCH_CHIP_STM32F407ZE is not set -# CONFIG_ARCH_CHIP_STM32F407ZG is not set -# CONFIG_ARCH_CHIP_STM32F407IE is not set -# CONFIG_ARCH_CHIP_STM32F407IG is not set -CONFIG_STM32_NUC1XX=y -# CONFIG_STM32_DFU is not set - -# -# STM32 Peripheral Support -# -# CONFIG_STM32_ADC1 is not set -# CONFIG_STM32_ADC2 is not set -# CONFIG_STM32_ADC3 is not set -# CONFIG_STM32_ADC4 is not set -# CONFIG_STM32_CAN1 is not set -# CONFIG_STM32_CRC is not set -# CONFIG_STM32_DMA1 is not set -# CONFIG_STM32_DMA2 is not set -# CONFIG_STM32_DAC1 is not set -# CONFIG_STM32_DAC2 is not set -# CONFIG_STM32_I2C1 is not set -# CONFIG_STM32_I2C2 is not set -# CONFIG_STM32_IWDG is not set -# CONFIG_STM32_PWR is not set -# CONFIG_STM32_SDIO is not set -# CONFIG_STM32_SPI1 is not set -# CONFIG_STM32_SPI2 is not set -CONFIG_STM32_SYSCFG=y -# CONFIG_STM32_TIM1 is not set -# CONFIG_STM32_TIM2 is not set -# CONFIG_STM32_TIM3 is not set -# CONFIG_STM32_TIM4 is not set -# CONFIG_STM32_TIM6 is not set -# CONFIG_STM32_TIM7 is not set -# CONFIG_STM32_TIM8 is not set -# CONFIG_STM32_TIM15 is not set -# CONFIG_STM32_TIM16 is not set -# CONFIG_STM32_TIM17 is not set -# CONFIG_STM32_TSC is not set -# CONFIG_STM32_USART1 is not set -CONFIG_STM32_USART2=y -# CONFIG_STM32_USB is not set -# CONFIG_STM32_WWDG is not set - -# -# Alternate Pin Mapping -# -# CONFIG_STM32_JTAG_DISABLE is not set -# CONFIG_STM32_JTAG_FULL_ENABLE is not set -# CONFIG_STM32_JTAG_NOJNTRST_ENABLE is not set -CONFIG_STM32_JTAG_SW_ENABLE=y -# CONFIG_STM32_FORCEPOWER is not set -# CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set -CONFIG_STM32_USART=y - -# -# U[S]ART Configuration -# -# CONFIG_USART2_RS485 is not set -# CONFIG_STM32_USART_SINGLEWIRE is not set - -# -# USB Host Configuration + # +# NUC100/120 Configuration Options +# +# CONFIG_ARCH_CHIP_NUC100LC1BN is not set +# CONFIG_ARCH_CHIP_NUC100LD1BN is not set +# CONFIG_ARCH_CHIP_NUC100LD2BN is not set +# CONFIG_ARCH_CHIP_NUC100RC1BN is not set +# CONFIG_ARCH_CHIP_NUC100RD1BN is not set +# CONFIG_ARCH_CHIP_NUC100RD2BN is not set +# CONFIG_ARCH_CHIP_NUC100LD3AN is not set +# CONFIG_ARCH_CHIP_NUC100LE3AN is not set +# CONFIG_ARCH_CHIP_NUC100RD3AN is not set +# CONFIG_ARCH_CHIP_NUC100RE3AN is not set +# CONFIG_ARCH_CHIP_NUC100VD2AN is not set +# CONFIG_ARCH_CHIP_NUC100VD3AN is not set +# CONFIG_ARCH_CHIP_NUC100VE3AN is not set +# CONFIG_ARCH_CHIP_NUC120LC1BN is not set +# CONFIG_ARCH_CHIP_NUC120LD1BN is not set +# CONFIG_ARCH_CHIP_NUC120LD2BN is not set +# CONFIG_ARCH_CHIP_NUC120RC1BN is not set +# CONFIG_ARCH_CHIP_NUC120RD1BN is not set +# CONFIG_ARCH_CHIP_NUC120RD2BN is not set +# CONFIG_ARCH_CHIP_NUC120LD3AN is not set +CONFIG_ARCH_CHIP_NUC120LE3AN=y +# CONFIG_ARCH_CHIP_NUC120RD3AN is not set +# CONFIG_ARCH_CHIP_NUC120RE3AN is not set +# CONFIG_ARCH_CHIP_NUC120VD2AN is not set +# CONFIG_ARCH_CHIP_NUC120VD3AN is not set +# CONFIG_ARCH_CHIP_NUC120VE3AN is not set # # External Memory Configuration @@ -254,9 +175,6 @@ CONFIG_ARCH_BOARD="nutiny-nuc120" # CONFIG_ARCH_HAVE_LEDS=y CONFIG_ARCH_LEDS=y -CONFIG_ARCH_HAVE_BUTTONS=y -# CONFIG_ARCH_BUTTONS is not set -CONFIG_ARCH_HAVE_IRQBUTTONS=y # # Board-Specific Options @@ -265,6 +183,7 @@ CONFIG_ARCH_HAVE_IRQBUTTONS=y # # RTOS Features # +# CONFIG_BOARD_INITIALIZE is not set CONFIG_MSEC_PER_TICK=10 CONFIG_RR_INTERVAL=200 # CONFIG_SCHED_INSTRUMENTATION is not set @@ -339,7 +258,6 @@ CONFIG_DEV_NULL=y # CONFIG_CAN is not set # CONFIG_PWM is not set # CONFIG_I2C is not set -CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_SPI is not set # CONFIG_RTC is not set # CONFIG_WATCHDOG is not set @@ -357,20 +275,6 @@ CONFIG_ARCH_HAVE_I2CRESET=y CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set -CONFIG_ARCH_HAVE_USART2=y -CONFIG_MCU_SERIAL=y -CONFIG_USART2_SERIAL_CONSOLE=y -# CONFIG_NO_SERIAL_CONSOLE is not set - -# -# USART2 Configuration -# -CONFIG_USART2_RXBUFSIZE=128 -CONFIG_USART2_TXBUFSIZE=128 -CONFIG_USART2_BAUD=115200 -CONFIG_USART2_BITS=8 -CONFIG_USART2_PARITY=0 -CONFIG_USART2_2STOP=0 # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set # CONFIG_WIRELESS is not set @@ -478,7 +382,6 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # CONFIG_EXAMPLES_BUTTONS is not set # CONFIG_EXAMPLES_CAN is not set -# CONFIG_EXAMPLES_CDCACM is not set # CONFIG_EXAMPLES_COMPOSITE is not set # CONFIG_EXAMPLES_DHCPD is not set # CONFIG_EXAMPLES_ELF is not set diff --git a/nuttx/configs/nutiny-nuc120/ostest/setenv.sh b/nuttx/configs/nutiny-nuc120/ostest/setenv.sh index c09c83003..ecd5a7735 100755 --- a/nuttx/configs/nutiny-nuc120/ostest/setenv.sh +++ b/nuttx/configs/nutiny-nuc120/ostest/setenv.sh @@ -55,7 +55,7 @@ fi # This is the Cygwin path to the location where I installed the CodeSourcery # toolchain under windows. You will also have to edit this if you install # the CodeSourcery toolchain in any other location -export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery G++ Lite/bin" +#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery G++ Lite/bin" # These are the Cygwin paths to the locations where I installed the Atollic # toolchain under windows. You will also have to edit this if you install @@ -67,7 +67,7 @@ export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery G++ # This is the Cygwin path to the location where I build the buildroot # toolchain. -#export TOOLCHAIN_BIN="${WD}/../misc/buildroot/build_arm_nofpu/staging_dir/bin" +export TOOLCHAIN_BIN="${WD}/../misc/buildroot/build_arm_nofpu/staging_dir/bin" # Add the path to the toolchain to the PATH varialble export PATH="${TOOLCHAIN_BIN}:/sbin:/usr/sbin:${PATH_ORIG}" diff --git a/nuttx/fs/fs_closedir.c b/nuttx/fs/fs_closedir.c index ba4f12961..cd499f539 100644 --- a/nuttx/fs/fs_closedir.c +++ b/nuttx/fs/fs_closedir.c @@ -76,7 +76,9 @@ int closedir(FAR DIR *dirp) { struct fs_dirent_s *idir = (struct fs_dirent_s *)dirp; +#ifndef CONFIG_DISABLE_MOUNTPOINT struct inode *inode; +#endif int ret; if (!idir || !idir->fd_root) @@ -89,13 +91,13 @@ int closedir(FAR DIR *dirp) * things wih different filesystems. */ +#ifndef CONFIG_DISABLE_MOUNTPOINT inode = idir->fd_root; /* The way that we handle the close operation depends on what kind of root * inode we have open. */ -#ifndef CONFIG_DISABLE_MOUNTPOINT if (INODE_IS_MOUNTPT(inode) && !DIRENT_ISPSEUDONODE(idir->fd_flags)) { /* The node is a file system mointpoint. Verify that the mountpoint |