Warning, /bsps/sh/gensh4/README.md is written in an unsupported language. File is not indexed.
0001 gensh4
0002 ======
0003
0004 Author: Alexandra Kossovsky <sasha@oktet.ru>
0005 Victor Vengerov <vvv@oktet.ru>
0006 OKTET Ltd, http://www.oktet.ru
0007
0008
0009 ```
0010 BSP NAME: generic SH4 (gensh4)
0011 BOARD: n/a
0012 BUS: n/a
0013 CPU FAMILY: Hitachi SH
0014 CPU: SH 7750
0015 COPROCESSORS: none
0016 MODE: n/a
0017
0018 DEBUG MONITOR: gdb (sh-ipl-g+ loader/stub)
0019 ```
0020
0021 PERIPHERALS
0022 -----------
0023 ```
0024 TIMERS: on-chip
0025 SERIAL PORTS: on-chip (with 2 ports)
0026 REAL-TIME CLOCK: none
0027 DMA: not used
0028 VIDEO: none
0029 SCSI: none
0030 NETWORKING: none
0031 ```
0032
0033 DRIVER INFORMATION
0034 ------------------
0035 ```
0036 CLOCK DRIVER: on-chip timer
0037 IOSUPP DRIVER: default
0038 SHMSUPP: n/a
0039 TIMER DRIVER: on-chip timer
0040 TTY DRIVER: /dev/console
0041 ```
0042
0043 STDIO
0044 -----
0045 ```
0046 PORT: /dev/console
0047 ELECTRICAL: n/a
0048 BAUD: n/a
0049 BITS PER CHARACTER: n/a
0050 PARITY: n/a
0051 STOP BITS: n/a
0052 ```
0053
0054 NOTES
0055 -----
0056 (1) Driver for the on-chip serial devices is tested only with 1st serial
0057 port. We cannot test it on serial port with FIFO.
0058
0059 Console driver has 4 modes -- 2 with termios (interrupt-driven &
0060 poll-driven modes), one raw mode working with serial port directly,
0061 without termios, and one mode working with gdb stub (using 'trapa'
0062 handled by sh-ipl-g+).
0063
0064 (2) The present 'hw_init.c' file provides 'early_hw_init'(void) which
0065 is normally called from 'start.S' to provide such minimal HW setup.
0066 It is written in C, but it should be noted that any accesses to memory
0067 (except hardware registers) are prohibited until hardware not
0068 initialized. To avoid access to stack, hw_init.c should be compiled with
0069 -fomit-frame-pointer.
0070
0071 hw_init.c also provides 'bsp_cache_on'(void) normally called from
0072 'start.S' after copying all data from rom to ram.
0073
0074 (3) In 'configure.ac' you should properly set 'CPU_CLOCK_RATE_HZ'.
0075 It is frequency fed to the CPU core (external clock frequency can be
0076 multiplied by on-chip PLLs). Please note that it is not a frequency of
0077 external oscillator! See Hardware Manual, section 10, for details.
0078 Global variable 'SH4_CPU_HZ_Frequency' is declared in 'bsp.h' and
0079 initilized in 'bspstart.c' to ${HZ}. It is used by sci driver,
0080 which exists in 'libcpu/sh/sh7750'.
0081
0082 (4) There is SH4_WITH_IPL macro in console driver 'sh4_uart.h'.
0083 When it is defined, the application works under
0084 gdb-stub (it is able to turn cache on by 'trapa', use gdb mode in console
0085 driver and get out from gdb to use other console modes).
0086
0087 (5) There are 3 likcmds:
0088 - linkcmds: code and data loaded to RAM. No code/data moving required.
0089 - linkcmds.rom: code executed from the ROM; .data section moved to the
0090 RAM on initialization.
0091 - linkcmds.rom2ram: execution started from the ROM (after reset); code
0092 and data moved to the RAM and execution continued from RAM.
0093
0094 The same 'start.S' is used for all cases.
0095
0096 (6) You can get gdb stub from http://www.oktet.ru/download/sh4/sh-ipl.tar.gz.
0097 It is based on 'sh-ipl-g+' package used in sh-linux project.
0098
0099 (7) This project was done in cooperation with Transas company
0100 http://www.transas.com