NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.
IAR to CCS ASM Perl Script
Software: IAR to CCS ASM Perl Script | |
---|---|
Hardware supported | ,|x|Supports hardware::x}} |
Software environment(s) | ,|x|Runs in software environment::x}} |
Status | Has status::Alpha |
Introduction[edit]
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[edit]
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[edit]
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!