|
|||||||||||
Technical Support Support Resources
Product Information |
LX51: Generating Hex Files for Banked ApplicationsInformation in this article applies to:
QUESTIONI have a code banking application that was created using the BL51 Linker. Now, I am porting the program to use the new extended LX51 Linker. The HEX conversion what was done by OC51 and OH51 in the past generated a single HEX file for each code bank. How can we do that with the OHX51 HEX converter? ANSWERBy default, OHX51 generates a single HEX file that contains all code banks. OHX51 can be used to generate a HEX file or files that will support virtually all hardware schemes. Following are several examples: 64K Code Bank with Common Area Repeated in Each BankHardware examples for this scheme is provided in the LX51 User's Guide, Banking with Four 64KB Banks and Banking with XDATA Port. For the OHX51 Options, you must specify the HEX-386 File Format (selected in µVision under Options - Output - HEX Format: HEX-386). This causes OHX51 to generate an Intel HEX-386 File which is configured as follows:
You may use this type of file with most device programmers. 32K Common Area Plus Multiple 32K Code BanksA hardware example for this scheme is provided in the Lx51 User's Guide, under Banking with Common Area. For the OHX51 Options, you must specify the HEX-386 File Format and the MERGE32K directives (selected in µVision under Options - Output - HEX Format: HEX-386 and MERGE32K). This causes OHX51 to generate an Intel HEX-386 File which is configured as follows:
You may use this type of file with most device programmers. Note that Code Bank 0 may not be used with the MERGE32K option because Bank 0 doesn't exist anymore. At this point any file assigned to Bank 0 would not have code in the generated hexfile. For more information, refer to the Generating HEX Files for Banked Applications in the See Also section. Individual HEX File for Each Code BankIf you require a single HEX file for each code bank, you must create a batch program that runs OHX51 once for each code bank. The contents of the batch file will be similar to:
This effectively generates the same output files as the BL51 Linker using the OC51 and OH51 utilities. Note: OHX51 versions from 1.43 - 1.45 (= PK51 9.51 - 9.56) do not support negative offset values. Update to version 1.46 or higher (PK51 9.57 or higher) if you want to use a negative offset or use tools like srec_cat.exe (see links below) to move a hex file to a different address range. MORE INFORMATIONSEE ALSOLast Reviewed: Thursday, February 25, 2021 | ||||||||||
|
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.