Creating Single Section for Boot Load When.const Section is Defined

Similar documents
Dual Access into Single- Access RAM on a C5x Device

Implementation of a CELP Speech Coder for the TMS320C30 using SPOX

TMS320C5x Memory Paging (Expanding its Address Reach)

Bit-reversed Addressing without Data Alignment on the C3x

Hardware UART for the TMS320C3x

Reading a 16-Bit Bus With the TMS320C5x Serial Port

TMS320 DSP DESIGNER S NOTEBOOK. Serial ROM Boot APPLICATION BRIEF: SPRA233. Alex Tessarolo Digital Signal Processing Products Semiconductor Group

C Routines for Setting Up the AIC on the TMS320C5x EVM

TMS320 DSP DESIGNER S NOTEBOOK. Multipass Linking APPLICATION BRIEF: SPRA257. Tom Horner Digital Signal Processing Products Semiconductor Group

TMS320C5x Interrupt Response Time

Speech Control for Virtual Instruments Using the TMS320C30 DSP

Writing TMS320C8x PP Code Under the Multitasking Executive

Performance Analysis of Line Echo Cancellation Implementation Using TMS320C6201

SN5446A, 47A, 48, SN54LS47, LS48, LS49 SN7446A, 47A, 48, SN74LS47, LS48, LS49 BCD-TO-SEVEN-SEGMENT DECODERS/DRIVERS

Getting Started Guide: TMS-FET470A256 IAR Kickstart Development Kit

Debugging Shared Memory Systems

Faster Scan Conversion Using the TMS320C80

Techniques for Profiling on ROM-Based Applications

Nested Loop Optimization on the TMS320C6x

SN54BCT760, SN74BCT760 OCTAL BUFFERS/DRIVERS WITH OPEN-COLLECTOR OUTPUTS

The PCMCIA DSP Card: An All-in-One Communications System

27 - Line SCSI Terminator With Split Reverse Disconnect

SN54F38, SN74F38 QUADRUPLE 2-INPUT POSITIVE-NAND BUFFERS WITH OPEN-COLLECTOR OUTPUTS


As of October 1, 1998, our address is:

EV Evaluation System User Guide. Contents. Kit Contents. Introduction

Using the TMS320C5509 USB Bootloader

1998 Technical Documentation Services

Implementing JTAG Testing with MPEG2Lynx

Using the TMS320 DSP Algorithm Standard in a Dynamic DSP System

As of October 1, 1998, our address is:

System Testability Using Standard Logic

SN54ALS32, SN54AS32, SN74ALS32, SN74AS32 QUADRUPLE 2-INPUT POSITIVE-OR GATES

OMAP SW. Release Notes. OMAP Software Tools OST version 2.5 Release. 16xx/1710/242x platforms. Document Revision: 2.5 Release

SN54ALS04B, SN54AS04, SN74ALS04B, SN74AS04 HEX INVERTERS

Connecting TMS320C54x DSP with Flash Memory

~ > TEXAS~ SN5427, SN54LS27, SN7427, SN74LS27 TRIPLE 3-INPUT POSITIVE-NOR GATES. Vee INSTRUMENTS POST OFOICE BOX OALLAS.

A Multichannel/Algorithm Implementation on the TMS320C6000 DSP

TMS320C62x, TMS320C67x DSP Cache Performance on Vocoder Benchmarks

Using LDOs and Power Managers in Systems With Redundant Power Supplies

Using the bq3285/7e in a Green or Portable Environment

SN54ALS74A, SN54AS74, SN74ALS74A, SN74AS74 DUAL D-TYPE POSITIVE-EDGE-TRIGGERED FLIP-FLOPS WITH CLEAR AND PRESET

bq2056 Designed to Go Parts List General Description bq2056 Charge Algorithm Current Voltage

SN54ALS573C, SN54AS573A, SN74ALS573C, SN74AS573A OCTAL D-TYPE TRANSPARENT LATCHES WITH 3-STATE OUTPUTS

74AC11139 DUAL 2-LINE DECODER/DEMULTIPLEXER

SN75240 DUAL UNIVERSAL SERIAL BUS PORT TRANSIENT SUPPRESSOR SLLS266 FEBRUARY 1997

WM8805_6152_DS28_EV1_REV3 Schematic and Layout. WM8805_6152_DS28_EV1_REV3 Schematic and Layout. Customer Information 1 of 18 June 2007, Rev 3.

SN54ALS645A, SN54AS645, SN74ALS645A, SN74AS645 OCTAL BUS TRANSCEIVERS WITH 3-STATE OUTPUTS

DatasheetDirect.com. Visit to get your free datasheets. This datasheet has been downloaded by

