4.115
Last change
on this file since 8536b67 was
b3fb2ff,
checked in by Chris Johns <chrisj@…>, on 05/26/14 at 01:44:48
|
bsp/gdbarmsim: Change syscall functions to not clash with RTEMS functions.
The syscall functions overlapped with RTEMS, for example _write, _read, etc.
Change these to be internal to the BSP and avoid any clash with names in
RTEMS. Add support for SWI_Write0.
Change the console driver to use SWI_Write0. This outputs the character
to the host's stdout. Writing to file name 0 is not captured and managed
by GDB's simulation code while the SWI_Write0 is. The managed stdout
data is encapulated in the MI protocol while writes to file handle 0 are
dropped by GDB when in MI mode.
|
-
Property mode set to
100644
|
File size:
1.0 KB
|
Line | |
---|
1 | /* |
---|
2 | * COPYRIGHT (c) 1989-2009. |
---|
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 | #include <bsp.h> |
---|
11 | #include <rtems/libio.h> |
---|
12 | #include <stdlib.h> |
---|
13 | #include <assert.h> |
---|
14 | |
---|
15 | /* |
---|
16 | * console_initialize_hardware |
---|
17 | * |
---|
18 | * This routine initializes the console hardware. |
---|
19 | * |
---|
20 | */ |
---|
21 | void console_initialize_hardware(void) |
---|
22 | { |
---|
23 | return; |
---|
24 | } |
---|
25 | |
---|
26 | /* |
---|
27 | * console_outbyte_polled |
---|
28 | * |
---|
29 | * This routine transmits a character using polling. |
---|
30 | */ |
---|
31 | void console_outbyte_polled( |
---|
32 | int port, |
---|
33 | char ch |
---|
34 | ) |
---|
35 | { |
---|
36 | gdbarmsim_writec(ch); |
---|
37 | } |
---|
38 | |
---|
39 | /* |
---|
40 | * console_inbyte_nonblocking |
---|
41 | * |
---|
42 | * This routine polls for a character. |
---|
43 | */ |
---|
44 | |
---|
45 | int console_inbyte_nonblocking( |
---|
46 | int port |
---|
47 | ) |
---|
48 | { |
---|
49 | return -1; |
---|
50 | } |
---|
51 | |
---|
52 | #include <rtems/bspIo.h> |
---|
53 | |
---|
54 | void MyBSP_output_char(char c) { console_outbyte_polled( 0, c ); } |
---|
55 | |
---|
56 | BSP_output_char_function_type BSP_output_char = MyBSP_output_char; |
---|
57 | BSP_polling_getchar_function_type BSP_poll_char = NULL; |
---|
Note: See
TracBrowser
for help on using the repository browser.