Texas Instruments TMS470R1x manual Example 5±5. Sample Linker Command File, linker2.cmd

Page 53

Getting Started With the Assembler and Linker

The two files, file1 and file2, can be linked together with or without a com- mand file. However, using a command file allows you to configure your memory using the MEMORY and SECTIONS directives:

-The MEMORY directive lets you specify a model of target memory so that you can define the types of memory your system contains and the address ranges they occupy.

-The SECTIONS directive describes how input sections are combined into output sections and specifies where output sections are placed in memory.

You can include the linker options and filenames in the linker command file, or you can enter them on the command line. If you do not include a linker command file, the linker uses a default allocation algorithm. Refer to the TMS470R1x Assembly Language Tools User's Guide for more in- formation about the linker command file and the default allocation algo- rithm.

Example 5±5. Sample Linker Command File, linker2.cmd

/* Specify the System Memory Map */

 

 

 

MEMORY

 

 

 

 

 

 

{

 

 

 

 

 

 

D_MEM

: org = 0x00000000

len = 0x00001000

/* Data Memory

(RAM) */

P_MEM

: org = 0x00001000

len = 0x00001000

/* Program Memory (ROM) */

}

 

 

 

 

 

 

/* Specify the Sections Allocation Into Memory */

 

 

SECTIONS

 

 

 

 

 

 

{

 

 

 

 

 

 

.data

: {} > D_MEM

/* Initialized Data */

 

 

.text

: {} > P_MEM

/* Code

*/

 

 

}

 

 

 

 

 

 

Typing in the following command line using the linker command file shown in Example 5±5 results in the map file shown in Example 5±6.

lnk470 file1 file2 linker2.cmd ±m linker2.map ±o prog.out

Getting Started With the Code Generation Tools

5-5

Image 53
Contents Getting Started Guide SPNU117B TMS470R1x Code Generation Tools Getting Started Guide Important Notice Notational Conventions About This ManualSET CDIR=pathname1 pathname2 Related Documentation From Texas InstrumentsSet PATH=c\tooldir%PATH% Trademarks North America, South America, Central America If You Need AssistanceContents Setting Up the Code Generation Tools With SunOS Defines terms and acronyms used in this book Page Setting Up the Code Generation Tools With DOS or Windows System Requirements Hardware checklistSoftware checklist Installing the tools on DOS systems Installing the Code Generation ToolsInstalling the tools on Windows 3.1x systems InstallAdir Cdir Coption TMP Setting Up the Code Generation EnvironmentSet ADIR=pathname1 pathname2 \tooldirSet COPTION=±qs ±z Setting default shell options CoptionTMS470R1x Assembly Language Tools Users Guide Verifying that the environment variables are set Resetting defined environment variablesSpecifying a temporary file directory TMP Performance Considerations Where to Go From HereChapter TMS470R1x Code Generation Tools \setup.exe These variables are set up in the registry under \tooldir Set COPTION=option1 option2 Set ADIR= Set variablename=Where to Go From Here Setting Up the Code Generation Tools With SunOS Disk space Mounting the CD-ROM Boot ±rMount ±rt hsfs /dev/sr0 /cdrom exit Cd /cdrom/sunos Mount ±rF hsfs /dev/sr0 /cdrom exit Cd /cdrom/cdrom0/sunosUnmounting the CD-ROM Copying the filesUmount /cdrom eject /dev/sr0 exit Cd ejectSetting Up the Code Generation Environment Set path=/yourpathname /tooldir $path Yourpathname /tooldirSetenv Adir ºpathname1 pathname2 . . .º ADIR=ºpathname1 pathname2 . . .º export AdirCDIR=ªpathname1 pathname2 . . .º export Cdir Setenv Cdir ªpathname1 pathname2 . . .ºSetenv Coption º±qs ±zº Setenv TMP º/tempº Reinitializing your shellTMP=º/tempº export TMP Source ~/.cshrcTo verify that the environment variables are set, enter Setting Up the Code Generation Tools on an HP Workstation An HP 9000 Series 700 PA-RISC computer Cd /cdrom/hp Mount ±rt cdfs /dev/dsk/yourcdromdevice /cdrom exitSetting up the software tools using a Korn shell Setting up the software tools using a C shellPATH=tooldir$PATH Umount /cdrom exitSetting Up the Code Generation Environment ADIR=ºpathname1 pathname2 … º export Adir Identifying alternate directories for the assembler AdirSetenv Adir ºpathname1 pathname2 … º Setenv Cdir ªpathname1 pathname2 . . .º Identifying alternate directories for the compiler CdirSpecifying a temporary file directory TMP Unsetenv variable name Where to Go From Here Getting Started With Code Generation Tools Example 5±2. file2.asm Getting Started With the Assembler and LinkerGetting Started With the Code Generation Tools Example 5±4. Output Map File, lnker2.map Example 5±5. Sample Linker Command File, linker2.cmd Entry Point Symbol Memory Configuration Cl470 ±o ±k function Getting Started With the C CompilerCl470 ±o ±mt funtion Cl470 ±s function ±z lnk32.cmd ±o function.out Release Notes Media Contents ±2. Media Contents for PCs Assembler enhancements Release EnhancementsGeneral enhancements Compiler enhancements Page Troubleshooting DOS Systems Troubleshooting in the Protected-Mode Environment PMINFO32.EXE program Error MessagesTable A±1. Pminfo Fields Action Make more memory available and try again Kernel Error MessagesAction Recopy the file from the source media Action Contact technical support Action Reinstall and run the tools on a 386 or later PCAction Rerun the program and/or restart your computer ExecutionMemory is available to non-Windows programs. Under OS/2 Cause this errorIncrease the Dpmimemorylimit in the DOS box set TingsAction Make sure that the filename was spelled correctly DOS/4G Error MessagesAction Free some memory for the DOS/4G application DOS/4G Error Messages Glossary Glossary Glossary B-3 Page Index Index MS-DOS Pminfo Setup.exe For DOS systems For Windows 3.1x systems Windows 95/NT systems Index-6 Important Notice

