SPNU118Y September 1995 – February 2020
/****************************************************************************/
/* Scenario 2 Link Command */
/* */
/* Usage: armlnk <obj files...> -o <out file> -m <map file> lnk16.cmd */
/* armcl <src files...> -z -o <out file> -m <map file> lnk16.cmd */
/* */
/* Description: This file is a sample command file that can be used */
/* for linking programs built with the TMS470 C */
/* compiler. Use it as a guideline; you may want to change */
/* the allocation scheme according to the size of your */
/* program and the memory layout of your target system. */
/* */
/* Notes: (1) You must specify the directory in which rts16.lib is */
/* located. Either add a "-i<directory>" line to this */
/* file, or use the system environment variable C_DIR to */
/* specify a search path for libraries. */
/* */
/* (2) If the runtime-support library you are using is not */
/* named rts16.lib, be sure to use the correct name here. */
/****************************************************************************/
-m example2.map
/* SPECIFY THE SYSTEM MEMORY MAP */
MEMORY
{
I_MEM : org = 0x00000000 len = 0x00000020 /* INTERRUPTS */
D_MEM : org = 0x00000020 len = 0x00010000 /* DATA MEMORY (RAM) */
P_MEM : org = 0x00010020 len = 0x00100000 /* PROGRAM MEMORY (ROM) */
}
/* SPECIFY THE SECTIONS ALLOCATION INTO MEMORY */
SECTIONS
{
secA: load = 0x3000
secB: load = 0x20
}
You must create a hex conversion command file to generate a hex output with the correct addresses and format for the EPROM programmer. The EPROM programmer in this scenario has the following system requirements:
The EPROM programmer does not require a ROM image, so the addresses in the input hex output file do not need to be contiguous.
Because memwidth and romwidth have the same value, only one output file is generated (the number of output files is determined by the ratio of memwidth to romwidth). The output file is named with the -o option.
A ROMS directive is used in this scenario since the paddr option is used to relocate both secA and secB.
The hex conversion command file for Scenario 2 is shown in Example 5. This command file uses the following options to select the requirements of the system:
Option | Description |
---|---|
-i | Create Intel format |
-map example2.mxp | Generate example2.mxp as the map file of the conversion |
-o example2.hex | Name example2.hex as the output file |
-memwidth 8 | Set EPROM system memory width to 8 |
-romwidth 8 | Set physical ROM width to 8 |