Clean up of pirelli-dpl10/nsh_highram configuration

This commit is contained in:
Gregory Nutt 2013-05-15 08:29:04 -06:00
parent f4414470d2
commit 8447e76779
5 changed files with 83 additions and 8 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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