[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 |
---|
| 14 | */ |
---|
| 15 | |
---|
| 16 | #include <bsp.h> |
---|
[0c9330e] | 17 | #include <rtems/tftp.h> |
---|
[c87143a] | 18 | |
---|
[0c9330e] | 19 | #define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER |
---|
| 20 | #define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER |
---|
[c87143a] | 21 | #define CONFIGURE_RTEMS_INIT_TASKS_TABLE |
---|
| 22 | |
---|
[0c9330e] | 23 | #define CONFIGURE_EXECUTIVE_RAM_SIZE (512*1024) |
---|
| 24 | #define CONFIGURE_MAXIMUM_SEMAPHORES 20 |
---|
| 25 | #define CONFIGURE_MAXIMUM_TASKS 20 |
---|
[c87143a] | 26 | |
---|
| 27 | #define CONFIGURE_MICROSECONDS_PER_TICK 10486 |
---|
| 28 | |
---|
[0c9330e] | 29 | #define CONFIGURE_INIT_TASK_STACK_SIZE (10*1024) |
---|
| 30 | #define CONFIGURE_INIT_TASK_PRIORITY 100 |
---|
| 31 | #define CONFIGURE_INIT_TASK_INITIAL_MODES (RTEMS_PREEMPT | \ |
---|
| 32 | RTEMS_NO_TIMESLICE | \ |
---|
| 33 | RTEMS_NO_ASR | \ |
---|
| 34 | RTEMS_INTERRUPT_LEVEL(0)) |
---|
| 35 | |
---|
[c87143a] | 36 | #define CONFIGURE_INIT |
---|
| 37 | rtems_task Init (rtems_task_argument argument); |
---|
| 38 | |
---|
| 39 | #define CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE |
---|
| 40 | rtems_driver_address_table Device_drivers[] = { |
---|
| 41 | CONSOLE_DRIVER_TABLE_ENTRY, |
---|
| 42 | CLOCK_DRIVER_TABLE_ENTRY, |
---|
| 43 | TFTP_DRIVER_TABLE_ENTRY, |
---|
| 44 | }; |
---|
| 45 | |
---|
| 46 | #include <confdefs.h> |
---|
| 47 | |
---|
[0c9330e] | 48 | #include <stdio.h> |
---|
| 49 | #include <rtems/rtems_bsdnet.h> |
---|
| 50 | #include "../networkconfig.h" |
---|
[c87143a] | 51 | |
---|
| 52 | /* |
---|
| 53 | * RTEMS Startup Task |
---|
| 54 | */ |
---|
| 55 | rtems_task |
---|
| 56 | Init (rtems_task_argument ignored) |
---|
| 57 | { |
---|
[0c9330e] | 58 | const char *hostname, *filename; |
---|
[c87143a] | 59 | |
---|
[0c9330e] | 60 | rtems_bsdnet_initialize_network (); |
---|
[c87143a] | 61 | |
---|
[0c9330e] | 62 | #if (defined (RTEMS_USE_BOOTP)) |
---|
| 63 | hostname = NULL; |
---|
| 64 | filename = rtems_bsdnet_bootp_boot_file_name; |
---|
[19a33c6] | 65 | #else |
---|
[0c9330e] | 66 | hostname = RTEMS_TFTP_TEST_HOST_NAME; |
---|
| 67 | filename = RTEMS_TFTP_TEST_FILE_NAME; |
---|
[19a33c6] | 68 | #endif |
---|
| 69 | |
---|
[0c9330e] | 70 | testTFTP (hostname, filename); |
---|
[c87143a] | 71 | exit (0); |
---|
| 72 | } |
---|