From 2521ab13f7408bb59a480d3aaa49b41fd7b53eb3 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Mon, 18 May 2009 17:50:57 +0000 Subject: 2009-05-18 Joel Sherrill * Makefile, init.c: Allow overrides from invoking environment. Also move RTEMS Configuration to bottom of init.c. --- dnstest/ChangeLog | 5 +++ dnstest/Makefile | 2 +- dnstest/init.c | 36 ++++++++++---------- mcast/ChangeLog | 5 +++ mcast/Makefile | 2 +- mcast/init.c | 49 ++++++++++++++------------- netdemo/ChangeLog | 5 +++ netdemo/Makefile | 2 +- netdemo/init.c | 43 +++++++++++------------ nfsClientTest/ChangeLog | 5 +++ nfsClientTest/Makefile | 2 +- nfsClientTest/init.c | 75 ++++++++++++++++++++--------------------- ntp/ChangeLog | 5 +++ ntp/Makefile | 2 +- ntp/init.c | 49 ++++++++++++++------------- rpc_demo/ChangeLog | 5 +++ rpc_demo/Makefile | 1 + rpc_demo/init.c | 43 +++++++++++------------ select/ChangeLog | 5 +++ select/Makefile | 2 +- select/init.c | 35 +++++++++---------- telnetd/ChangeLog | 5 +++ telnetd/Makefile | 6 ++-- telnetd/init.c | 90 ++++++++++++++++++++++++------------------------- tftpTest/ChangeLog | 5 +++ tftpTest/Makefile | 2 +- tftpTest/init.c | 49 ++++++++++++++------------- ttcp/ChangeLog | 5 +++ ttcp/Makefile | 2 +- ttcp/init.c | 35 +++++++++---------- 30 files changed, 316 insertions(+), 261 deletions(-) diff --git a/dnstest/ChangeLog b/dnstest/ChangeLog index 1546b3e..2f4a88e 100644 --- a/dnstest/ChangeLog +++ b/dnstest/ChangeLog @@ -1,3 +1,8 @@ +2009-05-18 Joel Sherrill + + * Makefile, init.c: Allow overrides from invoking environment. Also + move RTEMS Configuration to bottom of init.c. + 2007-09-25 Joel Sherrill * .cvsignore: New file. diff --git a/dnstest/Makefile b/dnstest/Makefile index dd65cf0..6e6d8c8 100644 --- a/dnstest/Makefile +++ b/dnstest/Makefile @@ -32,7 +32,7 @@ include $(PROJECT_ROOT)/make/leaf.cfg # (OPTIONAL) Add local stuff here using += # -DEFINES += +override DEFINES += CPPFLAGS += CFLAGS += CFLAGS_LD += -Wl,--defsym -Wl,HeapSize=0xC0000 diff --git a/dnstest/init.c b/dnstest/init.c index 5f595ec..d60ca46 100644 --- a/dnstest/init.c +++ b/dnstest/init.c @@ -17,6 +17,24 @@ #include +#include +#include +#include +#include "../networkconfig.h" + +/* + * RTEMS Startup Task + */ +rtems_task +Init (rtems_task_argument ignored) +{ + void testDNS(void); + + rtems_bsdnet_initialize_network (); + testDNS (); + exit (0); +} + #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER #define CONFIGURE_RTEMS_INIT_TASKS_TABLE @@ -41,21 +59,3 @@ rtems_task Init (rtems_task_argument argument); #include -#include -#include -#include -#include "../networkconfig.h" - -/* - * RTEMS Startup Task - */ -rtems_task -Init (rtems_task_argument ignored) -{ - void testDNS(void); - - rtems_bsdnet_initialize_network (); - testDNS (); - exit (0); -} - diff --git a/mcast/ChangeLog b/mcast/ChangeLog index 6517000..e4c4667 100644 --- a/mcast/ChangeLog +++ b/mcast/ChangeLog @@ -1,3 +1,8 @@ +2009-05-18 Joel Sherrill + + * Makefile, init.c: Allow overrides from invoking environment. Also + move RTEMS Configuration to bottom of init.c. + 2008-02-05 Joel Sherrill * README: Fix typo. diff --git a/mcast/Makefile b/mcast/Makefile index 9776f44..5ecf8ec 100644 --- a/mcast/Makefile +++ b/mcast/Makefile @@ -22,7 +22,7 @@ include $(PROJECT_ROOT)/make/leaf.cfg # (OPTIONAL) Add local stuff here using += # -DEFINES += +override DEFINES += CPPFLAGS += CFLAGS += CFLAGS_LD += diff --git a/mcast/init.c b/mcast/init.c index af00d90..ad9c196 100644 --- a/mcast/init.c +++ b/mcast/init.c @@ -17,30 +17,6 @@ #include -#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER -#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER -#define CONFIGURE_RTEMS_INIT_TASKS_TABLE -#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 20 -#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM - -#define CONFIGURE_EXECUTIVE_RAM_SIZE (512*1024) -#define CONFIGURE_MAXIMUM_SEMAPHORES 20 -#define CONFIGURE_MAXIMUM_TASKS 20 - -#define CONFIGURE_MICROSECONDS_PER_TICK 10000 - -#define CONFIGURE_INIT_TASK_STACK_SIZE (10*1024) -#define CONFIGURE_INIT_TASK_PRIORITY 120 -#define CONFIGURE_INIT_TASK_INITIAL_MODES (RTEMS_PREEMPT | \ - RTEMS_NO_TIMESLICE | \ - RTEMS_NO_ASR | \ - RTEMS_INTERRUPT_LEVEL(0)) - -#define CONFIGURE_INIT -rtems_task Init (rtems_task_argument argument); - -#include - #include #include #include @@ -86,3 +62,28 @@ Init (rtems_task_argument ignored) mcast_main ( 0, 0 ); exit (0); } + +#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER +#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER +#define CONFIGURE_RTEMS_INIT_TASKS_TABLE +#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 20 +#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM + +#define CONFIGURE_EXECUTIVE_RAM_SIZE (512*1024) +#define CONFIGURE_MAXIMUM_SEMAPHORES 20 +#define CONFIGURE_MAXIMUM_TASKS 20 + +#define CONFIGURE_MICROSECONDS_PER_TICK 10000 + +#define CONFIGURE_INIT_TASK_STACK_SIZE (10*1024) +#define CONFIGURE_INIT_TASK_PRIORITY 120 +#define CONFIGURE_INIT_TASK_INITIAL_MODES (RTEMS_PREEMPT | \ + RTEMS_NO_TIMESLICE | \ + RTEMS_NO_ASR | \ + RTEMS_INTERRUPT_LEVEL(0)) + +#define CONFIGURE_INIT +rtems_task Init (rtems_task_argument argument); + +#include + diff --git a/netdemo/ChangeLog b/netdemo/ChangeLog index 4a61913..0d29aa9 100644 --- a/netdemo/ChangeLog +++ b/netdemo/ChangeLog @@ -1,3 +1,8 @@ +2009-05-18 Joel Sherrill + + * Makefile, init.c: Allow overrides from invoking environment. Also + move RTEMS Configuration to bottom of init.c. + 2007-09-25 Joel Sherrill * .cvsignore: New file. diff --git a/netdemo/Makefile b/netdemo/Makefile index 2df5ac7..811616a 100644 --- a/netdemo/Makefile +++ b/netdemo/Makefile @@ -32,7 +32,7 @@ include $(PROJECT_ROOT)/make/leaf.cfg # (OPTIONAL) Add local stuff here using += # -DEFINES += +override DEFINES += CPPFLAGS += CFLAGS += CFLAGS_LD += diff --git a/netdemo/init.c b/netdemo/init.c index f901e79..2b1c318 100644 --- a/netdemo/init.c +++ b/netdemo/init.c @@ -17,6 +17,28 @@ #include +#include +#include +#include +#include "../networkconfig.h" + +/* + * RTEMS Startup Task + */ +rtems_task +Init (rtems_task_argument ignored) +{ + int doSocket(void); + + printk( "Initialize network\n" ); + rtems_bsdnet_initialize_network (); + printk( "Network initialized\n" ); + rtems_bsdnet_show_inet_routes (); + printk( "Initiating test\n" ); + doSocket (); + exit (0); +} + #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER #define CONFIGURE_RTEMS_INIT_TASKS_TABLE @@ -41,24 +63,3 @@ rtems_task Init (rtems_task_argument argument); #include -#include -#include -#include -#include "../networkconfig.h" - -/* - * RTEMS Startup Task - */ -rtems_task -Init (rtems_task_argument ignored) -{ - int doSocket(void); - - printk( "Initialize network\n" ); - rtems_bsdnet_initialize_network (); - printk( "Network initialized\n" ); - rtems_bsdnet_show_inet_routes (); - printk( "Initiating test\n" ); - doSocket (); - exit (0); -} diff --git a/nfsClientTest/ChangeLog b/nfsClientTest/ChangeLog index 99fd1d9..21a3c7f 100644 --- a/nfsClientTest/ChangeLog +++ b/nfsClientTest/ChangeLog @@ -1,3 +1,8 @@ +2009-05-18 Joel Sherrill + + * Makefile, init.c: Allow overrides from invoking environment. Also + move RTEMS Configuration to bottom of init.c. + 2007-11-09 Joel Sherrill * Makefile: bin2c now rtems-bin2c. diff --git a/nfsClientTest/Makefile b/nfsClientTest/Makefile index 7c46690..bd3084c 100644 --- a/nfsClientTest/Makefile +++ b/nfsClientTest/Makefile @@ -32,7 +32,7 @@ include $(PROJECT_ROOT)/make/leaf.cfg # (OPTIONAL) Add local stuff here using += # -DEFINES += +override DEFINES += CPPFLAGS += CFLAGS_LD += # -Wl,--defsym -Wl,HeapSize=0xC0000 CFLAGS_OPTIMIZE_V += diff --git a/nfsClientTest/init.c b/nfsClientTest/init.c index 75ab285..5483400 100644 --- a/nfsClientTest/init.c +++ b/nfsClientTest/init.c @@ -5,49 +5,11 @@ * Don't forget to change the IP addresses */ -#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER -#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER -#define CONFIGURE_RTEMS_INIT_TASKS_TABLE -#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 20 -#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM - -#define CONFIGURE_MEMORY_OVERHEAD 256 -#define CONFIGURE_MESSAGE_BUFFER_MEMORY 32 * 1024 -#define CONFIGURE_MAXIMUM_SEMAPHORES 40 -#define CONFIGURE_MAXIMUM_TASKS 20 -#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 20 - -#define CONFIGURE_MICROSECONDS_PER_TICK 1000 - -#define CONFIGURE_INIT_TASK_STACK_SIZE (64*1024) -#define CONFIGURE_INIT_TASK_PRIORITY 120 -#define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_FLOATING_POINT -#define CONFIGURE_INIT_TASK_INITIAL_MODES (RTEMS_PREEMPT | \ - RTEMS_NO_TIMESLICE | \ - RTEMS_NO_ASR | \ - RTEMS_INTERRUPT_LEVEL(0)) - -#define CONFIGURE_MAXIMUM_DRIVERS 10 -#define CONFIGURE_INIT - -#include -#include - -/* functions */ - -rtems_task Init( - rtems_task_argument argument -); - -/* configuration information */ - -#include #include #include #include -#include #include #include #include @@ -138,3 +100,40 @@ rtems_task Init( status = rtems_task_delete( RTEMS_SELF ); } +#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER +#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER +#define CONFIGURE_RTEMS_INIT_TASKS_TABLE +#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 20 +#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM + +#define CONFIGURE_MEMORY_OVERHEAD 256 +#define CONFIGURE_MESSAGE_BUFFER_MEMORY 32 * 1024 +#define CONFIGURE_MAXIMUM_SEMAPHORES 40 +#define CONFIGURE_MAXIMUM_TASKS 20 +#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 20 + +#define CONFIGURE_MICROSECONDS_PER_TICK 1000 + +#define CONFIGURE_INIT_TASK_STACK_SIZE (64*1024) +#define CONFIGURE_INIT_TASK_PRIORITY 120 +#define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_FLOATING_POINT +#define CONFIGURE_INIT_TASK_INITIAL_MODES (RTEMS_PREEMPT | \ + RTEMS_NO_TIMESLICE | \ + RTEMS_NO_ASR | \ + RTEMS_INTERRUPT_LEVEL(0)) + +#define CONFIGURE_MAXIMUM_DRIVERS 10 +#define CONFIGURE_INIT + +#include +#include + +/* functions */ + +rtems_task Init( + rtems_task_argument argument +); + +/* configuration information */ + +#include diff --git a/ntp/ChangeLog b/ntp/ChangeLog index 92c7082..a7ec8ec 100644 --- a/ntp/ChangeLog +++ b/ntp/ChangeLog @@ -1,3 +1,8 @@ +2009-05-18 Joel Sherrill + + * Makefile, init.c: Allow overrides from invoking environment. Also + move RTEMS Configuration to bottom of init.c. + 2007-09-25 Joel Sherrill * .cvsignore: New file. diff --git a/ntp/Makefile b/ntp/Makefile index 573dbbe..5e29a73 100644 --- a/ntp/Makefile +++ b/ntp/Makefile @@ -32,7 +32,7 @@ include $(PROJECT_ROOT)/make/leaf.cfg # (OPTIONAL) Add local stuff here using += # -DEFINES += +override DEFINES += CPPFLAGS += CFLAGS += CFLAGS_LD += -Wl,--defsym -Wl,HeapSize=0xC0000 diff --git a/ntp/init.c b/ntp/init.c index ac48775..a85d6cc 100644 --- a/ntp/init.c +++ b/ntp/init.c @@ -17,30 +17,6 @@ #include -#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER -#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER -#define CONFIGURE_RTEMS_INIT_TASKS_TABLE -#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 20 -#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM - -#define CONFIGURE_EXECUTIVE_RAM_SIZE (512*1024) -#define CONFIGURE_MAXIMUM_SEMAPHORES 20 -#define CONFIGURE_MAXIMUM_TASKS 20 - -#define CONFIGURE_MICROSECONDS_PER_TICK 10000 - -#define CONFIGURE_INIT_TASK_STACK_SIZE (10*1024) -#define CONFIGURE_INIT_TASK_PRIORITY 120 -#define CONFIGURE_INIT_TASK_INITIAL_MODES (RTEMS_PREEMPT | \ - RTEMS_NO_TIMESLICE | \ - RTEMS_NO_ASR | \ - RTEMS_INTERRUPT_LEVEL(0)) - -#define CONFIGURE_INIT -rtems_task Init (rtems_task_argument argument); - -#include - #include #include #include @@ -82,3 +58,28 @@ Init (rtems_task_argument ignored) (long) now.ticks); exit (0); } + +#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER +#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER +#define CONFIGURE_RTEMS_INIT_TASKS_TABLE +#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 20 +#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM + +#define CONFIGURE_EXECUTIVE_RAM_SIZE (512*1024) +#define CONFIGURE_MAXIMUM_SEMAPHORES 20 +#define CONFIGURE_MAXIMUM_TASKS 20 + +#define CONFIGURE_MICROSECONDS_PER_TICK 10000 + +#define CONFIGURE_INIT_TASK_STACK_SIZE (10*1024) +#define CONFIGURE_INIT_TASK_PRIORITY 120 +#define CONFIGURE_INIT_TASK_INITIAL_MODES (RTEMS_PREEMPT | \ + RTEMS_NO_TIMESLICE | \ + RTEMS_NO_ASR | \ + RTEMS_INTERRUPT_LEVEL(0)) + +#define CONFIGURE_INIT +rtems_task Init (rtems_task_argument argument); + +#include + diff --git a/rpc_demo/ChangeLog b/rpc_demo/ChangeLog index db8b351..50e15b9 100644 --- a/rpc_demo/ChangeLog +++ b/rpc_demo/ChangeLog @@ -1,3 +1,8 @@ +2009-05-18 Joel Sherrill + + * Makefile, init.c: Allow overrides from invoking environment. Also + move RTEMS Configuration to bottom of init.c. + 2007-06-21 Joel Sherrill * init.c: Now compiles reasonably cleanly with CVS head. diff --git a/rpc_demo/Makefile b/rpc_demo/Makefile index f923bb6..2c6c462 100644 --- a/rpc_demo/Makefile +++ b/rpc_demo/Makefile @@ -41,6 +41,7 @@ include $(PROJECT_ROOT)/make/leaf.cfg # (OPTIONAL) Add local stuff here using += # +override DEFINES += ifdef SERVER DEFINES += "-DSERVER=$(SERVER)" endif diff --git a/rpc_demo/init.c b/rpc_demo/init.c index 568c806..c9f5033 100644 --- a/rpc_demo/init.c +++ b/rpc_demo/init.c @@ -8,27 +8,6 @@ #include #include -#define CONFIGURE_RTEMS_INIT_TASKS_TABLE -#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 20 -#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM - -#define STACK_CHECKER_ON 1 -#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER -#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER -#define CONFIGURE_MAXIMUM_USER_EXTENSIONS 2 -#define CONFIGURE_MAXIMUM_SEMAPHORES 20 -#define CONFIGURE_MAXIMUM_TASKS 12 - -#define CONFIGURE_MICROSECONDS_PER_TICK 20000 - -#define CONFIGURE_INIT_TASK_PRIORITY 99 -#define CONFIGURE_INIT_TASK_STACK_SIZE (16*1024) -#define CONFIGURE_INIT - -rtems_task Init(rtems_task_argument argument); - -#include - /* * Network configuration */ @@ -69,3 +48,25 @@ Init (rtems_task_argument ignored) */ void pmap_set () { ; } void pmap_unset () { ; } + +#define CONFIGURE_RTEMS_INIT_TASKS_TABLE +#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 20 +#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM + +#define STACK_CHECKER_ON 1 +#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER +#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER +#define CONFIGURE_MAXIMUM_USER_EXTENSIONS 2 +#define CONFIGURE_MAXIMUM_SEMAPHORES 20 +#define CONFIGURE_MAXIMUM_TASKS 12 + +#define CONFIGURE_MICROSECONDS_PER_TICK 20000 + +#define CONFIGURE_INIT_TASK_PRIORITY 99 +#define CONFIGURE_INIT_TASK_STACK_SIZE (16*1024) +#define CONFIGURE_INIT + +rtems_task Init(rtems_task_argument argument); + +#include + diff --git a/select/ChangeLog b/select/ChangeLog index ea4e591..38b96fe 100644 --- a/select/ChangeLog +++ b/select/ChangeLog @@ -1,3 +1,8 @@ +2009-05-18 Joel Sherrill + + * Makefile, init.c: Allow overrides from invoking environment. Also + move RTEMS Configuration to bottom of init.c. + 2007-09-25 Joel Sherrill * .cvsignore: New file. diff --git a/select/Makefile b/select/Makefile index ef706cb..f55181b 100644 --- a/select/Makefile +++ b/select/Makefile @@ -32,7 +32,7 @@ include $(PROJECT_ROOT)/make/leaf.cfg # (OPTIONAL) Add local stuff here using += # -DEFINES += +override DEFINES += CPPFLAGS += CFLAGS += CFLAGS_LD += -Wl,--defsym -Wl,HeapSize=0xC0000 diff --git a/select/init.c b/select/init.c index 4156595..6f3f2b5 100644 --- a/select/init.c +++ b/select/init.c @@ -17,6 +17,24 @@ #include +#include +#include +#include +#include "../networkconfig.h" + +/* + * RTEMS Startup Task + */ +rtems_task +Init (rtems_task_argument ignored) +{ + int doSocket(void); + + rtems_bsdnet_initialize_network (); + doSocket (); + exit (0); +} + #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER #define CONFIGURE_RTEMS_INIT_TASKS_TABLE @@ -41,20 +59,3 @@ rtems_task Init (rtems_task_argument argument); #include -#include -#include -#include -#include "../networkconfig.h" - -/* - * RTEMS Startup Task - */ -rtems_task -Init (rtems_task_argument ignored) -{ - int doSocket(void); - - rtems_bsdnet_initialize_network (); - doSocket (); - exit (0); -} diff --git a/telnetd/ChangeLog b/telnetd/ChangeLog index f2adce8..6743614 100644 --- a/telnetd/ChangeLog +++ b/telnetd/ChangeLog @@ -1,3 +1,8 @@ +2009-05-18 Joel Sherrill + + * Makefile, init.c: Allow overrides from invoking environment. Also + move RTEMS Configuration to bottom of init.c. + 2008-10-15 Joel Sherrill PR 1331/networking diff --git a/telnetd/Makefile b/telnetd/Makefile index 8be56e6..c12c215 100644 --- a/telnetd/Makefile +++ b/telnetd/Makefile @@ -29,14 +29,14 @@ include $(PROJECT_ROOT)/make/leaf.cfg # (OPTIONAL) Add local stuff here using += # -DEFINES += +override DEFINES += CPPFLAGS += CFLAGS_LD += CFLAGS_OPTIMIZE_V += CFLAGS_DEBUG_V += -v -qrtems_debug -LD_PATHS += -LD_LIBS += -ltelnetd +LD_PATHS += +override LD_LIBS += -ltelnetd CFLAGS += diff --git a/telnetd/init.c b/telnetd/init.c index 61a7997..2915eac 100644 --- a/telnetd/init.c +++ b/telnetd/init.c @@ -7,48 +7,6 @@ #define USE_RTEMS_SHELL -/* - * Configuration parameters - */ - -#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER -#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER -#ifdef RTEMS_BSP_HAS_IDE_DRIVER -#define CONFIGURE_APPLICATION_NEEDS_IDE_DRIVER -#endif -#define CONFIGURE_APPLICATION_NEEDS_LIBBLOCK - -#define CONFIGURE_RTEMS_INIT_TASKS_TABLE - -#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 20 -#define CONFIGURE_MAXIMUM_PTYS 8 - -#if defined(USE_RTEMS_SHELL) - #define CONFIGURE_APPLICATION_NEEDS_LIBBLOCK -#endif -#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM - -#define STACK_CHECKER_ON - -#define CONFIGURE_MEMORY_OVERHEAD 256 -#define CONFIGURE_MESSAGE_BUFFER_MEMORY (32 * 1024) -#define CONFIGURE_MAXIMUM_SEMAPHORES 40 -#define CONFIGURE_MAXIMUM_TASKS 20 -#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 20 - -#define CONFIGURE_MICROSECONDS_PER_TICK 1000 - -#define CONFIGURE_INIT_TASK_STACK_SIZE (64*1024) -#define CONFIGURE_INIT_TASK_PRIORITY 120 -#define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_FLOATING_POINT -#define CONFIGURE_INIT_TASK_INITIAL_MODES (RTEMS_PREEMPT | \ - RTEMS_NO_TIMESLICE | \ - RTEMS_NO_ASR | \ - RTEMS_INTERRUPT_LEVEL(0)) - -#define CONFIGURE_MAXIMUM_DRIVERS 10 -#define CONFIGURE_INIT - #include #include #include @@ -59,15 +17,11 @@ rtems_task Init( rtems_task_argument argument ); -/* configuration information */ - -#include #include #include #include -#include #include #include #include @@ -228,3 +182,47 @@ rtems_task Init( rtems_task_delete(RTEMS_SELF); } +/* + * Configuration parameters + */ + +#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER +#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER +#ifdef RTEMS_BSP_HAS_IDE_DRIVER + #define CONFIGURE_APPLICATION_NEEDS_IDE_DRIVER +#endif +#define CONFIGURE_APPLICATION_NEEDS_LIBBLOCK + +#define CONFIGURE_RTEMS_INIT_TASKS_TABLE + +#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 20 +#define CONFIGURE_MAXIMUM_PTYS 8 + +#if defined(USE_RTEMS_SHELL) + #define CONFIGURE_APPLICATION_NEEDS_LIBBLOCK +#endif +#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM + +#define STACK_CHECKER_ON + +#define CONFIGURE_MEMORY_OVERHEAD 256 +#define CONFIGURE_MESSAGE_BUFFER_MEMORY (32 * 1024) +#define CONFIGURE_MAXIMUM_SEMAPHORES 40 +#define CONFIGURE_MAXIMUM_TASKS 20 +#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 20 + +#define CONFIGURE_MICROSECONDS_PER_TICK 1000 + +#define CONFIGURE_INIT_TASK_STACK_SIZE (64*1024) +#define CONFIGURE_INIT_TASK_PRIORITY 120 +#define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_FLOATING_POINT +#define CONFIGURE_INIT_TASK_INITIAL_MODES (RTEMS_PREEMPT | \ + RTEMS_NO_TIMESLICE | \ + RTEMS_NO_ASR | \ + RTEMS_INTERRUPT_LEVEL(0)) + +#define CONFIGURE_MAXIMUM_DRIVERS 10 + +#define CONFIGURE_INIT +#include + diff --git a/tftpTest/ChangeLog b/tftpTest/ChangeLog index 55b45fc..304a016 100644 --- a/tftpTest/ChangeLog +++ b/tftpTest/ChangeLog @@ -1,3 +1,8 @@ +2009-05-18 Joel Sherrill + + * Makefile, init.c: Allow overrides from invoking environment. Also + move RTEMS Configuration to bottom of init.c. + 2007-09-25 Joel Sherrill * .cvsignore: New file. diff --git a/tftpTest/Makefile b/tftpTest/Makefile index 2047d02..c854dae 100644 --- a/tftpTest/Makefile +++ b/tftpTest/Makefile @@ -32,7 +32,7 @@ include $(PROJECT_ROOT)/make/leaf.cfg # (OPTIONAL) Add local stuff here using += # -DEFINES += +override DEFINES += CPPFLAGS += CFLAGS += CFLAGS_LD += -Wl,--defsym -Wl,HeapSize=0x40000 diff --git a/tftpTest/init.c b/tftpTest/init.c index 94f5cb5..88fec11 100644 --- a/tftpTest/init.c +++ b/tftpTest/init.c @@ -18,30 +18,6 @@ #include #include -#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER -#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER -#define CONFIGURE_RTEMS_INIT_TASKS_TABLE -#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 20 -#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM - -#define CONFIGURE_EXECUTIVE_RAM_SIZE (512*1024) -#define CONFIGURE_MAXIMUM_SEMAPHORES 20 -#define CONFIGURE_MAXIMUM_TASKS 20 - -#define CONFIGURE_MICROSECONDS_PER_TICK 10000 - -#define CONFIGURE_INIT_TASK_STACK_SIZE (10*1024) -#define CONFIGURE_INIT_TASK_PRIORITY 100 -#define CONFIGURE_INIT_TASK_INITIAL_MODES (RTEMS_PREEMPT | \ - RTEMS_NO_TIMESLICE | \ - RTEMS_NO_ASR | \ - RTEMS_INTERRUPT_LEVEL(0)) - -#define CONFIGURE_INIT -rtems_task Init (rtems_task_argument argument); - -#include - #include #include #include @@ -68,3 +44,28 @@ Init (rtems_task_argument ignored) testTFTP (hostname, filename); exit (0); } + +#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER +#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER +#define CONFIGURE_RTEMS_INIT_TASKS_TABLE +#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 20 +#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM + +#define CONFIGURE_EXECUTIVE_RAM_SIZE (512*1024) +#define CONFIGURE_MAXIMUM_SEMAPHORES 20 +#define CONFIGURE_MAXIMUM_TASKS 20 + +#define CONFIGURE_MICROSECONDS_PER_TICK 10000 + +#define CONFIGURE_INIT_TASK_STACK_SIZE (10*1024) +#define CONFIGURE_INIT_TASK_PRIORITY 100 +#define CONFIGURE_INIT_TASK_INITIAL_MODES (RTEMS_PREEMPT | \ + RTEMS_NO_TIMESLICE | \ + RTEMS_NO_ASR | \ + RTEMS_INTERRUPT_LEVEL(0)) + +#define CONFIGURE_INIT +rtems_task Init (rtems_task_argument argument); + +#include + diff --git a/ttcp/ChangeLog b/ttcp/ChangeLog index 3e3729f..0f8b865 100644 --- a/ttcp/ChangeLog +++ b/ttcp/ChangeLog @@ -1,3 +1,8 @@ +2009-05-18 Joel Sherrill + + * Makefile, init.c: Allow overrides from invoking environment. Also + move RTEMS Configuration to bottom of init.c. + 2008-08-21 Joel Sherrill * ttcp_orig/ttcp.c: Fix warning. diff --git a/ttcp/Makefile b/ttcp/Makefile index f035f7c..b70e678 100644 --- a/ttcp/Makefile +++ b/ttcp/Makefile @@ -32,7 +32,7 @@ include $(PROJECT_ROOT)/make/leaf.cfg # (OPTIONAL) Add local stuff here using += # -DEFINES += +override DEFINES += CPPFLAGS += CFLAGS += CFLAGS_LD += -Wl,--defsym -Wl,HeapSize=0xC0000 diff --git a/ttcp/init.c b/ttcp/init.c index 8ca036d..f72f031 100644 --- a/ttcp/init.c +++ b/ttcp/init.c @@ -17,6 +17,24 @@ #include +#include +#include +#include +#include "../networkconfig.h" + +void test_network (void); + +/* + * RTEMS Startup Task + */ +rtems_task +Init (rtems_task_argument ignored) +{ + rtems_bsdnet_initialize_network (); + test_network (); + exit (0); +} + #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER #define CONFIGURE_RTEMS_INIT_TASKS_TABLE @@ -41,20 +59,3 @@ rtems_task Init (rtems_task_argument argument); #include -#include -#include -#include -#include "../networkconfig.h" - -void test_network (void); - -/* - * RTEMS Startup Task - */ -rtems_task -Init (rtems_task_argument ignored) -{ - rtems_bsdnet_initialize_network (); - test_network (); - exit (0); -} -- cgit v1.2.3