summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2013-05-15 08:29:04 -0600
committerGregory Nutt <gnutt@nuttx.org>2013-05-15 08:29:04 -0600
commit5f8d043efc6d56c7957bae00b886d4e57a71b56d (patch)
tree2b87042eaa0f6a6405bd81b45a548e33cb64bcb4
parentda59df96e4fc5cac90f9a51bbff8dde42a422a45 (diff)
downloadpx4-nuttx-5f8d043efc6d56c7957bae00b886d4e57a71b56d.tar.gz
px4-nuttx-5f8d043efc6d56c7957bae00b886d4e57a71b56d.tar.bz2
px4-nuttx-5f8d043efc6d56c7957bae00b886d4e57a71b56d.zip
Clean up of pirelli-dpl10/nsh_highram configuration
-rw-r--r--misc/buildroot/toolchain/nxflat/.gitignore7
-rw-r--r--nuttx/arch/arm/src/arm/Kconfig11
-rw-r--r--nuttx/configs/pirelli_dpl10/README.txt66
-rw-r--r--nuttx/configs/pirelli_dpl10/nsh_highram/Make.defs4
-rw-r--r--nuttx/configs/pirelli_dpl10/nsh_highram/defconfig10
-rw-r--r--nuttx/configs/pirelli_dpl10/scripts/highram.ld (renamed from nuttx/configs/pirelli_dpl10/nsh_highram/ld.script)0
6 files changed, 90 insertions, 8 deletions
diff --git a/misc/buildroot/toolchain/nxflat/.gitignore b/misc/buildroot/toolchain/nxflat/.gitignore
new file mode 100644
index 000000000..023eec1be
--- /dev/null
+++ b/misc/buildroot/toolchain/nxflat/.gitignore
@@ -0,0 +1,7 @@
+/.compiled
+/.installed
+/arch
+/ldnxflat
+/mknxflat
+/readnxflat
+/*.exe
diff --git a/nuttx/arch/arm/src/arm/Kconfig b/nuttx/arch/arm/src/arm/Kconfig
index 665fab575..758dbaff0 100644
--- a/nuttx/arch/arm/src/arm/Kconfig
+++ b/nuttx/arch/arm/src/arm/Kconfig
@@ -17,6 +17,10 @@ config ARM_TOOLCHAIN_BUILDROOT
config ARM_TOOLCHAIN_CODESOURCERYL
bool "CodeSourcery GNU toolchain under Linux"
depends on HOST_LINUX
+ ---help---
+ For use with the GNU toolchain built with the NuttX buildroot package.
+ This tools may be arm-nuttx-eabi- or, if ARM_OABI_TOOLCHAIN is set,
+ arm-nuttx-elf-.
config ARM_TOOLCHAIN_CODESOURCERYW
bool "CodeSourcery GNU toolchain under Windows"
@@ -30,7 +34,12 @@ config ARM_TOOLCHAIN_GNU_EABI
bool "Generic GNU EABI toolchain"
---help---
This option should work for any modern GNU toolchain (GCC 4.5 or newer)
- configured for arm-none-eabi.
+ configured for arm-none-eabi-.
+
+config ARM_TOOLCHAIN_GNU_OABI
+ bool "Generic GNU OABI toolchain"
+ ---help---
+ This option should work for any GNU toolchain configured for arm-elf-.
endchoice
diff --git a/nuttx/configs/pirelli_dpl10/README.txt b/nuttx/configs/pirelli_dpl10/README.txt
index b53a25917..59b7d7951 100644
--- a/nuttx/configs/pirelli_dpl10/README.txt
+++ b/nuttx/configs/pirelli_dpl10/README.txt
@@ -54,6 +54,21 @@ o highram is for phones having the romloader(if the phone has a bootrom)
by talking to the ramloader) when having a ramloader(which can only
load 64k).
+Memory Map
+=========
+
+Calypso has 256KB of internal SRAM (0x800000-0x83ffff). Only this internal SRAM
+is used by these configurations. The internal SRAM is broken up into three
+logic banks.
+
+ LRAM (rw) : ORIGIN = 0x00800000, LENGTH = 0x00020000
+ TRAM (rw) : ORIGIN = 0x00820000, LENGTH = 0x00010000
+ IRAM (rw) : ORIGIN = 0x00830000, LENGTH = 0x00010000
+
+Code can be loaded by the bootloader only into TRAM and, hence, is restricted
+to 64KB. The additional 64KB if IRAM may be used for uninitialized data and
+for the NuttX heap only.
+
JTAG and Alternative Serial Console
===================================
@@ -116,3 +131,54 @@ JTAG Apapter:
the MCU to enter a bootloader on reset.
Use 10K-100K Ohm pull up resistor.
------- ----------- --------------- --------------------------------------
+
+NuttX OABI "buildroot" Toolchain
+================================
+
+ A GNU GCC-based toolchain is assumed. The files */setenv.sh should
+ be modified to point to the correct path to the ARM GCC toolchain (if
+ different from the default in your PATH variable).
+
+ If you have no ARMtoolchain, 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 pirelli_dpl10/<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/arm7tdmi-defconfig-4.3.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.
+
+Generic OABI Toolchain
+======================
+
+ The NuttX OABI toolchain is selected with:
+
+ CONFIG_ARM_TOOLCHAIN_BUILDROOT=y
+ CONFIG_ARM_OABI_TOOLCHAIN=y
+
+ In most cases, OsmocomBB is built with a different OABI toolchain with a
+ prefix of arm-elf-. To use that toolchain, change the configuration as
+ follows:
+
+ CONFIG_ARM_TOOLCHAIN_GNU_OABI=y
diff --git a/nuttx/configs/pirelli_dpl10/nsh_highram/Make.defs b/nuttx/configs/pirelli_dpl10/nsh_highram/Make.defs
index 7ce44aecc..59b21efff 100644
--- a/nuttx/configs/pirelli_dpl10/nsh_highram/Make.defs
+++ b/nuttx/configs/pirelli_dpl10/nsh_highram/Make.defs
@@ -35,6 +35,7 @@
include ${TOPDIR}/.config
include ${TOPDIR}/tools/Config.mk
+include ${TOPDIR}/arch/arm/src/arm/Toolchain.defs
ifeq ("${CONFIG_SERCOMM_CONSOLE}","y")
OSMODIR = $(TOPDIR)/../../osmocom-bb
@@ -45,7 +46,6 @@ EXTRA_LIBS = $(OSMODIR)/src/target/firmware/comm/libcomm.a \
# ^^^ Stupid hack! Why do I have to put it twice???
endif
-CROSSDEV = arm-elf-
CC = $(CROSSDEV)gcc
CPP = $(CROSSDEV)gcc -E
LD = $(CROSSDEV)ld
@@ -73,7 +73,7 @@ ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow
ARCHDEFINES =
ARCHINCLUDES = -I. -I$(OSMODIR)/src/shared/libosmocore/include -isystem $(TOPDIR)/include
-ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/nsh_highram/ld.script
+ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/highram.ld
CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \
$(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe
diff --git a/nuttx/configs/pirelli_dpl10/nsh_highram/defconfig b/nuttx/configs/pirelli_dpl10/nsh_highram/defconfig
index 62c01a669..5f3e4a863 100644
--- a/nuttx/configs/pirelli_dpl10/nsh_highram/defconfig
+++ b/nuttx/configs/pirelli_dpl10/nsh_highram/defconfig
@@ -145,8 +145,8 @@ CONFIG_ARCH_STACKDUMP=y
#
CONFIG_BOARD_LOOPSPERMSEC=1250
# CONFIG_ARCH_CALIBRATION is not set
-CONFIG_DRAM_START=0
-CONFIG_DRAM_SIZE=8650752
+CONFIG_DRAM_START=0x00800000
+CONFIG_DRAM_SIZE=262144
CONFIG_ARCH_HAVE_INTERRUPTSTACK=y
CONFIG_ARCH_INTERRUPTSTACK=1024
@@ -235,10 +235,10 @@ CONFIG_PREALLOC_TIMERS=8
#
# Stack and heap information
#
-CONFIG_IDLETHREAD_STACKSIZE=4096
-CONFIG_USERMAIN_STACKSIZE=4096
+CONFIG_IDLETHREAD_STACKSIZE=2048
+CONFIG_USERMAIN_STACKSIZE=2048
CONFIG_PTHREAD_STACK_MIN=256
-CONFIG_PTHREAD_STACK_DEFAULT=4096
+CONFIG_PTHREAD_STACK_DEFAULT=2048
#
# Device Drivers
diff --git a/nuttx/configs/pirelli_dpl10/nsh_highram/ld.script b/nuttx/configs/pirelli_dpl10/scripts/highram.ld
index 35fa84728..35fa84728 100644
--- a/nuttx/configs/pirelli_dpl10/nsh_highram/ld.script
+++ b/nuttx/configs/pirelli_dpl10/scripts/highram.ld