From 354116817a07fe13eae9ddfb21c369d67552c72a Mon Sep 17 00:00:00 2001 From: patacongo Date: Tue, 5 Apr 2011 01:46:55 +0000 Subject: Progress toward kernel build git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3465 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/configs/sam3u-ek/kernel/Makefile | 18 +++++++++++++----- nuttx/configs/sam3u-ek/kernel/kernel.ld | 14 +++++++++++++- nuttx/configs/sam3u-ek/knsh/defconfig | 10 ++++++++++ 3 files changed, 36 insertions(+), 6 deletions(-) (limited to 'nuttx/configs') diff --git a/nuttx/configs/sam3u-ek/kernel/Makefile b/nuttx/configs/sam3u-ek/kernel/Makefile index dd3e1892c..38abe2b0a 100755 --- a/nuttx/configs/sam3u-ek/kernel/Makefile +++ b/nuttx/configs/sam3u-ek/kernel/Makefile @@ -74,7 +74,7 @@ $(TOPDIR)/nuttx_user.elf: nuttx_user.elf $(TOPDIR)/User.map: nuttx_user.elf @$(NM) nuttx_user.elf >$(TOPDIR)/User.map - @$(CROSSDEV)size $(TOPDIR)/User.map + @$(CROSSDEV)size nuttx_user.elf $(BOARD_INCLUDE)/user_map.h: $(TOPDIR)/User.map @echo "/* configs/$(CONFIG_ARCH_BOARD)/include/user_map.h" > $(BOARD_INCLUDE)/user_map.h @@ -85,10 +85,18 @@ $(BOARD_INCLUDE)/user_map.h: $(TOPDIR)/User.map @echo "#ifndef __ARCH_BOARD_USER_MAP_H" >> $(BOARD_INCLUDE)/user_map.h @echo "#define __ARCH_BOARD_USER_MAP_H" >> $(BOARD_INCLUDE)/user_map.h @echo "" >> $(BOARD_INCLUDE)/user_map.h - @echo "#define CONFIG_USER_ENTRYPOINT `grep user_start $(TOPDIR)/User.map | cut -d' ' -f1`" >> $(BOARD_INCLUDE)/user_map.h - @echo "#define CONFIG_USER_DATASOURCE `grep _eronly $(TOPDIR)/User.map | cut -d' ' -f1`" >> $(BOARD_INCLUDE)/user_map.h - @echo "#define CONFIG_USER_DATADESTSTART `grep _sdata $(TOPDIR)/User.map | cut -d' ' -f1`" >> $(BOARD_INCLUDE)/user_map.h - @echo "#define CONFIG_USER_DATADESTEND `grep _edata $(TOPDIR)/User.map | cut -d' ' -f1`" >> $(BOARD_INCLUDE)/user_map.h + @echo "/* General memory map */" >> $(BOARD_INCLUDE)/user_map.h + @echo "" >> $(BOARD_INCLUDE)/user_map.h + @echo "#define CONFIG_USER_ENTRYPOINT 0x`grep \" user_start$\" $(TOPDIR)/User.map | cut -d' ' -f1`" >> $(BOARD_INCLUDE)/user_map.h + @echo "#define CONFIG_USER_DATASOURCE 0x`grep \" _eronly$\" $(TOPDIR)/User.map | cut -d' ' -f1`" >> $(BOARD_INCLUDE)/user_map.h + @echo "#define CONFIG_USER_DATADESTSTART 0x`grep \" _sdata$\" $(TOPDIR)/User.map | cut -d' ' -f1`" >> $(BOARD_INCLUDE)/user_map.h + @echo "#define CONFIG_USER_DATADESTEND 0x`grep \" _edata$\" $(TOPDIR)/User.map | cut -d' ' -f1`" >> $(BOARD_INCLUDE)/user_map.h + @echo "" >> $(BOARD_INCLUDE)/user_map.h + @echo "/* Memory manager entry points */" >> $(BOARD_INCLUDE)/user_map.h + @echo "" >> $(BOARD_INCLUDE)/user_map.h + @echo "#define CONFIG_USER_MALLOC 0x`grep \" malloc$\" $(TOPDIR)/User.map | cut -d' ' -f1`" >> $(BOARD_INCLUDE)/user_map.h + @echo "#define CONFIG_USER_REALLOC 0x`grep \" realloc$\" $(TOPDIR)/User.map | cut -d' ' -f1`" >> $(BOARD_INCLUDE)/user_map.h + @echo "#define CONFIG_USER_FREE 0x`grep \" free$\" $(TOPDIR)/User.map | cut -d' ' -f1`" >> $(BOARD_INCLUDE)/user_map.h @echo "" >> $(BOARD_INCLUDE)/user_map.h @echo "#endif /* __ARCH_BOARD_USER_MAP_H */" >> $(BOARD_INCLUDE)/user_map.h diff --git a/nuttx/configs/sam3u-ek/kernel/kernel.ld b/nuttx/configs/sam3u-ek/kernel/kernel.ld index 72f79d9d7..267963978 100644 --- a/nuttx/configs/sam3u-ek/kernel/kernel.ld +++ b/nuttx/configs/sam3u-ek/kernel/kernel.ld @@ -62,9 +62,21 @@ MEMORY sram2 (rwx) : ORIGIN = 0x20080000, LENGTH = 16K } +# Force user_start into the link. This is the application entry point + +EXTERN(user_start) + +# Make sure that the critical memory management functions are in user-space. +# Currently, the plan is that the memory manager will reside in user-space +# but be usable both by kernel- and user-space code + +EXTERN(malloc) +EXTERN(realloc) +EXTERN(free) + OUTPUT_ARCH(arm) ENTRY(user_start) -EXTERN(user_start) + SECTIONS { .text : { diff --git a/nuttx/configs/sam3u-ek/knsh/defconfig b/nuttx/configs/sam3u-ek/knsh/defconfig index b6aa4aba2..6602685c5 100755 --- a/nuttx/configs/sam3u-ek/knsh/defconfig +++ b/nuttx/configs/sam3u-ek/knsh/defconfig @@ -339,6 +339,16 @@ CONFIG_SCHED_WORKPERIOD=(50*1000) CONFIG_SCHED_WORKSTACKSIZE=1024 CONFIG_SIG_SIGWORK=4 +# +# These NSH commands are (temporarily) disable because more support is needed +# for these commands to work with CONFIG_NUTTX_KERNEL +# +CONFIG_NSH_DISABLE_MKRD=y +CONFIG_NSH_DISABLE_MKFATFS=y +CONFIG_NSH_DISABLE_LOSETUP=y +CONFIG_NSH_DISABLE_DD=y +CONFIG_NSH_DISABLE_PS=y + # # The following can be used to disable categories of # APIs supported by the OS. If the compiler supports -- cgit v1.2.3