wiki:TBR/BSP/Shsim

Version 2 (modified by C Rempel, on Jan 4, 2013 at 6:54:43 AM) (diff)

Completed by Ayush as part of Google Code In 2012

Shsim

{{Infobox BSP |BSP_name = SuperH GDB Simulator |Manufacturer = Shsim Holdings |Architecture = SH |CPU_model = sim7045 |Simulator = SuperH GDB Simulator |RAM = RAM Unspecified |NVMEM = 2 MB Flash, 16 KB EEPROM |Serial = Serial Ports Unspecified }} This BSP supports the SuperH simulator included in GDB. This BSP can be built to support the SH1 mode (shsim and simsh7032) or SH2 simulation in GDB. The SuperH simulator in GDB does not support real devices or interrupts so the BSP has the following devices:

  • console is implemented by printing via a trap to the simulator
  • clock is implemented as a special idle task which calls rtems_clock_tick when it is executed.

NOTE: Because of the clock driver implementation this BSP is incapable of correctly executing tests which assume preemption from an interrupt.

This BSP was implemented many years ago but bitrotted and was restored to operational status after the 4.9 branch was cut. This BSP is primarily used for tool testing purposes although it does prove some RTEMS functionality.

The following illustrates a session using this simulator:

 sh-rtems4.10-gdb -x ../g ./sh-rtems4.10/c/simsh7045/testsuites/samples/hello/hello.exe 
GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=i686-pc-linux-gnu --target=sh-rtems4.10"...
Connected to the simulator.
Loading section .text, size 0xd470 vma 0x44000
Loading section .rodata, size 0x84c vma 0x51470
Loading section .data, size 0xa30 vma 0x51d3c
Loading section .stack, size 0x1038 vma 0x530a4
Start address 0x44000
Transfer rate: 506144 bits in <1 sec.
(gdb) r
Starting program: /home/joel/rtems-4.10-work/build/build-sh-simsh7045-rtems/sh-rtems4.10/c/simsh7045/testsuites/samples/hello/hello.exe 


   *  HELLO WORLD TEST ***
Hello World
   *  END OF HELLO WORLD TEST ***

Program exited normally.
(gdb) q