mbox series

[0/6] TriCore Semihosting

Message ID 20231015205913.264782-1-kbastian@mail.uni-paderborn.de
Headers show
Series TriCore Semihosting | expand

Message

Bastian Koppelmann Oct. 15, 2023, 8:59 p.m. UTC
Hi,

this patch series implements semihosting as done in the golden Infineon
simulator 'TSIM'. 'TSIM' supports different semihosting variants, specific to
various toolchain vendors. Only the GNU toolchain with Newlib [1] is freely
available, thus I only implemented semihosting for GNU. This port of Newlib is
also available in the 'debian-tricore-cross.docker' image.

To build and run a binary with semihosting, one only has to link against libos, i.e.

tricore-gcc test.c -los -o test.elf
qemu-system-tricore -M tricore_testboard -semihosting -nographic -kernel test.elf

Cheers,
Bastian

[1] https://github.com/bkoppelmann/package_940/tree/main/newlib/libgloss/tricore

Bastian Koppelmann (6):
  target/tricore: Add semihosting stub
  target/tricore: Add read and write semihosting calls
  target/tricore: Add lseek semihosting call
  target/tricore: Add close semihosting call
  target/tricore: Add open and creat semihosting calls
  target/tricore: Enable semihosting

 configs/devices/tricore-softmmu/default.mak |   1 +
 docs/about/emulation.rst                    |   3 +
 qemu-options.hx                             |   3 +-
 target/tricore/helper.h                     |   1 +
 target/tricore/meson.build                  |   1 +
 target/tricore/translate.c                  |  13 +-
 target/tricore/tricore-semi.c               | 380 ++++++++++++++++++++
 7 files changed, 399 insertions(+), 3 deletions(-)
 create mode 100644 target/tricore/tricore-semi.c