summaryrefslogtreecommitdiff
path: root/src/target/arm_semihosting.c
Commit message (Collapse)AuthorAgeFilesLines
* ARM semihosting: fix EOF handling with SYS_READNicolas Pitre2010-02-021-1/+1
| | | | | | | | The semihosting interface has a strange convention for read/write where the unused amount of buffer must be returned. We failed to return the total buffer size when the local read() call returned 0. Signed-off-by: Nicolas Pitre <nico@marvell.com>
* build: fix problems with "struct stat" not being defined under eCosØyvind Harboe2010-01-311-0/+1
| | | | | | | Include <sys/stat.h> according to http://www.opengroup.org/onlinepubs/000095399/functions/stat.html Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* ARM semihosting: win32 and cygwin fixesSpencer Oliver2010-01-281-16/+26
| | | | | | | | | | | | Cygwin would fail to reopen a previously written file if the mode is not given. Simplified converting the open flags and made sure the win32 O_BINARY bit is set. Added define for systems that do not support O_BINARY. Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
* ARM semihosting: fix writing to stdoutSpencer Oliver2010-01-281-8/+4
| | | | | | | | SYS_FLEN would be called before a write on a descriptor to check its size. Currently lseek would fail with -1 when given the stdout/stderr descriptor. Changing to use fstat seems to be the standard way of handling this. Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
* ARM: use <target/arm.h> not armv4_5.hDavid Brownell2009-12-071-0/+1
| | | | | | | | | | | | | | Move most declarations in <target/armv4_5.h> to <target/arm.h> and update users. What's left in the older file is stuff that I think should be removed ... the old register cache access stuff, which makes it awkward to support microcontroller profile (Cortex-M) cores. The armv4_5_run_algorithm() declaration was moved too, even though it's not yet as generic as it probably ought to be. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* ARM semihosting: work with both low and high vectorsNicolas Pitre2009-12-041-6/+4
| | | | | Signed-off-by: Nicolas Pitre <nico@marvell.com> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* ARM: misc generic cleanupDavid Brownell2009-12-041-2/+9
| | | | | | | | | | | Remove an undesirable use of the CPSR symbol ... it needs to vanish. Flag mode-to-number stuff as obsolete; say why ... should also vanish. Get rid of no-longer-used mode and state typedefs. Comment a few of the implicit ties to "classic ARM". Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* ARM: switch target_to_armv4_5() to target_to_arm()David Brownell2009-12-041-2/+2
| | | | | | And remove that old symbol. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* ARM: rename ARMV4_5_MODE_* as ARM_MODE_*David Brownell2009-12-041-2/+2
| | | | Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* ARM: rename ARMV4_5_STATE_* as ARM_STATE_*David Brownell2009-12-041-1/+1
| | | | Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* ARM: semihosting entry cleanupDavid Brownell2009-12-041-8/+39
| | | | | | | | | Clean up arm_semihosting() entry a bit, comment some issues and just which SVC opcodes are getting intercepted. Microcontroller profile cores will need a new entry, since they use BKPT instead (and don't have either SVC mode or an SPSR register). Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* ARM: remove semihosting globalsDavid Brownell2009-12-041-21/+18
| | | | | | | | Store a flag and errno in in "struct arm". Have "poll" output report when semihosting is active. Shrink some of the affected lines. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* target: cygwin build fixesDavid Brownell2009-12-041-2/+4
| | | | Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* basic ARM semihosting supportNicolas Pitre2009-12-031-0/+442
Semihosting enables code running on an ARM target to use the I/O facilities on the host computer. The target application must be linked against a library that forwards operation requests by using the SVC instruction that is trapped at the Supervisor Call vector by the debugger. The "hosted" library version provided with CodeSourcery's Sourcery G++ Lite for ARM EABI is one example. This is currently available for ARM9 processors, but any ARM variant should be able to support this with little additional work. Tested using binaries compiled with Sourcery G++ Lite 2009q1-161 and ARM RVCT 3.0. [dbrownell@users.sourceforge.net: doc tweaks, NEWS] Signed-off-by: Nicolas Pitre <nico@marvell.com> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>