From 129dd27cc4deb042d2f88c65927adc49c338756d Mon Sep 17 00:00:00 2001 From: patacongo Date: Wed, 28 Feb 2007 23:45:56 +0000 Subject: Still working toward clean 8051 link git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@25 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/arch/README.txt | 18 ++++++++++++++++-- nuttx/arch/c5471/Make.defs | 3 ++- nuttx/arch/c5471/defconfig | 22 ++++++++++++++++++++-- nuttx/arch/c5471/src/Makefile | 11 +++++------ nuttx/arch/sim/Make.defs | 3 ++- nuttx/arch/sim/defconfig | 24 +++++++++++++++++++++--- nuttx/arch/sim/src/Makefile | 15 +++++++-------- 7 files changed, 73 insertions(+), 23 deletions(-) (limited to 'nuttx/arch') diff --git a/nuttx/arch/README.txt b/nuttx/arch/README.txt index bdc353cbb..e10393c9f 100644 --- a/nuttx/arch/README.txt +++ b/nuttx/arch/README.txt @@ -62,7 +62,7 @@ defconfig -- This is a configuration file similar to the Linux General OS setup - CONFIG_EXAMPLE - identifies the subdirectgory in examples + CONFIG_EXAMPLE - identifies the subdirectory in examples that will be used in the build CONFIG_DEBUG - enables built-in debug options CONFIG_DEBUG_VERBOSE - enables verbose debug output @@ -82,7 +82,21 @@ defconfig -- This is a configuration file similar to the Linux CONFIG_DEV_CONSOLE - Set if architecture-specific logic provides /dev/console. Enables stdout, stderr, stdin. - Allow for artchitecture optimized implementations + The following can be used to disable categories of APIs supported + by the OS. If the compiler supports weak functions, then it + should not be necessary to disable functions unless you want to + restrict usage of those APIs. + + There are certain dependency relationships in these features. + + o mq_notify logic depends on signals to awaken tasks + waiting for queues to become full or empty. + o pthread_condtimedwait() depends on signals to wake + up waiting tasks. + + CONFIG_DISABLE_SIGNALS, CONFIG_DISABLE_MQUEUE + + Allow for architecture optimized implementations The architecture can provide optimized versions of the following to improve sysem performance diff --git a/nuttx/arch/c5471/Make.defs b/nuttx/arch/c5471/Make.defs index 359f4585e..32f62cd34 100644 --- a/nuttx/arch/c5471/Make.defs +++ b/nuttx/arch/c5471/Make.defs @@ -42,7 +42,7 @@ else -fomit-frame-pointer endif -ARCHCPUFLAGS = -mapcs-32 -mcpu=arm7tdmi -msoft-float +ARCHCPUFLAGS = -mapcs-32 -mcpu=arm7tdmi -msoft-float -fno-builtin ARCHPICFLAGS = -fpic ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow ARCHDEFINES = @@ -62,6 +62,7 @@ CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \ OBJEXT = .o LIBEXT = .a +EXEEXT = ifeq ("${CONFIG_DEBUG}","y") LDFLAGS += -g diff --git a/nuttx/arch/c5471/defconfig b/nuttx/arch/c5471/defconfig index 449d1a2d2..731f1d85c 100644 --- a/nuttx/arch/c5471/defconfig +++ b/nuttx/arch/c5471/defconfig @@ -77,7 +77,7 @@ CONFIG_UART_MODEM_2STOP=0 # # General OS setup # -# CONFIG_EXAMPLE - identifies the subdirectgory in examples +# CONFIG_EXAMPLE - identifies the subdirectory in examples # that will be used in the build # CONFIG_DEBUG - enables built-in debug options # CONFIG_DEBUG_VERBOSE - enables verbose debug output @@ -111,7 +111,25 @@ CONFIG_JULIAN_TIME=n CONFIG_DEV_CONSOLE=y # -# Allow for artchitecture optimized implementations +# The following can be used to disable categories of +# APIs supported by the OS. If the compiler supports +# weak functions, then it should not be necessary to +# disable functions unless you want to restrict usage +# of those APIs. +# +# There are certain dependency relationships in these +# features. +# +# o mq_notify logic depends on signals to awaken tasks +# waiting for queues to become full or empty. +# o pthread_condtimedwait() depends on signals to wake +# up waiting tasks. +# +CONFIG_DISABLE_SIGNALS=n +CONFIG_DISABLE_MQUEUE=n + +# +# Allow for architecture optimized implementations # # The architecture can provide optimized versions of the # following to improve sysem performance diff --git a/nuttx/arch/c5471/src/Makefile b/nuttx/arch/c5471/src/Makefile index 3c1e50010..97f3ae9a2 100644 --- a/nuttx/arch/c5471/src/Makefile +++ b/nuttx/arch/c5471/src/Makefile @@ -59,7 +59,7 @@ OBJS = $(AOBJS) $(COBJS) LDFLAGS = $(ARCHSCRIPT) EXTRA_LIBS = -LINKOBJS = +LINKOBJS = up_head$(OBJEXT) LINKLIBS = LDPATHES = $(addprefix -L$(TOPDIR)/,$(dir $(LINKLIBS))) LDLIBS = $(patsubst lib%,-l%,$(basename $(notdir $(LINKLIBS)))) @@ -68,7 +68,7 @@ LIBGCC = ${shell $(CC) -print-libgcc-file-name} all: up_head.o libarch$(LIBEXT) -$(AOBJS) up_head.o: %.o: %.S +$(AOBJS) $(LINKOBJS): %.o: %.S $(CC) -c $(CFLAGS) -D__ASSEMBLY__ $< -o $@ $(COBJS): %.o: %.c @@ -80,10 +80,9 @@ libarch$(LIBEXT): $(OBJS) { echo "$(AR) $@ $obj FAILED!" ; exit 1 ; } ; \ done ; ) -nuttx: - $(LD) --entry=__start $(LDFLAGS) $(LDPATHES) -o $(TOPDIR)/$@ \ - $(addprefix $(TOPDIR)/,$(LINKOBJS)) \ - --start-group $(LDLIBS) $(EXTRA_LIBS) $(LIBGCC) --end-group +nuttx: $(LINKOBJS) + $(LD) --entry=__start $(LDFLAGS) $(LDPATHES) -o $(TOPDIR)/$@ $(LINKOBJS) \ + --start-group $(LDLIBS) --end-group $(EXTRA_LIBS) $(LIBGCC) @$(NM) $(TOPDIR)/$@ | \ grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \ sort > $(TOPDIR)/System.map diff --git a/nuttx/arch/sim/Make.defs b/nuttx/arch/sim/Make.defs index 3e4d0cf75..5fa97507d 100644 --- a/nuttx/arch/sim/Make.defs +++ b/nuttx/arch/sim/Make.defs @@ -41,7 +41,7 @@ else ARCHOPTIMIZATION = -O2 endif -ARCHCPUFLAGS = +ARCHCPUFLAGS = -fno-builtin ARCHPICFLAGS = -fpic ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow ARCHDEFINES = @@ -61,6 +61,7 @@ CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \ OBJEXT = .o LIBEXT = .a +EXEEXT = ifeq ("${CONFIG_DEBUG}","y") LDFLAGS += -g diff --git a/nuttx/arch/sim/defconfig b/nuttx/arch/sim/defconfig index 00a8e6e59..b20319e7a 100644 --- a/nuttx/arch/sim/defconfig +++ b/nuttx/arch/sim/defconfig @@ -44,7 +44,7 @@ CONFIG_ARCH_SIM=y # # General OS setup # -# CONFIG_EXAMPLE - identifies the subdirectgory in examples +# CONFIG_EXAMPLE - identifies the subdirectory in examples # that will be used in the build # CONFIG_DEBUG - enables built-in debug options # CONFIG_DEBUG_VERBOSE - enables verbose debug output @@ -73,12 +73,30 @@ CONFIG_SCHED_INSTRUMENTATION=n CONFIG_TASK_NAME_SIZE=32 CONFIG_START_YEAR=2007 CONFIG_START_MONTH=2 -CONFIG_START_DAY=13 +CONFIG_START_DAY=27 CONFIG_JULIAN_TIME=n CONFIG_DEV_CONSOLE=y # -# Allow for artchitecture optimized implementations +# The following can be used to disable categories of +# APIs supported by the OS. If the compiler supports +# weak functions, then it should not be necessary to +# disable functions unless you want to restrict usage +# of those APIs. +# +# There are certain dependency relationships in these +# features. +# +# o mq_notify logic depends on signals to awaken tasks +# waiting for queues to become full or empty. +# o pthread_condtimedwait() depends on signals to wake +# up waiting tasks. +# +CONFIG_DISABLE_SIGNALS=n +CONFIG_DISABLE_MQUEUE=n + +# +# Allow for architecture optimized implementations # # The architecture can provide optimized versions of the # following to improve sysem performance diff --git a/nuttx/arch/sim/src/Makefile b/nuttx/arch/sim/src/Makefile index a3be44f35..5c7ed0d1f 100644 --- a/nuttx/arch/sim/src/Makefile +++ b/nuttx/arch/sim/src/Makefile @@ -51,10 +51,10 @@ COBJS = $(CSRCS:.c=$(OBJEXT)) SRCS = $(ASRCS) $(CSRCS) OBJS = $(AOBJS) $(COBJS) -LDFLAGS = $(ARCHSCRIPT) -EXTRA_LIBS = -lc +LDFLAGS = $(ARCHSCRIPT) +EXTRA_LIBS = -lc -LINKOBJS = +LINKOBJS = up_head$(OBJEXT) LINKLIBS = LDPATHES = $(addprefix -L$(TOPDIR)/,$(dir $(LINKLIBS))) LDLIBS = $(patsubst lib%,-l%,$(basename $(notdir $(LINKLIBS)))) @@ -64,7 +64,7 @@ all: up_head$(OBJEXT) libarch$(LIBEXT) $(AOBJS): %$(OBJEXT): %.S $(CC) -c $(CFLAGS) -D__ASSEMBLY__ $< -o $@ -$(COBJS) up_head$(OBJEXT): %$(OBJEXT): %.c +$(COBJS) $(LINKOBJS): %$(OBJEXT): %.c $(CC) -c $(CFLAGS) $< -o $@ libarch$(LIBEXT): $(OBJS) @@ -73,10 +73,9 @@ libarch$(LIBEXT): $(OBJS) { echo "$(AR) $@ $obj FAILED!" ; exit 1 ; } ; \ done ; ) -nuttx: - $(CC) $(LDFLAGS) $(LDPATHES) -o $(TOPDIR)/$@ \ - $(addprefix $(TOPDIR)/,$(LINKOBJS)) \ - -Wl,--start-group $(LDLIBS) $(EXTRA_LIBS) -Wl,--end-group +nuttx: $(LINKOBJS) + $(CC) $(LDFLAGS) $(LDPATHES) -o $(TOPDIR)/$@ $(LINKOBJS) \ + -Wl,--start-group $(LDLIBS) -Wl,--end-group $(EXTRA_LIBS) @$(NM) $(TOPDIR)/$@ | \ grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \ sort > $(TOPDIR)/System.map -- cgit v1.2.3