Building The Libse Library For Sh3 Target Example; Building A Complete Application For The Target Example - Epson S1D13506 Technical Manual

Color lcd/crt/tv controller
Table of Contents

Advertisement

Epson Research and Development
Vancouver Design Center

14.3.1 Building the LIBSE library for SH3 target example

14.3.2 Building a complete application for the target example

Programming Notes and Examples
Issue Date: 02/03/21
In the LIBSE files, there are three main types of files:
• C files that contain the library functions.
• assembler files that contain the target specific code.
• makefiles that describe the build process to construct the library.
The C files are generic to all platforms, although there are some customizations for targets
in the form of #ifdef LCEVBSH3 code (the ifdef used for the example SH3 target Low Cost
Eval Board SH3). The majority of this code remains constant whichever target you build
for.
The assembler files contain some platform setup code (stacks, chip selects) and jumps into
the main entry point of the C code that is contained in the C file entry.c. For our example,
the assembler file is STARTSH3.S and it performs only some stack setup and a jump into
the code at _mainEntry (entry.c).
In the embedded targets, printf (in file rprintf.c), putchar (putchar.c) and getch (kb.c)
resolve to serial character input/output. For SH3, much of the detail of handling serial IO
is hidden in the monitor of the evaluation board, but in general the primitives are fairly
straight forward, providing the ability to get characters to/from the serial port.
For our target example, the nmake makefile is makesh3.mk. This makefile calls the Gnu
compiler at a specific location (TOOLDIR), enumerates the list of files that go into the
target and builds a .a library file as the output of the build process.
With nmake.exe in your path run:
nmake -fmakesh3.mk
Source code for this example is available in the file 56_sh3_target.c. This file is available
on the internet at www.eea.epson.com.
Page 151
S1D13506
X25B-G-003-04

Advertisement

Table of Contents
loading

Table of Contents