TMS470R1x specifications

The Texas Instruments TMS470R1x series is an advanced family of microcontrollers designed for automotive and industrial applications, renowned for their robust performance, flexibility, and reliable functionality. Built on a 32-bit RISC architecture, this series provides a powerful computing platform, tailored for embedded control systems.

One of the standout features of the TMS470R1x is its high-performance processing capabilities. Operating at clock speeds of up to 120 MHz, these microcontrollers can handle complex calculations and control algorithms efficiently. The TMS470R1x also incorporates a rich set of peripherals, including timers, pulse width modulation (PWM) modules, and communication interfaces like CAN, SPI, and UART. This versatility makes the series suitable for a wide range of applications, from automotive engine control units to industrial automation systems.

Incorporating advanced memory options, the TMS470R1x features Flash memory sizes ranging from 128 KB to 512 KB, along with RAM ranging from 20 KB to 64 KB. This ample memory is crucial for storing firmware and handling multiple data streams in real time. The microcontrollers also support in-system programming, allowing for easy updates and code modifications during the product lifecycle.

The TMS470R1x series is designed with safety in mind. It adheres to ISO 26262 standards, ensuring high levels of functional safety necessary for automotive systems. Features such as redundancy, error correction, and built-in safety mechanisms ensure operations remain reliable even in fault conditions.

Another important characteristic of the TMS470R1x is its low power consumption, making it ideal for battery-operated devices and equipment. The series employs various power management techniques, including low-power sleep modes, enabling manufacturers to optimize their systems without sacrificing performance.

The integrated Debug and Trace capabilities of the TMS470R1x facilitate effective development and troubleshooting. Engineers can debug their applications in real time, significantly reducing time-to-market and enhancing overall product quality.

In summary, the Texas Instruments TMS470R1x microcontroller series offers a powerful and versatile platform for complex automotive and industrial applications. With its high processing speed, extensive memory options, compliance with safety standards, low power consumption, and robust debugging capabilities, the TMS470R1x is a reliable choice for developers seeking to create innovative and efficient embedded systems. These features combine to position the TMS470R1x series as a leading choice in the expanding field of advanced microcontrollers.