100 lines
5.8 KiB
HTML
100 lines
5.8 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
|
|
<HTML VERSION="2.0">
|
|
<HEAD>
|
|
<!-- WEBMAGIC VERSION NUMBER="2.0.1" -->
|
|
<!-- WEBMAGIC TRANSLATION NAME="ServerRoot" SRC="/var/www/htdocs/" DST="/" -->
|
|
<!-- WEBMAGIC TRANSLATION NAME="ProjectRoot" SRC="./" DST="" -->
|
|
<TITLE> Modular IDE Source Code & Build Overview </TITLE>
|
|
</HEAD>
|
|
<BODY>
|
|
<P><A HREF="modular.html"><IMG SRC="/images/diags.gif" WIDTH="100" HEIGHT="75" BORDER="2" SGI_FULLPATH="/var/www/htdocs/images/diags.gif"> </A></P>
|
|
<H1>Modular IDE: Source Code & Build Overview </H1>
|
|
<HR>
|
|
<H3>Code Overview</H3>
|
|
<H4>Directories used by old-style and Modular IDE</H4>
|
|
<DL>
|
|
<DT>stand/arcs/ide:
|
|
<DD>top IDE directory
|
|
<DT>stand/arcs/ide/IPXX
|
|
<DD>Cpu specific IDE test code
|
|
<DT>stand/arcs/ide/common
|
|
<DD>Generates libidecmn.a. Contains the basic code needed for IDE initialization,
|
|
executing IDE tests, and script parsing. This code is built into Core IDE.
|
|
<DT>stand/arcs/ide/fforward
|
|
<DT>stand/arcs/ide/godzilla
|
|
<DD>Directories that contain the actual test code for various architectures.
|
|
This code resides in the modules.
|
|
</DL>
|
|
<H4>New Directories for Modular IDE</H4>
|
|
<DL>
|
|
<DT>stand/arcs/ide/elf
|
|
<DD>Code that generates libideelf.a. This library contains the code that enables
|
|
core to <A HREF="load.html">load</A> dynamic modules and do <A HREF="load.html#symbol_resolution">symbol resolution</A>. This code is built into Core IDE.
|
|
<DT>stand/arcs/ide/module
|
|
<DD>Common code that is used by all modules. Basically just module <A HREF="load.html#start_module">bring up code</A>.
|
|
<DT>stand/arcs/ide/IPXX/modules
|
|
<DD>Where one can build all of the modules for a CPU board. This directory contains
|
|
a directory for each module xxx. Each module directory contains the module's
|
|
script in a text file called <I>module_xxx_script </I>(this file generates module_xxx_script_code.c via the <I>module_startup.awk </I>script), and a list of diagcmds for module xxx in the file <I>xxx_diagcmds (</I>this file generates module_xxx.c via the <I>builtins.awk </I>script).
|
|
</DL>
|
|
<H3>Target directory overview</H3>
|
|
<DL>
|
|
<DT>stand/arcs/ide/${PRODUCT}core.O/
|
|
<DD>All core objects and the core binary core.ide itself are placed in this
|
|
directory. This is done by using the LIBTYPE=core directive in the makefiles. All objects in this directory are -non_shared (i.e. NOT PIC code).
|
|
<DT>stand/arcs/ide/${PRODUCT}modules.O/
|
|
<DD>The common (eg common to all modules) module objects are built in this directory. This is done by using the LIBTYPE=modules directive in the makefiles. These are just the objects from stand/arcs/ide/module/. All objects in this directory are -shared (i.e. PIC code).
|
|
<DT>stand/arcs/ide/${PRODUCT}module_cpu.O/
|
|
<DD>All object needed to build the module_cpu IDE module are placed in this
|
|
directory and linked together to build modular_ide. This is done by using the LIBTYPE=module_cpu directive in the makefiles. All objects in this directory are -shared (i.e. PIC code).
|
|
</DL>
|
|
<H3>stand/arcs/ide/Makefile </H3>
|
|
<P>From the stand/arcs/ide/Makefile one can build the binaries needed for Modular
|
|
IDE (i.e. core.ide and all of the modules module_*). Here are some useful
|
|
rules:</P>
|
|
<OL>
|
|
<LI>make modular: Builds core and all of the modules (like doing make core ;
|
|
make modules).
|
|
<LI>make core: Only builds the core. Depends on:
|
|
<OL>
|
|
<LI>libidecmn.a which is built in stand/arcs/ide/common
|
|
<LI>libideelf.a which is built in stand/arcs/ide/elf
|
|
<LI>libidecore.a which is built from some files in stand/arcs/ide/{fforward,godzilla}and
|
|
some files in stand/arcs/ide/IPXX via make core and make _core in those
|
|
subdirectories.
|
|
<LI>libsk.a which is built in stand/arcs/lib/libsk
|
|
<LI>libsc.a which is built in stand/arcs/lib/libsc
|
|
</OL>
|
|
<LI>make modules: Only builds the modules. Depends on:
|
|
<OL>
|
|
<LI>module.o and module_asm.o from stand/arcs/ide/module (i.e. make module)
|
|
<LI>stand/arcs/ide/${PRODUCT}module_XX.O/*.o from stand/arcs/ide/{fforward,godzilla}
|
|
via make module and make _module in those subdirectories (i.e. cd {fforward.godzilla}
|
|
; make module) - this is were most of the actual test code resides. Remember
|
|
that modules must have their objects compiled as <I>-shared </I>while the old shell and field IDE's compile everything <I>-non_shared.</I>
|
|
<LI>module_XX.o and module_XX_script_code.o from stand/arcs/ide/IPXX/modules/module_XX
|
|
</OL>
|
|
<LI>make elf: builds the stand/arcs/ide/elf directory
|
|
<LI>make module: builds the stand/arcs/ide/module directory
|
|
</OL>
|
|
<H3>Build Overview</H3>
|
|
<H4>Core</H4>
|
|
<P>Core IDE is built <I>-non_shared</I> with specified load addresses for data (<I>-D</I>) and text (<I>-T</I>). To pick up all libsk and libsc library functions, core.ide is linked
|
|
with <I>-all</I> (note this makes a larger than necessary binary, since the modules only
|
|
use a subset of libsk and libsc). <B>WARNING</B>: Currently linking core.ide with -all does not work because there are some
|
|
missing symbols in libsk and libsc. The workaround is to link core.ide with
|
|
the <I>-U</I> option (ignore undefined symbols). This is dangerous since run-time errors
|
|
may result. So if you change core.ide, first compile with <I>-U </I>to make sure that no important symbols are missing !</P>
|
|
<H4>Modules</H4>
|
|
<P>A module is built <I>-shared </I>with specified load addresses for data (<I>-D</I>) and text (<I>-T</I>). Note that when linking with <I>-shared</I>, unresolved symbols do NOT cause an error since shared objects usually
|
|
rely on rld to resolve symbols at run time. A module is built with <I>-no_unresolved</I> only to print a warning for each undefined symbol. These symbols will be
|
|
later resolved by Core IDE. Note that its usually good to check this list
|
|
since an undefined symbol which should have been in the module, will NOT
|
|
show up as an error at this stage - if a module failed to define one of
|
|
its own symbols, Core IDE will fail at load-time with an unresolved symbol
|
|
error.</P>
|
|
<HR>
|
|
<ADDRESS><A HREF="/mail-form.html">stojanof@engr.sgi.com</A></ADDRESS>
|
|
</BODY>
|
|
</HTML>
|