source: rtems/testsuites/samples/hello/init.c @ f703e7f

Last change on this file since f703e7f was f703e7f, checked in by Sebastian Huber <sebastian.huber@…>, on Oct 26, 2017 at 11:59:05 AM

tests: Move rtems_test_printer definition

Statically initialize it to use printk().

Update #3170.
Update #3199.

  • Property mode set to 100644
File size: 1.2 KB
Line 
1/*
2 *  COPYRIGHT (c) 1989-2012.
3 *  On-Line Applications Research Corporation (OAR).
4 *
5 *  The license and distribution terms for this file may be
6 *  found in the file LICENSE in this distribution or at
7 *  http://www.rtems.org/license/LICENSE.
8 */
9
10#ifdef HAVE_CONFIG_H
11#include "config.h"
12#endif
13
14#include <rtems/printer.h>
15#include <rtems/test.h>
16
17#include <bsp.h> /* for device driver prototypes */
18
19#include <stdio.h>
20#include <stdlib.h>
21
22/* forward declarations to avoid warnings */
23rtems_task Init(rtems_task_argument argument);
24
25const char rtems_test_name[] = "HELLO WORLD";
26
27rtems_task Init(
28  rtems_task_argument ignored
29)
30{
31  rtems_print_printer_printf(&rtems_test_printer);
32  rtems_test_begin();
33  printf( "Hello World\n" );
34  rtems_test_end();
35  exit( 0 );
36}
37
38
39/* NOTICE: the clock driver is explicitly disabled */
40#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
41#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
42
43#define CONFIGURE_MAXIMUM_TASKS            1
44
45#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
46
47#define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_FLOATING_POINT
48
49#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
50
51#define CONFIGURE_INIT
52#include <rtems/confdefs.h>
Note: See TracBrowser for help on using the repository browser.