Merged in masayuki2009/nuttx.nuttx/lc832450_elf_test (pull request #675)
lc832450 elf test * arch/arm/src/lc823450: Change CONFIG_DEBUG to CONFIG_DEBUG_FEATURES in lc823450_start.c Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com> * configs/lc823450-xgevk: Call elf_initialize() in lc823450_bringup.c Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com> * configs/lc823450-xgevk: Add ELF related parameters in Make.defs Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com> * configs/lc823450-xgevk: Add elf configuration Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com> Approved-by: GregoryN <gnutt@nuttx.org>
This commit is contained in:
parent
b8665996d5
commit
562637391c
@ -142,7 +142,7 @@ static void go_os_start(void *pv, unsigned int nbytes)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_DEBUG
|
||||
#ifdef CONFIG_DEBUG_FEATURES
|
||||
# define showprogress(c) up_lowputc(c)
|
||||
#else
|
||||
# define showprogress(c)
|
||||
@ -314,12 +314,12 @@ void __start(void)
|
||||
modifyreg32(MRSTCNTAPB, 0, MRSTCNTAPB_PORT2_RSTB);
|
||||
modifyreg32(rP2DT, 0, 1 << 15 /* GPIO2F */);
|
||||
modifyreg32(rP2DRC, 0, 1 << 15 /* GPIO2F */);
|
||||
#ifdef CONFIG_DEBUG
|
||||
#ifdef CONFIG_DEBUG_FEATURES
|
||||
|
||||
/* enable TXD0 for debug */
|
||||
|
||||
modifyreg32(PMDCNT5, 0, 3 << 14);
|
||||
#endif /* CONFIG_DEBUG */
|
||||
#endif /* CONFIG_DEBUG_FEATURES */
|
||||
#else /* CONFIG_LC823450_IPL2 */
|
||||
up_init_default_mux();
|
||||
#endif /* CONFIG_LC823450_IPL2 */
|
||||
|
70
configs/lc823450-xgevk/elf/defconfig
Normal file
70
configs/lc823450-xgevk/elf/defconfig
Normal file
@ -0,0 +1,70 @@
|
||||
# CONFIG_LC823450_SDIF is not set
|
||||
CONFIG_ARCH="arm"
|
||||
CONFIG_ARCH_BOARD="lc823450-xgevk"
|
||||
CONFIG_ARCH_BOARD_LC823450_XGEVK=y
|
||||
CONFIG_ARCH_CHIP_LC823450=y
|
||||
CONFIG_ARCH_FLOAT_H=y
|
||||
CONFIG_ARCH_INTERRUPTSTACK=2048
|
||||
CONFIG_ARCH_STDARG_H=y
|
||||
CONFIG_BINFMT_CONSTRUCTORS=y
|
||||
CONFIG_BINFMT_EXEPATH=y
|
||||
CONFIG_BOARD_INITIALIZE=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=12061
|
||||
CONFIG_C99_BOOL8=y
|
||||
CONFIG_CODECS_HASH_MD5=y
|
||||
CONFIG_DEBUG_FULLOPT=y
|
||||
CONFIG_DEBUG_SYMBOLS=y
|
||||
CONFIG_DEV_ZERO=y
|
||||
CONFIG_DISABLE_POSIX_TIMERS=y
|
||||
CONFIG_ELF=y
|
||||
CONFIG_EXAMPLES_ELF=y
|
||||
CONFIG_EXECFUNCS_SYMTAB="exports"
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_FS_ROMFS=y
|
||||
CONFIG_FS_WRITABLE=y
|
||||
CONFIG_HAVE_CXX=y
|
||||
CONFIG_INTELHEX_BINARY=y
|
||||
CONFIG_LC823450_UART0=y
|
||||
CONFIG_LIBM=y
|
||||
CONFIG_LIB_BOARDCTL=y
|
||||
CONFIG_LIB_KBDCODEC=y
|
||||
CONFIG_MAX_TASKS=64
|
||||
CONFIG_MAX_WDOGPARMS=2
|
||||
CONFIG_MEMSET_OPTSPEED=y
|
||||
CONFIG_NAME_MAX=765
|
||||
CONFIG_NETUTILS_CODECS=y
|
||||
CONFIG_NFILE_DESCRIPTORS=45
|
||||
CONFIG_NFILE_STREAMS=8
|
||||
CONFIG_PATH_INITIAL="/mnt/romfs"
|
||||
CONFIG_PIPES=y
|
||||
CONFIG_POSIX_SPAWN_PROXY_STACKSIZE=2048
|
||||
CONFIG_PREALLOC_TIMERS=4
|
||||
CONFIG_PREALLOC_WDOGS=16
|
||||
CONFIG_PTHREAD_MUTEX_TYPES=y
|
||||
CONFIG_PTHREAD_STACK_DEFAULT=3072
|
||||
CONFIG_RAM_SIZE=1044480
|
||||
CONFIG_RAM_START=0x02001000
|
||||
CONFIG_RAW_BINARY=y
|
||||
CONFIG_RTC=y
|
||||
CONFIG_RTC_DATETIME=y
|
||||
CONFIG_SCHED_ATEXIT=y
|
||||
CONFIG_SCHED_CHILD_STATUS=y
|
||||
CONFIG_SCHED_HAVE_PARENT=y
|
||||
CONFIG_SCHED_INSTRUMENTATION=y
|
||||
CONFIG_SCHED_INSTRUMENTATION_BUFFER=y
|
||||
CONFIG_SCHED_ONEXIT=y
|
||||
CONFIG_SCHED_ONEXIT_MAX=32
|
||||
CONFIG_SCHED_STARTHOOK=y
|
||||
CONFIG_SCHED_WAITPID=y
|
||||
CONFIG_SDCLONE_DISABLE=y
|
||||
CONFIG_SERIAL_TERMIOS=y
|
||||
CONFIG_START_DAY=3
|
||||
CONFIG_START_MONTH=10
|
||||
CONFIG_START_YEAR=2013
|
||||
CONFIG_SYMTAB_ORDEREDBYNAME=y
|
||||
CONFIG_TASK_NAME_SIZE=24
|
||||
CONFIG_UART0_RXBUFSIZE=512
|
||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||
CONFIG_UART0_TXBUFSIZE=2048
|
||||
CONFIG_USERMAIN_STACKSIZE=3072
|
||||
CONFIG_USER_ENTRYPOINT="elf_main"
|
@ -94,15 +94,33 @@ CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS)
|
||||
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
|
||||
AFLAGS = $(CFLAGS) -D__ASSEMBLY__
|
||||
|
||||
# NXFLAT module definitions
|
||||
|
||||
NXFLATLDFLAGS1 = -r -d -warn-common
|
||||
NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-pcrel.ld -no-check-sections
|
||||
LDNXFLATFLAGS = -e main -s 2048
|
||||
|
||||
# ELF module definitions
|
||||
|
||||
CELFFLAGS = $(CFLAGS) -mlong-calls # --target1-abs
|
||||
CXXELFFLAGS = $(CXXFLAGS) -mlong-calls # --target1-abs
|
||||
|
||||
LDELFFLAGS = -r -e main
|
||||
ifeq ($(WINTOOL),y)
|
||||
LDELFFLAGS += -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/gnu-elf.ld}"
|
||||
else
|
||||
LDELFFLAGS += -T $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/gnu-elf.ld
|
||||
endif
|
||||
|
||||
# File extensions
|
||||
|
||||
ASMEXT = .S
|
||||
OBJEXT = .o
|
||||
LIBEXT = .a
|
||||
EXEEXT =
|
||||
|
||||
# Linker flags
|
||||
|
||||
ifneq ($(CROSSDEV),arm-nuttx-elf-)
|
||||
LDFLAGS += -nostartfiles -nodefaultlibs
|
||||
endif
|
||||
|
@ -51,6 +51,10 @@
|
||||
|
||||
#include <nuttx/sched.h>
|
||||
|
||||
#ifdef CONFIG_ELF
|
||||
# include <nuttx/binfmt/elf.h>
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_RNDIS
|
||||
# include <nuttx/usb/rndis.h>
|
||||
#endif
|
||||
@ -116,6 +120,16 @@ int lc823450_bringup(void)
|
||||
lc823450_wm8776initialize(0);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ELF
|
||||
/* Initialize the ELF binary loader */
|
||||
|
||||
ret = elf_initialize();
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to initialize the ELF loader: %d\n", ret);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_RNDIS) && defined(CONFIG_NSH_MACADDR)
|
||||
uint8_t mac[6];
|
||||
mac[0] = 0xaa; /* TODO */
|
||||
|
Loading…
Reference in New Issue
Block a user