Using Boundary Scan on the TMS320VC5420

Constant Temperature Chamber ATITRS1. Figure 1. Top View. Figure 2. Front View

SN74ALS533A, SN74AS533A OCTAL D-TYPE TRANSPARENT LATCHES WITH 3-STATE OUTPUTS SDAS270 DECEMBER 1994

Developing Plug-and-Play COM Ports using TI Plug-and-Play Controllers

Understanding the TMS320C54x Memory Map and Examining an Optimum C5000 Memory Interface

Application Report. Mixed Signal Products SLOA028

WM DS28-EV1-REV2 Schematic and Layout WOLFSON DEVICE(S):

Increase Current Drive Using LVDS

74AC11240 OCTAL BUFFER/LINE DRIVER WITH 3-STATE OUTPUTS

C Fast RTS Library User Guide (Rev 1.0)

INVENTORY REPORT EXTENSION. User Guide. User Guide Page 1

IT900 STK4 (Starter Kit)

Impact of JTAG/ Testability on Reliability

WM DS28-EV2-REV1 Schematic and Layout

CUSTOM GOOGLE SEARCH. User Guide. User Guide Page 1

WM CS20-M-REV2

WM DT16-EV1. Customer Standalone Board WOLFSON DEVICE(S): DATE: August 2009

EV Software Rev Evaluation System User Guide. Introduction. Contents. Hardware and Software Setup. Software Installation

WM DT20-EV1. Customer Standalone Board WOLFSON DEVICE(S): DATE: September 2009

DV2003S1. Fast Charge Development System. Control of On-Board P-FET Switch-Mode Regulator. Features. Connection Descriptions. General Description

MC1488, SN55188, SN75188 QUADRUPLE LINE DRIVERS

12MHz XTAL USB DAC PCM2702E

A DSP/BIOS AIC23 Codec Device Driver for the TMS320C5510 DSK

INVENTORY HISTORY REPORT EXTENSION. User Guide. User Guide Page 1

Voltage Translation (5 V, 3.3 V, 2.5 V, 1.8 V), Switching Standards, and Bus Contention

ADD RELATED PRODUCTS TO CART. User Guide. User Guide Page 1

A DSP/BIOS AIC23 Codec Device Driver for the TMS320C6416 DSK

Recent Advancements in Bus-Interface Packaging and Processing

Logic Solutions for IEEE Std 1284

Designed to GO... Universal Battery Monitor Using the bq2018 Power Minder IC. Typical Applications. Features. Figure 1. bq2018 Circuit Connection

SN54LVTH16240, SN74LVTH V ABT 16-BIT BUFFERS/DRIVERS WITH 3-STATE OUTPUTS

Memory Allocation Techniques in System with Dynamic Swapping of Application Codes

Texas Instruments Voltage-Level-Translation Devices

Upgrading Applications to DSP/BIOS II

GUEST CHECKOUT TO REGISTERED CUSTOMERS. User Guide. User Guide Page 1

MCS9865 DOS Driver Installation User Manual

Texas Instruments Solution for Undershoot Protection for Bus Switches

TM124MBK36C, TM124MBK36S BY 36-BIT TM248NBK36C, TM248NBK36S BY 36-BIT DYNAMIC RAM MODULE

Converting Firmware Projects to CoIde and IAR Embedded Workbench for ARM

L293 QUADRUPLE HALF-H DRIVER

TPA4861 Audio Power Amplifier Evaluation Module DATA MANUAL: SLOU004

NO P.O. BOXES ALLOWED AT CHECKOUT. User Guide. User Guide Page 1

GUEST CHECKOUT TO REGISTERED CUSTOMERS

Analog Technologies. Laser Driver Load Assembly ATLS212DLD1.0 Load Assembly for Laser Drivers

AN LPC1700 secondary USB bootloader. Document information. LPC1700, Secondary USB Bootloader, ISP, IAP

HIDE PRODUCT PRICE. User Guide. User Guide Page 1

CRD User Guide. Table of Contents. 1 Initial Configuration of the CRD The Control Console

FlashBurn: A DSK Flash Memory Programmer

LPGD SBDN GND 4VR PZVS VLMU VLML PZVO PIZO. 3 GND Signal ground Signal ground pin. Connect ADC and DAC grounds to here.

TMS370 Family C Source Debugger User s Guide

The TMS320 DSP Algorithm Standard

Transcription:

Creating Single Section for Boot Load When.const Section is Defined APPLICATION REPORT: SPRA409 Jeff Axelrod Digital Signal Processing Solutions May 1998

