diff options
author | Andrey Smirnov <andrew.smirnov@gmail.com> | 2015-10-28 11:34:36 -0700 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2015-10-30 08:06:03 +0100 |
commit | 48d61510290ea3380e4987d38e512d2d8304849a (patch) | |
tree | aa606c7c7a204b6686f0f24830ece7f2b614a793 /Documentation/filesystems | |
parent | 611e86d58154752fd1fd0051b6e5dec325329dbe (diff) | |
download | barebox-48d61510290ea3380e4987d38e512d2d8304849a.tar.gz barebox-48d61510290ea3380e4987d38e512d2d8304849a.tar.xz |
ARM: Add support for semihosting
Add semihosting API implementation and implement a filesystem driver
to access debugging host filesystem using it.
Tested on Freescale SabreSD board (i.MX6Q) using OpenOCD
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'Documentation/filesystems')
-rw-r--r-- | Documentation/filesystems/smhfs.rst | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/Documentation/filesystems/smhfs.rst b/Documentation/filesystems/smhfs.rst new file mode 100644 index 0000000000..28de14677d --- /dev/null +++ b/Documentation/filesystems/smhfs.rst @@ -0,0 +1,57 @@ +.. index:: smhfs (filesystem) + +.. _filesystems_smhfs: + +File I/O over ARM semihosting support +===================================== + +Target Side Setup +----------------- + +barebox can communicate with debug programms attached via SWD/JTAG by +means of ARM semihosting protocol. + +Not all of the I/O primitives neccessary to implement a full +filesystem are exposed in ARM semihosting API and because of that some +aspects of filesystem funcionality are missing. Implementation does +not have support for listing directories. This means a +:ref:`command_ls` to a SMHFS-mounted path will show an empty +directory. Nevertheless, the files are there. + +Example:: + + mount -t smhfs /dev/null /mnt/smhfs + + +Host Side Setup +--------------- + +FIXME: Currently OpenOCD does not work correctly if Barebox is built +with MMU enabled, so before using this featrue, please make sure that +MMU is disabled in your particular configuration + +To make semihosting work host machine connected to the target via +JTAG/SWD must have semihosting capable debug software running. One +such tool would be OpenOCD. For ARM9 and ARM11 CPUs most recent +release of OpenOCD should suffice, however for ARMv7A based devices +patched version from here http://openocd.zylin.com/#/c/2908/ has to be +used. + +The following steps are required to set up a operational semihosting +channel: + + 1. In a terminal start OpenOCD and specify your particular board + and debug adapter used. + + 2. In a separate terminal connect to OpenOCD via telnet + + telnet localhost 4444 + + 3. In resulting telnet session execute the following commands: + + halt + arm semihosting on + resume + +After that is done all of the semihosting related functions should be +ready to use. |