summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/arm/gdbarmsim/include/bsp.h
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2014-05-26 11:44:48 +1000
committerChris Johns <chrisj@rtems.org>2014-05-26 11:52:02 +1000
commitb3fb2fff4215bac76ebb9f34a968a374eaebc0ba (patch)
tree6eaaad7b8885e72129fbb4a6c381972f4f66f222 /c/src/lib/libbsp/arm/gdbarmsim/include/bsp.h
parenttools: Add rtems-bsp to list BSPs in the source tree. (diff)
downloadrtems-b3fb2fff4215bac76ebb9f34a968a374eaebc0ba.tar.bz2
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.
Diffstat (limited to '')
-rw-r--r--c/src/lib/libbsp/arm/gdbarmsim/include/bsp.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/arm/gdbarmsim/include/bsp.h b/c/src/lib/libbsp/arm/gdbarmsim/include/bsp.h
index ea7d907066..bbb514ff9f 100644
--- a/c/src/lib/libbsp/arm/gdbarmsim/include/bsp.h
+++ b/c/src/lib/libbsp/arm/gdbarmsim/include/bsp.h
@@ -40,12 +40,41 @@ extern "C" {
* @{
*/
+//#define BSP_GET_WORK_AREA_DEBUG 1
+
/**
* @brief Support for simulated clock tick
*/
Thread clock_driver_sim_idle_body(uintptr_t);
#define BSP_IDLE_TASK_BODY clock_driver_sim_idle_body
+/*
+ * Access to the GDB simulator.
+ */
+int gdbarmsim_system(const char *);
+int gdbarmsim_rename(const char *, const char *);
+int gdbarmsim__isatty(int);
+clock_t gdbarmsim_times(struct tms *);
+int gdbarmsim_gettimeofday(struct timeval *, void *);
+int gdbarmsim_unlink(const char *);
+int gdbarmsim_link(void);
+int gdbarmsim_stat(const char *, struct stat *);
+int gdbarmsim_fstat(int, struct stat *);
+int gdbarmsim_swistat(int fd, struct stat * st);
+int gdbarmsim_close(int);
+clock_t gdbarmsim_clock(void);
+int gdbarmsim_swiclose(int);
+int gdbarmsim_open(const char *, int, ...);
+int gdbarmsim_swiopen(const char *, int);
+int gdbarmsim_writec(const char c);
+int gdbarmsim_write(int, char *, int);
+int gdbarmsim_swiwrite(int, char *, int);
+int gdbarmsim_lseek(int, int, int);
+int gdbarmsim_swilseek(int, int, int);
+int gdbarmsim_read(int, char *, int);
+int gdbarmsim_swiread(int, char *, int);
+void initialise_monitor_handles(void);
+
/** @} */
#ifdef __cplusplus