IMPORTANT NOTICE Texas Instruments (TI) reserves the right to make changes to its products or to discontinue any semiconductor product or service without notice, and advises its customers to obtain the latest version of relevant information to verify, before placing orders, that the information being relied on is current. TI warrants performance of its semiconductor products and related software to the specifications applicable at the time of sale in accordance with TI s standard warranty. Testing and other quality control techniques are utilized to the extent TI deems necessary to support this warranty. Specific testing of all parameters of each device is not necessarily performed, except those mandated by government requirements. Certain application using semiconductor products may involve potential risks of death, personal injury, or severe property or environmental damage ( Critical Applications ). TI SEMICONDUCTOR PRODUCTS ARE NOT DESIGNED, INTENDED, AUTHORIZED, OR WARRANTED TO BE SUITABLE FOR USE IN LIFE-SUPPORT APPLICATIONS, DEVICES OR SYSTEMS OR OTHER CRITICAL APPLICATIONS. Inclusion of TI products in such applications is understood to be fully at the risk of the customer. Use of TI products in such applications requires the written approval of an appropriate TI officer. Questions concerning potential risk applications should be directed to TI through a local SC sales office. In order to minimize risks associated with the customer s applications, adequate design and operating safeguards should be provided by the customer to minimize inherent or procedural hazards. TI assumes no liability for applications assistance, customer product design, software performance, or infringement of patents or services described herein. Nor does TI warrant or represent that any license, either express or implied, is granted under any patent right, copyright, mask work right, or other intellectual property right of TI covering or relating to any combination, machine, or process in which such semiconductor products or services might be or are used. Copyright 1998, Texas Instruments Incorporated

TRADEMARKS TI is a trademark of Texas Instruments Incorporated. Other brands and names are the property of their respective owners.

CONTACT INFORMATION US TMS320 HOTLINE (281) 274-2320 US TMS320 FAX (281) 274-2324 US TMS320 BBS (281) 274-2323 US TMS320 email dsph@ti.com

Contents Abstract...7 Product Support...8 World Wide Web...8 Introduction... 9 Included Code and Files... 11 Partial Link Command File... 12 Final Link Command File... 13 Modification of boot.asm File... 15

Figures Figure 1. Address Location Diagram... 10 Tables Table 1. Included files... 11

Creating Single Section for Boot Load When.const Section is Defined Abstract The generation of a.const section that must be included in code for on-chip boot load poses a special problem when linking. In order to include the.const section data it must be grouped with all other needed sections to create a single section to be loaded by the on-chip boot loader. After the code is loaded, the.const section data must then be copied to a run location in data memory before execution of compiled code. Therefore the.const section must have both a load address, where it is placed in program memory as a result of the on-chip boot load, and a run address, where it must be copied before execution of the compiled code. Unfortunately, in the linker there is no way to specify a different run address for an input section that is being included within the body of another output section. This document discusses the solution to this issue. Included in this application report are the implementation instructions and code examples for resolving this. Creating Single Section for Boot Load When.const Section is Defined 7

Product Support World Wide Web Our World Wide Web site at www.ti.com contains the most up to date product information, revisions, and additions. Users registering with TI&ME can build custom information pages and receive new product updates automatically via email. 8 Creating Single Section for Boot Load When.const Section is Defined

Introduction Code for this example can be obtained via the Internet by downloading and executing the following self-extracting file: ftp://ftp.ti.com/pub/tms320bbs/c2xxfiles/romcexam.exe The generation of a.const section that must be included in code for on-chip boot load poses a special problem when linking. In order to include the.const section data it must be grouped with all other needed sections to create a single section to be loaded by the on-chip boot loader. After the code is loaded, the.const section data must then be copied to a run location in data memory before execution of compiled code. Therefore the.const section must have both a load address, where it is placed in program memory as a result of the on-chip boot load, and a run address, where it must be copied before execution of the compiled code. Unfortunately, in the linker there is no way to specify a different run address for an input section that is being included within the body of another output section. We'd like to be able to do the following, but this is not a valid linker command: boot_sec : { *(.text) *(.const): run = 0x800 Creating Single Section for Boot Load When.const Section is Defined 9

Figure 1. Address Location Diagram Program Memory Run-time space EPROM (boot_sec) Data Memory run-time.const section Copy of.text section Copy of.const section A different approach to setting both a load and run address for this section is therefore required. This is accomplished by using partial linking. In a partial link all of the data for the.const sections are grouped together into a separate named section. This separate section contains the raw data and must be of the same size as the.const section. Two sections of the same size containing the same data are required to establish a run address and a load address for these data. In the partial link all of the.const sections are gathered together into a single output section. The symbol names are hidden to prevent duplicate symbol definitions on the final link. The -g option reserves the necessary symbols for the load address and the length of the.const section that is to be copied. 10 Creating Single Section for Boot Load When.const Section is Defined

