mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 07:12:54 +08:00
configs/compal_e99/nsh_compalram: Configuration converted to use the kconfig-frontends tools
This commit is contained in:
@@ -37,72 +37,88 @@ 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
|
||||
EXTRA_LIBS = $(OSMODIR)/src/target/firmware/comm/libcomm.a \
|
||||
$(OSMODIR)/src/shared/libosmocore/build-target/src/.libs/libosmocore.a \
|
||||
$(OSMODIR)/src/target/firmware/calypso/libcalypso.a \
|
||||
$(OSMODIR)/src/target/firmware/comm/libcomm.a
|
||||
# ^^^ Stupid hack! Why do I have to put it twice???
|
||||
ifeq ($(WINTOOL),y)
|
||||
# Windows-native toolchains
|
||||
DIRLINK = $(TOPDIR)/tools/copydir.sh
|
||||
DIRUNLINK = $(TOPDIR)/tools/unlink.sh
|
||||
MKDEP = $(TOPDIR)/tools/mknulldeps.sh
|
||||
ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}"
|
||||
ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}"
|
||||
ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/compalram.ld}"
|
||||
else
|
||||
# Linux/Cygwin-native toolchain
|
||||
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
||||
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
|
||||
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
|
||||
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/compalram.ld
|
||||
endif
|
||||
|
||||
CROSSDEV = arm-nuttx-elf-
|
||||
CC = $(CROSSDEV)gcc
|
||||
CPP = $(CROSSDEV)gcc -E
|
||||
LD = $(CROSSDEV)ld
|
||||
AR = $(CROSSDEV)ar rcs
|
||||
NM = $(CROSSDEV)nm
|
||||
OBJCOPY = $(CROSSDEV)objcopy
|
||||
OBJDUMP = $(CROSSDEV)objdump
|
||||
CC = $(CROSSDEV)gcc
|
||||
CXX = $(CROSSDEV)g++
|
||||
CPP = $(CROSSDEV)gcc -E
|
||||
LD = $(CROSSDEV)ld
|
||||
AR = $(CROSSDEV)ar rcs
|
||||
NM = $(CROSSDEV)nm
|
||||
OBJCOPY = $(CROSSDEV)objcopy
|
||||
OBJDUMP = $(CROSSDEV)objdump
|
||||
|
||||
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 ($(CONFIG_DEBUG_SYMBOLS),y)
|
||||
ARCHOPTIMIZATION = -g
|
||||
ifeq ($(ARCHCCMAJOR),4)
|
||||
ifneq ($(HOSTOS),Cygwin)
|
||||
OBJCOPYARGS = -R .note -R .note.gnu.build-id -R .comment
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ("${CONFIG_DEBUG}","y")
|
||||
ARCHOPTIMIZATION = -g
|
||||
endif
|
||||
|
||||
ifneq ($(CONFIG_DEBUG_NOOPT),y)
|
||||
ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer
|
||||
ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer
|
||||
endif
|
||||
|
||||
ifeq ($(ARCHCCMAJOR),4)
|
||||
ARCHCPUFLAGS = -mcpu=arm7tdmi -mfloat-abi=soft -fno-builtin
|
||||
ARCHCPUFLAGS = -mcpu=arm7tdmi -mfloat-abi=soft
|
||||
else
|
||||
ARCHCPUFLAGS = -mapcs-32 -mcpu=arm7tdmi -msoft-float -fno-builtin
|
||||
endif
|
||||
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_compalram/ld.script
|
||||
|
||||
CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \
|
||||
$(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe
|
||||
CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS)
|
||||
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
|
||||
AFLAGS = $(CFLAGS) -D__ASSEMBLY__
|
||||
|
||||
NXFLATLDFLAGS1 = -r -d -warn-common
|
||||
NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) \
|
||||
-T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-gotoff.ld \
|
||||
-no-check-sections
|
||||
LDNXFLATFLAGS = -e main -s 2048
|
||||
|
||||
OBJEXT = .o
|
||||
LIBEXT = .a
|
||||
EXEEXT =
|
||||
|
||||
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
|
||||
LDFLAGS += -g
|
||||
ARCHCPUFLAGS = -mapcs-32 -mcpu=arm7tdmi -msoft-float
|
||||
endif
|
||||
|
||||
ARCHCFLAGS = -fno-builtin
|
||||
ARCHCXXFLAGS = -fno-builtin -fno-exceptions
|
||||
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
|
||||
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow
|
||||
ARCHWARNINGSXX = -Wall -Wshadow
|
||||
ARCHDEFINES =
|
||||
|
||||
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
||||
CFLAGS = $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \
|
||||
$(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe
|
||||
CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS)
|
||||
CXXFLAGS = $(ARCHCXXFLAGS) $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) \
|
||||
$(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe
|
||||
CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS)
|
||||
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
|
||||
AFLAGS = $(CFLAGS) -D__ASSEMBLY__
|
||||
|
||||
HOSTCC = gcc
|
||||
HOSTINCLUDES = -I.
|
||||
HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe
|
||||
HOSTLDFLAGS =
|
||||
NXFLATLDFLAGS1 = -r -d -warn-common
|
||||
NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) \
|
||||
-T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-gotoff.ld \
|
||||
-no-check-sections
|
||||
LDNXFLATFLAGS = -e main -s 2048
|
||||
|
||||
OBJEXT = .o
|
||||
LIBEXT = .a
|
||||
EXEEXT =
|
||||
|
||||
ifneq ($(CROSSDEV),arm-nuttx-elf-)
|
||||
LDFLAGS += -nostartfiles -nodefaultlibs
|
||||
endif
|
||||
ifeq ($(CONFIG_DEBUG),y)
|
||||
LDFLAGS += -g
|
||||
endif
|
||||
|
||||
HOSTCC = gcc
|
||||
HOSTINCLUDES = -I.
|
||||
HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe
|
||||
HOSTLDFLAGS =
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
############################################################################
|
||||
# configs/compal_e99/nsh_compalram/appconfig
|
||||
#
|
||||
# Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name NuttX nor the names of its contributors may be
|
||||
# used to endorse or promote products derived from this software
|
||||
# without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
# NSH shell
|
||||
CONFIGURED_APPS += system/readline
|
||||
CONFIGURED_APPS += nshlib
|
||||
CONFIGURED_APPS += examples/nsh
|
||||
|
||||
# Path to example in apps/examples
|
||||
CONFIGURED_APPS += examples/hello
|
||||
CONFIGURED_APPS += system/poweroff
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,126 +0,0 @@
|
||||
/*
|
||||
* Linker script for running from internal SRAM on Compal phones
|
||||
*
|
||||
* This script is tailored specifically to the requirements imposed
|
||||
* on us by the Compal bootloader.
|
||||
*
|
||||
*/
|
||||
|
||||
OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
|
||||
OUTPUT_ARCH(arm)
|
||||
ENTRY(__start)
|
||||
MEMORY
|
||||
{
|
||||
/* compal-loaded binary: our text, initialized data */
|
||||
LRAM (rw) : ORIGIN = 0x00800000, LENGTH = 0x00020000
|
||||
/* compal-loaded binary: our unitialized data, stacks, heap */
|
||||
IRAM (rw) : ORIGIN = 0x00820000, LENGTH = 0x00020000
|
||||
}
|
||||
SECTIONS
|
||||
{
|
||||
. = 0x800000;
|
||||
|
||||
/* romloader data section, contains passthru interrupt vectors */
|
||||
.compal.loader (NOLOAD) : { . = 0x100; } > LRAM
|
||||
|
||||
/* image signature (prepended by osmocon according to phone type) */
|
||||
.compal.header (NOLOAD) : { . = 4; } > LRAM
|
||||
|
||||
/* initialization code */
|
||||
. = ALIGN(4);
|
||||
.text.start : {
|
||||
PROVIDE(__start = .);
|
||||
KEEP(*(.text.start))
|
||||
*(.text.start)
|
||||
} > LRAM
|
||||
|
||||
/* exception vectors from 0x80001c to 0x800034 */
|
||||
.text.exceptions 0x80001c : AT (LOADADDR(.text.start) + SIZEOF(.text.start)) {
|
||||
KEEP(*(.text.exceptions))
|
||||
* (.text.exceptions)
|
||||
. = ALIGN(4);
|
||||
} > LRAM
|
||||
PROVIDE(_exceptions = LOADADDR(.text.exceptions));
|
||||
|
||||
/* code */
|
||||
. = ALIGN(4);
|
||||
.text (LOADADDR(.text.exceptions) + SIZEOF(.text.exceptions)) :
|
||||
AT (LOADADDR(.text.exceptions) + SIZEOF(.text.exceptions)) {
|
||||
/* regular code */
|
||||
*(.text*)
|
||||
/* always-in-ram code */
|
||||
*(.ramtext*)
|
||||
/* gcc voodoo */
|
||||
*(.glue_7t) *(.glue_7) *(.vfp11_veneer) *(.v4_bx)
|
||||
. = ALIGN(4);
|
||||
} > LRAM
|
||||
PROVIDE(_text_start = LOADADDR(.text));
|
||||
PROVIDE(_text_end = LOADADDR(.text) + SIZEOF(.text));
|
||||
|
||||
/* constructor pointers */
|
||||
.ctors : {
|
||||
/* ctor count */
|
||||
LONG(SIZEOF(.ctors) / 4 - 2)
|
||||
/* ctor pointers */
|
||||
KEEP(*(SORT(.ctors)))
|
||||
/* end of list */
|
||||
LONG(0)
|
||||
} > LRAM
|
||||
PROVIDE(_ctor_start = LOADADDR(.ctors));
|
||||
PROVIDE(_ctor_end = LOADADDR(.ctors) + SIZEOF(.ctors));
|
||||
|
||||
/* destructor pointers */
|
||||
.dtors : {
|
||||
/* dtor count */
|
||||
LONG(SIZEOF(.dtors) / 4 - 2)
|
||||
/* dtor pointers */
|
||||
KEEP(*(SORT(.dtors)))
|
||||
/* end of list */
|
||||
LONG(0)
|
||||
} > LRAM
|
||||
PROVIDE(_dtor_start = LOADADDR(.dtors));
|
||||
PROVIDE(_dtor_end = LOADADDR(.dtors) + SIZEOF(.dtors));
|
||||
|
||||
/* read-only data */
|
||||
. = ALIGN(4);
|
||||
.rodata : {
|
||||
*(.rodata*)
|
||||
} > LRAM
|
||||
PROVIDE(_rodata_start = LOADADDR(.rodata));
|
||||
PROVIDE(_rodata_end = LOADADDR(.rodata) + SIZEOF(.rodata));
|
||||
|
||||
/* initialized data */
|
||||
. = ALIGN(4);
|
||||
.data : {
|
||||
*(.data)
|
||||
} > LRAM
|
||||
PROVIDE(_data_start = LOADADDR(.data));
|
||||
PROVIDE(_data_end = LOADADDR(.data) + SIZEOF(.data));
|
||||
|
||||
/* pic offset tables */
|
||||
. = ALIGN(4);
|
||||
.got : {
|
||||
*(.got)
|
||||
*(.got.plt) *(.igot.plt) *(.got) *(.igot)
|
||||
} > LRAM
|
||||
PROVIDE(_got_start = LOADADDR(.got));
|
||||
PROVIDE(_got_end = LOADADDR(.got) + SIZEOF(.got));
|
||||
|
||||
/* uninitialized data */
|
||||
.bss (NOLOAD) : {
|
||||
. = ALIGN(4);
|
||||
__bss_start = .;
|
||||
_sbss = ABSOLUTE(.);
|
||||
*(.bss)
|
||||
_ebss = ABSOLUTE(.);
|
||||
} > IRAM
|
||||
. = ALIGN(4);
|
||||
__bss_end = .;
|
||||
PROVIDE(_bss_start = __bss_start);
|
||||
PROVIDE(_bss_end = __bss_end);
|
||||
|
||||
/* end of image */
|
||||
. = ALIGN(4);
|
||||
_end = .;
|
||||
PROVIDE(end = .);
|
||||
}
|
||||
@@ -32,15 +32,32 @@
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
if [ "$(basename $0)" = "setenv.sh" ] ; then
|
||||
if [ "$_" = "$0" ] ; then
|
||||
echo "You must source this script, not run it!" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z ${PATH_ORIG} ]; then export PATH_ORIG=${PATH}; fi
|
||||
|
||||
WD=`pwd`
|
||||
export BUILDROOT_BIN=${WD}/../misc/buildroot/build_arm_nofpu/staging_dir/bin
|
||||
export PATH=${BUILDROOT_BIN}:/sbin:/usr/sbin:${PATH_ORIG}
|
||||
if [ ! -x "setenv.sh" ]; then
|
||||
echo "This script must be executed from the top-level NuttX build directory"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "${PATH_ORIG}" ]; then
|
||||
export PATH_ORIG="${PATH}"
|
||||
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_CodeBench_Lite_for_ARM_EABI/bin"
|
||||
|
||||
# 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"
|
||||
|
||||
# Add the path to the toolchain to the PATH varialble
|
||||
export PATH="${TOOLCHAIN_BIN}:/sbin:/usr/sbin:${PATH_ORIG}"
|
||||
|
||||
echo "PATH : ${PATH}"
|
||||
|
||||
Reference in New Issue
Block a user