IAR to CCS ASM Perl Script

From Texas Instruments Embedded Processors Wiki

(Redirected from IAR to CCE ASM Perl Script)
Jump to: navigation, search


  • Image:Google-16x16.png Search for an article here:


Introduction

IAR and CCS use different device-specific keywords and variable declarations in MSP430 assembly, hence potentially making migrating MSP430 assembly codes from one IDE to another a time-consuming task. This article introduces two Perl scripts that converts a batch of assembly codes from one form to another. The initial intention for these scripts is to convert a large volume of code examples of a specific MSP430 family (which means same header and linker command file), which are relatively simple, straight-forward and therefore easily verifiable. When extending the use of these scripts to large systems of complex codes, precaution must be taken to ensure the functionality of the converted code.

Running Perl for the Script

Platform The two stand-alone Perl scripts have only been tested on Windows environment, however, similar results should be obtainable on Linux/Unix or OS X environment.In order to execute Perl scripts on Windows, Perl must be installed. Please visit Download Perl for more information on downloading and installing Perl on Windows.

File Organization The required organization of the files in the Perl folder are the following:

  • ccs2iar.pl Converts ccs assembly files (.asm) to iar assembly files (.s43)
  • iar2cce.pl Converts iar assembly files (.s43) to ccs assembly files (.asm)
  •  !readme.txt Contains the names of all assembly files in the folder that need to be converted
  • assembly_file_1.asm (or .s43) File to be converted to .s43 (or .asm) format
  • assembly_file_1.asm (or .s43)
  • ....
  • assembly_file_n.asm (or .s43)
  • msp430xxxx.h Header file for the MSP430 device sub-family
  • lnk_msp430xxxx.cmd Linker command file for the specific MSP430 device


Script Execution The perl scripts take in two parameters: [msp430_device_name] and [msp430_family_name]. These two parameters are used to identify the correct header and linker command files in the same directory to extract device-specific information such as memory addresses and interrupt vector locations.

Download

Please keep track of any modifications made to the script below:

Zip package includes two files iar2cce.pl and ccs2iar.pl File:Iar2ccs.zip

Rev 1.0 [miguel]

  • First draft of the perl script. Needs lots of work, so please contribute!

For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article IAR to CCS ASM Perl Script here.
Leave a Comment

Comments

Comments on IAR to CCS ASM Perl Script


Nbxmike said ...

This tool does not translate AIR "PUBLIC" to CodeComposer ".def"

--Nbxmike 10:57, 24 June 2010 (CDT)