From 4d8e6c8b20842aaecc671883846fff8a81535f07 Mon Sep 17 00:00:00 2001 From: patacongo Date: Thu, 1 Mar 2007 21:46:29 +0000 Subject: Add logic to suppress clock_ APIs git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@27 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/Documentation/NuttX.html | 3 ++- nuttx/Documentation/codesize-070301.xls | Bin 0 -> 104448 bytes nuttx/sched/Makefile | 8 ++++++-- nuttx/sched/os_start.c | 2 ++ 4 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 nuttx/Documentation/codesize-070301.xls 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.

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 spreadsheet for details).

Licensing

diff --git a/nuttx/Documentation/codesize-070301.xls b/nuttx/Documentation/codesize-070301.xls new file mode 100644 index 000000000..22fed5abf Binary files /dev/null and b/nuttx/Documentation/codesize-070301.xls 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) */ -- cgit v1.2.3