Getting Started With the C Compiler

3)Also by default, the shell creates a COFF object file as output; however, if you use the ±z option, the output is an executable object module. The following examples show two ways of creating an executable object module:

a)The example in step 2 creates an object file called function.obj. To create an executable object module, run the linker separately by invoking lnk470 as in the following example:

lnk470 ±c function.obj lnk32.cmd ±o function.out ±l rts32.lib

The ±c linker option tells the linker to observe the C language linking conventions. The linker command file, lnk32.cmd, is shipped with the code generation tools. The ±o option names the output module, function.out; if you don't use the ±o option, the linker names the output module a.out. The ±l option names the runtime-support library. You must have a runtime-support library before you can create an execut- able object module; the prebuilt runtime-support libraries rts32.lib and rts16.lib are included with the code generation tools.

b)In this example, use the ±z shell option, which tells the shell program to run the linker. The ±z option is followed by linker options.

cl470 ±o function.c ±z lnk32.cmd ±o function.out ±l rts32.lib

For more information on linker commands, see the Linker Description chapter of the TMS470R1x Assembly Language Tools User's Guide.

4)The TMS470R1x compiler package also includes an interlist utility. This program interlists the C source statements as comments in the assembly language compiler output, allowing you to inspect the assembly language generated for each line of C. To run the interlist utility, invoke the shell pro- gram with the ±s option. For example:

cl470 ±s function ±z lnk32.cmd ±o function.out

The output of the interlist utility is written to the assembly language file created by the compiler. (The shell ±s option implies ±k; that is, when you use the interlist utility, the assembly file is automatically retained.)

5-8

Page 56
Image 56
Texas Instruments TMS470R1x manual Cl470 ±s function ±z lnk32.cmd ±o function.out

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.