Hi Sameer, On Sun, Apr 14, 2024 at 06:15:56PM +0200, Philippe Mathieu-Daudé wrote: > Hi Sameer, > > On 13/4/24 14:52, Sameer Kalliadan Poyil wrote: > > Hello All, > > I see that Latest qemu supports for tricore TC277 and TC377 > > image.png > > But when I downloaded source code and checked for TC377 related file , I > > didn't find anything > > > > I want to run RTOS/bare metal code on TC377 . could you please let me > > know how to start qemu on TC377 ? > > Here is the latest version of qemu i have , I didn't download 9.0 > > $ qemu-system-tricore -cpu help > Available CPUs: > tc1796 > tc1797 > tc27x > tc37x > $ > > Try 'qemu-system-tricore -machine KIT_AURIX_TC277_TRB -cpu tc37x', > this should start a TC377 SoC on an AURIX board (~KIT_A2G_TC377_TRB).
This is the closest you will get to TC377 board. I'm not sure if QEMU is the best choice for you, if you want run a RTOS, as qemu-system-tricore is lacking: - peripherals like SCU, SystemTimer that are a bare minimum to run a RTOS - Simulation of time: When your RTOS runs periodic tasks you might get wrong results, as QEMU does not simulate time accurately. The real CPU would see time pass differently than QEMU. We make a best guess using the wall time. I think for now Infineons TSIM is a better choice, as it does not lack the points above. However it has significantly less performance compared to QEMU. If you are only interested in running bare metal software, check out my 'boot_to_main' test [1]. The Makefile [2] shows you how to build it using tricore-gcc [3] and how to run it in QEMU. Also tricore-gdb [4] might be interesting for you. If you have further questions, feel free to ask me. Cheers, Bastian [1] https://gitlab.com/qemu-project/qemu/-/blob/master/tests/tcg/tricore/c/test_boot_to_main.c?ref_type=heads [2] https://gitlab.com/qemu-project/qemu/-/blob/master/tests/tcg/tricore/Makefile.softmmu-target?ref_type=heads [3] https://github.com/bkoppelmann/package_494 [4] https://github.com/volumit/gdb-tricore