source:
network-demos/tftpTest/init.c
@
d681bc2
Last change on this file since d681bc2 was d681bc2, checked in by Joel Sherrill <joel.sherrill@…>, on 02/10/99 at 19:56:03 | |
---|---|
|
|
File size: 1.6 KB |
Rev | Line | |
---|---|---|
[c87143a] | 1 | /* |
[0c9330e] | 2 | * RTEMS configuration/initialization |
3 | * | |
[c87143a] | 4 | * This program may be distributed and used for any purpose. |
5 | * I ask only that you: | |
[0c9330e] | 6 | * 1. Leave this author information intact. |
7 | * 2. Document any changes you make. | |
[c87143a] | 8 | * |
9 | * W. Eric Norum | |
10 | * Saskatchewan Accelerator Laboratory | |
11 | * University of Saskatchewan | |
12 | * Saskatoon, Saskatchewan, CANADA | |
13 | * eric@skatter.usask.ca | |
[7ba2ac5] | 14 | * |
15 | * $Id$ | |
[c87143a] | 16 | */ |
17 | ||
18 | #include <bsp.h> | |
[0c9330e] | 19 | #include <rtems/tftp.h> |
[c87143a] | 20 | |
[0c9330e] | 21 | #define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER |
22 | #define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER | |
[c87143a] | 23 | #define CONFIGURE_RTEMS_INIT_TASKS_TABLE |
24 | ||
[0c9330e] | 25 | #define CONFIGURE_EXECUTIVE_RAM_SIZE (512*1024) |
26 | #define CONFIGURE_MAXIMUM_SEMAPHORES 20 | |
27 | #define CONFIGURE_MAXIMUM_TASKS 20 | |
[c87143a] | 28 | |
29 | #define CONFIGURE_MICROSECONDS_PER_TICK 10486 | |
30 | ||
[0c9330e] | 31 | #define CONFIGURE_INIT_TASK_STACK_SIZE (10*1024) |
32 | #define CONFIGURE_INIT_TASK_PRIORITY 100 | |
33 | #define CONFIGURE_INIT_TASK_INITIAL_MODES (RTEMS_PREEMPT | \ | |
34 | RTEMS_NO_TIMESLICE | \ | |
35 | RTEMS_NO_ASR | \ | |
36 | RTEMS_INTERRUPT_LEVEL(0)) | |
37 | ||
[c87143a] | 38 | #define CONFIGURE_INIT |
39 | rtems_task Init (rtems_task_argument argument); | |
40 | ||
41 | #include <confdefs.h> | |
42 | ||
[0c9330e] | 43 | #include <stdio.h> |
44 | #include <rtems/rtems_bsdnet.h> | |
45 | #include "../networkconfig.h" | |
[c87143a] | 46 | |
47 | /* | |
48 | * RTEMS Startup Task | |
49 | */ | |
50 | rtems_task | |
51 | Init (rtems_task_argument ignored) | |
52 | { | |
[0c9330e] | 53 | const char *hostname, *filename; |
[c87143a] | 54 | |
[0c9330e] | 55 | rtems_bsdnet_initialize_network (); |
[d681bc2] | 56 | rtems_bsdnet_initialize_tftp_filesystem (); |
[c87143a] | 57 | |
[0c9330e] | 58 | #if (defined (RTEMS_USE_BOOTP)) |
59 | hostname = NULL; | |
60 | filename = rtems_bsdnet_bootp_boot_file_name; | |
[19a33c6] | 61 | #else |
[0c9330e] | 62 | hostname = RTEMS_TFTP_TEST_HOST_NAME; |
63 | filename = RTEMS_TFTP_TEST_FILE_NAME; | |
[19a33c6] | 64 | #endif |
65 | ||
[0c9330e] | 66 | testTFTP (hostname, filename); |
[c87143a] | 67 | exit (0); |
68 | } |
Note: See TracBrowser
for help on using the repository browser.