gem5 semihosting

This commit is contained in:
Ciro Santilli 六四事件 法轮功
2018-09-24 09:26:39 +01:00
parent 595e52bb5c
commit b2230bacf9
6 changed files with 40 additions and 13 deletions

View File

@@ -747,6 +747,7 @@ Alternatively, for the sake of tab completion, we also accept full paths inside
To use gem5 instead of QEMU do:
....
patch -d "$(./getvar gem5_src_dir)" -p 1 < patches/manual/gem5-semihost.patch && \
./configure --baremetal --gem5 && \
./build-gem5 --arch arm && \
./build-crosstool-ng --arch arm && \
@@ -761,10 +762,9 @@ and then <<qemu-buildroot-setup,as usual>> open a shell with:
./gem5-shell
....
TODO:
TODO: the carriage returns are a bit different than in QEMU, see: <<gem5-baremetal-carriage-return>>.
* the carriage returns are a bit different than in QEMU, see: <<gem5-baremetal-carriage-return>>.
* semihosting is disabled, and all examples that rely on it fail, including how to enable it? See <<gem5-semihosting>>
The semihosting patch is required to enable <<semihosting>>, on which base functionality such as `exit()` depends, see also: https://stackoverflow.com/questions/52475268/how-to-enable-arm-semihosting-in-gem5/52475269#52475269
Note that `./build-baremetal` requires the `--gem5` option, and generates separate executable images for both, as can be seen from:
@@ -9821,16 +9821,6 @@ Bibliography:
* https://stackoverflow.com/questions/31990487/how-to-cleanly-exit-qemu-after-executing-bare-metal-program-without-user-interve/40957928#40957928
* https://balau82.wordpress.com/2010/11/04/qemu-arm-semihosting/
==== gem5 semihosting
TODO how to enable it? <<config-ini>> contains:
....
root.system.semihosting=Null
....
and there are no hits under `configs/`.
=== gem5 baremetal carriage return
TODO: our example is printing newlines without automatic carriage return `\r` as in: