User guide
36 DC 900-1338I
Protocol Software Toolkit Programmer Guide
68000 assembler, a linker, and a downloader. The SDS assembler allows you to define
up to 250 relocatable regions, identified by region names. These regions are mapped
into the target memory structure by the linker using a linker specification file. This file
allows you to map various regions to particular addresses and position them in ROM or
RAM as needed. The C compiler automatically splits output into five standard regions
for code, strings, constant data, initialized data, and uninitialized data which are named
code, string, const, data, and ram, respectively. The freeway/icpcode/proto_kit/icpnnnn
1
directory contains a sample make file (makefile) and a sample linker specification file
(
sps_2424.spc, sps_2432.spc, or sps_6000.spc) which can be used to build the
sps_fw_nnnn.mem image.
2.3 Interfacing to the Operating System
The assembly and C language interfaces to OS/Impact are described in the OS/Impact
Programmer Guide. The
freeway/icpcode/proto_kit/src directory contains source code for
a C interface library (
oscif.h and oscif.asm). The routines in this library are written
according to the subroutine calling conventions of the CrossCodeC compiler and can
be easily modified for most other C compilers or high-level language compilers.
The interface routines are necessary when accessing OS/Impact from C language rou-
tines for two reasons. First, OS/Impact’s system calls are accessed through a software
trap instruction, which cannot be generated directly from C. Second, the subroutine
calling conventions of the CrossCodeC compiler (where parameters are passed mainly
on the stack) differ from those of the OS/Impact system calls (where parameters are
passed in registers). The interface routines must perform the necessary translations
before and after OS/Impact system calls.
The
oscif.h file contains C structure definitions for all relevant operating system data
structures.
1. icpnnnn refers to the icp2424, icp2432, or icp6000 directory.