summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-03-01 21:46:29 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-03-01 21:46:29 +0000
commit4d8e6c8b20842aaecc671883846fff8a81535f07 (patch)
treea5fb39b29f615f04a57f2b4b0d7b898e1957dd22
parent08680a039b6ffc922731d9a1cfdff20ef204dbba (diff)
downloadpx4-nuttx-4d8e6c8b20842aaecc671883846fff8a81535f07.tar.gz
px4-nuttx-4d8e6c8b20842aaecc671883846fff8a81535f07.tar.bz2
px4-nuttx-4d8e6c8b20842aaecc671883846fff8a81535f07.zip
Add logic to suppress clock_ APIs
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@27 42af7a65-404d-4744-a932-0658087f49c3
-rw-r--r--nuttx/Documentation/NuttX.html3
-rw-r--r--nuttx/Documentation/codesize-070301.xlsbin0 -> 104448 bytes
-rw-r--r--nuttx/sched/Makefile8
-rw-r--r--nuttx/sched/os_start.c2
4 files changed, 10 insertions, 3 deletions
diff --git a/nuttx/Documentation/NuttX.html b/nuttx/Documentation/NuttX.html
index 1bf69dd70..cb2fcdda8 100644
--- a/nuttx/Documentation/NuttX.html
+++ b/nuttx/Documentation/NuttX.html
@@ -55,7 +55,8 @@ is available that be used to build a NuttX-compatible arm-elf toolchain.</blockq
</p>
<p>
I have a stripped down OS test for the 8051 target that requires only
- 24Kb.
+ 18Kb. A substantial effort was required to get to this size
+ (see <a href="codesize-070301.xls">spreadsheet</a> for details).
</p>
<h1>Licensing</h1>
diff --git a/nuttx/Documentation/codesize-070301.xls b/nuttx/Documentation/codesize-070301.xls
new file mode 100644
index 000000000..22fed5abf
--- /dev/null
+++ b/nuttx/Documentation/codesize-070301.xls
Binary files differ
diff --git a/nuttx/sched/Makefile b/nuttx/sched/Makefile
index 43868d4fb..af11ede39 100644
--- a/nuttx/sched/Makefile
+++ b/nuttx/sched/Makefile
@@ -55,8 +55,9 @@ SCHED_SRCS = sched_setparam.c sched_getparam.c \
sched_getprioritymax.c sched_getprioritymin.c \
sched_lock.c sched_unlock.c sched_lockcount.c
WDOG_SRCS = wd_initialize.c wd_create.c wd_start.c wd_cancel.c wd_delete.c
-TIME_SRCS = sched_processtimer.c clock_initialize.c mktime.c gmtime_r.c \
- clock_settime.c clock_gettime.c clock_getres.c sleep.c usleep.c
+TIME_SRCS = sched_processtimer.c sleep.c usleep.c
+CLOCK_SRCS = clock_initialize.c mktime.c gmtime_r.c clock_settime.c \
+ clock_gettime.c clock_getres.c
SIGNAL_SRCS = sig_initialize.c \
sig_action.c sig_procmask.c sig_pending.c sig_suspend.c \
sig_queue.c sig_waitinfo.c sig_timedwait.c \
@@ -101,6 +102,9 @@ IRQ_SRCS = irq_initialize.c irq_attach.c irq_dispatch.c irq_unexpectedisr.c
CSRCS = $(MISC_SRCS) $(TSK_SRCS) $(SCHED_SRCS) $(WDOG_SRCS) $(TIME_SRCS) \
$(SEM_SRCS) $(IRQ_SRCS)
+ifneq ($(CONFIG_DISABLE_CLOCK),y)
+CSRCS += $(CLOCK_SRCS)
+endif
ifneq ($(CONFIG_DISABLE_PTHREAD),y)
CSRCS += $(PTHREAD_SRCS)
endif
diff --git a/nuttx/sched/os_start.c b/nuttx/sched/os_start.c
index 5cf7c940f..1238342c4 100644
--- a/nuttx/sched/os_start.c
+++ b/nuttx/sched/os_start.c
@@ -306,12 +306,14 @@ void os_start(void)
/* Initialize the POSIX timer facility (if included in the link) */
+#ifndef CONFIG_DISABLE_CLOCK
#ifdef CONFIG_HAVE_WEAKFUNCTIONS
if (clock_initialize != NULL)
#endif
{
clock_initialize();
}
+#endif
/* Initialize the watchdog facility (if included in the link) */