On 7/7/2026 11:09 AM, Parthiban wrote:
> On 7/7/26 12:33 AM, Pierrick Bouvier wrote:
>> Signed-off-by: Pierrick Bouvier <[email protected]>
>> ---
>> tests/tcg/meson.build | 1 +
>> tests/tcg/tricore/meson.build | 56 +++++++++++++++++++++++++++++++++++
>> 2 files changed, 57 insertions(+)
>> create mode 100644 tests/tcg/tricore/meson.build
>>
>> diff --git a/tests/tcg/meson.build b/tests/tcg/meson.build
>> index 59e71d82c99..b2630176b7f 100644
>> --- a/tests/tcg/meson.build
>> +++ b/tests/tcg/meson.build
>> @@ -152,6 +152,7 @@ subdir('ppc64le')
>> subdir('riscv64')
>> subdir('s390x')
>> subdir('sh4')
>> +subdir('tricore')
>>
>> image_targets = {}
>> exe_targets = []
>> diff --git a/tests/tcg/tricore/meson.build b/tests/tcg/tricore/meson.build
>> new file mode 100644
>> index 00000000000..6303d6a912c
>> --- /dev/null
>> +++ b/tests/tcg/tricore/meson.build
>> @@ -0,0 +1,56 @@
>> +tests = []
>> +
>> +link_script = files('link.ld')[0]
>> +crt0 = files('c'/'crt0-tc2x.S')
>> +asmflags = ['-Wl,--mcpu=tc162',
>> + '-Wl,-T', link_script,
>> + '-mtc162',
>> + '-nostartfiles']
>> +cflags = [asmflags, crt0]
>> +qemu_args = ['-display', 'none',
>> + '-M', 'tricore_testboard',
>> + '-cpu', 'tc37x']
>
> - '-cpu', 'tc37x']
> + '-cpu', 'tc37x',
> + '-kernel']
>
> This should fix the TriCore timeout issue.
>
> qemu_args is missing a trailing -kernel. bare positional argument and kernel
> is never loaded. PC unset.
>
Thanks for the second pair of eyes on this, I deserve a facepalm here.
Works fine with it!
> Thanks,
> Parthiban
>> +
>> +# Multi arch tests are not supported
>> +# tests += tcg_tests['multiarch-softmmu']['tests']
>> +
>> +setup_asm = {'cflags': asmflags, 'qemu_args': qemu_args}
>> +setup_c = {'cflags': cflags, 'qemu_args': qemu_args}
>> +
>> +tests += {
>> + 'asm/test_abs.S': setup_asm,
>> + 'asm/test_bmerge.S': setup_asm,
>> + 'asm/test_clz.S': setup_asm,
>> + 'asm/test_crcn.S': setup_asm,
>> + 'asm/test_dextr.S': setup_asm,
>> + 'asm/test_dvstep.S': setup_asm,
>> + 'asm/test_fadd.S': setup_asm,
>> + 'asm/test_fmul.S': setup_asm,
>> + 'asm/test_ftohp.S': setup_asm,
>> + 'asm/test_ftoi.S': setup_asm,
>> + 'asm/test_ftou.S': setup_asm,
>> + 'asm/test_hptof.S': setup_asm,
>> + 'asm/test_imask.S': setup_asm,
>> + 'asm/test_insert.S': setup_asm,
>> + 'asm/test_ld_bu.S': setup_asm,
>> + 'asm/test_ld_h.S': setup_asm,
>> + 'asm/test_madd.S': setup_asm,
>> + 'asm/test_msub.S': setup_asm,
>> + 'asm/test_muls.S': setup_asm,
>> + 'c/test_boot_to_main.c': setup_c,
>> + 'c/test_context_save_areas.c': setup_c,
>> +}
>> +
>> +if 'qemu-system-tricore' in emulators
>> + tcg_tests += {
>> + 'tricore-softmmu': {
>> + 'cc': 'tricore-gcc',
>> + 'cc_dockerfile': 'debian-tricore-cross',
>> + 'cc_docker_arch': ['x86_64'],
>> + 'folder': 'tricore',
>> + 'gdb_arch': 'tricore',
>> + 'qemu': emulators['qemu-system-tricore'],
>> + 'tests': tests,
>> + }
>> + }
>> +endif
>