Technical Note TN8000.23 Converting binary to ROM TN8000.23 Technical Note Converting a binary file to a .rom file for industrial programmers Rev 1 February 2006 www.semtech.com 1 Technical Note TN8000.23 Converting binary to ROM Table of Contents 1 2 3 4 Introduction ................................................................................................................................................ 3 axe2rom ...................................................................................................................................................... 3 Double speed products ............................................................................................................................. 3 axe2rom usage........................................................................................................................................... 4 © Semtech 2006 www.semtech.com 2 Technical Note TN8000.23 Converting binary to ROM 1 INTRODUCTION This document explains how to convert a binary file generated by the XE8000 tools to a ROM file in order to make it compatible with industrial programmers such as BPMicro BP-XXX or Phyton ChipProg+. Note: When you use RIDE and the XELoader to program with an XE8000MP, this utility is not needed. 2 AXE2ROM The utility axe2rom.exe performs the following gnu commands on the binary files: c816-objcopy.exe <file>.axe –target = <file>.srec c816-srec2rom.exe <file>.srec -prog -o <file>.rom Note that *.axe is equivalent to *.bin 3 DOUBLE SPEED PRODUCTS For the products like XE88LC07A and XE88LC02A in 4kInstruction mode the useful memory is 4k instructions but physically the whole flash array is used, the instructions are read in parallel. The axe2rom.exe utility performs one more action that consists of doubling the code. See the example below with a 3 instruction code: 0000 0001 0002 0003 … … 0ffe 0fff 1000 1001 1002 0033FFFB <- First line of your code 0033F82C 0033F82C 00000000 00000000 00000000 0033FFFB <- First line of your code (copied) 0033F82C 0033F82C The code of the line 0000h is copied to line 1000h (4096d). Both lines are read at the same time when the microcontroller is used in double speed mode. © Semtech 2006 www.semtech.com 3 Technical Note TN8000.23 Converting binary to ROM 4 AXE2ROM USAGE The utility axe2rom.exe is a command line executable see the usage instruction below: C:\XEMICS>axe2rom Usage: axe2rom [-t target_name] | [input_file] | Converts a binary file (*.axe or *.bin) to *.rom -h : Display this information. -t target_name : Specifies the target chip to be programmed List of possible targets (please respect the syntax): xe88LC01a, xe88LC02-4kI, xe88LC02-8kI, xe88LC03, xe88LC05a xe88LC06a, xe88LC07a, xe1283-4kI, xe1283-8kI, input_file : Input_file to convert in *.rom Input file formats : *.axe, *.bin *** axe2rom Version V 1.0 Release date Dec 20 2004 *** Copyright (c) 1997-2004, XEMICS SA, Monruz 2, CH-2000 Neuchatel, Switzerland C:\XEMICS> Converting an *.axe file to an *.rom file is as follow: C:\XEMICS>axe2rom -t xe88lc02-4ki file.axe Generated file : file.rom (2305 instructions) C:\XEMICS> © Semtech 2006 www.semtech.com 4 Technical Note TN8000.23 Converting binary to ROM © Semtech 2006 All rights reserved. Reproduction in whole or in part is prohibited without the prior written consent of the copyright owner. The information presented in this document does not form part of any quotation or contract, is believed to be accurate and reliable and may be changed without notice. No liability will be accepted by the publisher for any consequence of its use. Publication thereof does not convey nor imply any license under patent or other industrial or intellectual property rights. Semtech. assumes no responsibility or liability whatsoever for any failure or unexpected operation resulting from misuse, neglect improper installation, repair or improper handling or unusual physical or electrical stress including, but not limited to, exposure to parameters beyond the specified maximum ratings or operation outside the specified range. SEMTECH 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 SEMTECH PRODUCTS IN SUCH APPLICATIONS IS UNDERSTOOD TO BE UNDERTAKEN SOLELY AT THE CUSTOMER’S OWN RISK. Should a customer purchase or use Semtech products for any such unauthorized application, the customer shall indemnify and hold Semtech and its officers, employees, subsidiaries, affiliates, and distributors harmless against all claims, costs damages and attorney fees which could arise. Contact Information Taiwan Korea Shanghai Japan Switzerland Tel: 886-2-2748-3380 Fax: 886-2-2748-3390 Tel: 82-2-527-4377 Fax: 82-2-527-4376 Tel: 86-21-6391-0830 Fax: 86-21-6391-0831 Tel: 81-3-6408-0950 Fax: 81-3-6408-0951 United Kingdom France Germany Tel: 41-32-729-4000 Fax: 41-32-729-4001 Tel: 44-1794-527-600 Fax: 44-1794-527-601 Tel: 33-(0)169-28-22-00 Fax: 33-(0)169-28-12-98 Tel: 49-(0)8161-140-123 Fax: 49-(0)8161-140-124 Semtech International AG is a wholly-owned subsidiary of Semtech Corporation, which has its headquarters in the U.S.A © Semtech 2006 www.semtech.com 5