Included Code and Files Table 1. Included files This package includes a complete example C program and the necessary DOS batch files to build the object files and perform the two link stages. The dsphex utility is also called at the end of the batch file to generate an ASCII ROM image. Make sure you are using version 6.63 or greater of the dsphex utility. The previous versions did not generate boot ROMs correctly. File Description boot.asm Boot loader extracted from rts.src and modified to copy the.const section from its load-time address to run-time address. const.cmd Linker command file for the first partial link stage. Csample.bat DOS batch file to build the complete application including dsphex ASCII ROM image. Csample.c Example C source that includes global initialized data in constant array x. Csample.cmd Linker command file for final link stage. Cvectors.asm Reset vector file which tells the device after boot loader completes to jump to _c_int0 (C initialization / boot loader) To use the example, build the executable by typing csample.bat from a DOS command prompt, then load the debugger and type "go main2" at the prompt. In a UNIX environment examine the.bat file and execute the commands found inside. The sections that follow show how to perform the required modifications to existing programs. Creating Single Section for Boot Load When.const Section is Defined 11

Partial Link Command File Create a partial linker command file as shown: -r /* Perform partial link, retaining relocation information */ -h /* Hide symbol names to prevent duplicate definition errors on final link */ boot.obj csample.obj /* List all.obj files to be included in the */ /* Link. THESE MUST BE SPECIFIED IN SAME ORDER AS THEY WILL APPEAR IN THE FINAL LINK */ -m part.map -o const.out /* Name output file to be included in final link */ -l rts2xx.lib -g const_load -g const_length SECTIONS { nconst: { const_load =.; *(.const) const_length =. - const_load; } /* COMBINE ALL.const SECTIONS INTO A NEWLY NAMED SECTION */ 12 Creating Single Section for Boot Load When.const Section is Defined

Final Link Command File At the final link we are going to throw away all sections defined in the output file created by the partial link (const.out in the example above), except for the renamed section "nconst". This we will use to provide the data to be loaded as part of the on-chip boot load. /* C203 Linker command file for generating single boot section */ /* combining.text and.cinit sections */ /* NOTE: Ignore the following linker errors: >> warning: absolute symbol cinit being redefined >> warning: output file has no.text section */ -c -m csample.map -o csample.out csample.obj boot.obj -l rts2xx.lib /* Hack to make it possible to go main by typing go main2 in the debugger */ _main2=_main; MEMORY { PAGE 0: PROG: origin=0x0000, LENGTH=0x8000 EPROM: origin=0x8000, LENGTH=0x8000 PAGE 1: DATA: origin=0x800, LENGTH=0x4000 } SECTIONS { Creating Single Section for Boot Load When.const Section is Defined 13

/* This dummy section is to remove all sections from const.out except for the.const section. This is necessary, since they will be linked in at this stage, to prevent each of these sections from being included twice. If any other sections are used that are linked in at the partial link stage, they must be entered here also. */ dummy(dsect) : { const.out(.text) const.out(.cinit) const.out(.stack) const.out(.data) const.out(.sysmem) const.out(.bss) const.out(.switch) }.const(noload): { const_run =.; *(.const) } load = DATA PAGE 1 boot_sec: { /* vectors must be included first so they fall into program memory location 0 */ *(.vectors) boot.obj(.text) /* include.text section */ *(.text) /* include.const section */ *(nconst) /* include raw data from partial link */ /* Set start address for C init table */ cinit =.; /* Include all cinit sections */ *(.cinit) /* Reserve a single space for the zero word to mark end of cinit */.+=1; } } fill = 0x0000, /* Make sure fill value is 0 */ load = PROG PAGE 0.data : {} > DATA PAGE 1.bss : {} > DATA PAGE 1.const : {} > DATA PAGE 1.sysmem : {} > DATA PAGE 1.stack : {} > DATA PAGE 1 14 Creating Single Section for Boot Load When.const Section is Defined

Modification of boot.asm File The final section of the solution is to change the code in boot.asm to allow the copy of the.const section at run-time. This has already been performed and is included in this distribution. However, to do this yourself: 1) Extract the boot routine from rts.src file: dspar x rts.src boot.asm 2) Edit boot.asm: change CONST_COPY.set 0 to CONST_COPY.set 1 3) Search for.if CONST_COPY and remove the lines:.sect ".cmark".label const_load 4) Re-assemble boot.asm: dspa [options] boot.asm This completes the solution. Creating Single Section for Boot Load When.const Section is Defined 15