ARM Technical Support Knowledge Articles

USING LX51 IN A CODE BANKED APPLICATION WITH STM UPSD3XXX

Applies to: LX51 Linker/Locator

Answer


Information in this article applies to:


QUESTION

I want to use the LX51 linker instead of BL51 in a uVision project for a STMicroelectronics uPSD3xxx device. This application uses code banking. When I select Use Extended Linker (LX51) instead of BL51 in the Options for Target - Device dialog, I get an OHX51 error message and downloading this application fails. What do I need to do to make the project work with LX51.

ANSWER

There are two things to consider when you want to use LX51 in an application that uses code banking with a STMicroelectronics uPSD3xxx device.

  1. You need to select HEX-386 in the Options for Target - Output - HEX Format because the address range of the resulting HEX file will be bigger than 64K. When LX51 is used, uVision generates one HEX file for all code banks rather than a separate HEX file for each code bank. The link below explains how the code banks are mapped into the HEX file when using the LX51.
  2. The PSDsoft project needs to be adapted to merge a different HEX file containing different address ranges with the PSD configuration.
    The following example shows a possible PSDsoft merge configuration when BL51 or LX51 is used. Let's assume the common area should be located in Flash sector CSBOOT0-3 (0x0000-0x7FFF) and the code banks in Flash sector FS0-7 (0x8000 - 0xFFFF).
    PSDsoft Merge settings with BL51:
      Memory     File          File          File Name
      Select     Address       Address
      Name       Start (hex)   Stop (hex)
      FS0         008000        00FFFF      ..MyApp.h00
      FS1         008000        00FFFF      ..MyApp.h01
      FS2         008000        00FFFF      ..MyApp.h02
      FS3         008000        00FFFF      ..MyApp.h03
      FS4         008000        00FFFF      ..MyApp.h04
      FS5         008000        00FFFF      ..MyApp.h05
      FS6         008000        00FFFF      ..MyApp.h06
      FS7         008000        00FFFF      ..MyApp.h07
    
      CSBOOT0     000000        001FFF      ..MyApp.h00
      CSBOOT1     002000        003FFF      ..MyApp.h00
      CSBOOT2     004000        005FFF      ..MyApp.h00
      CSBOOT3     006000        007FFF      ..MyApp.h00
    
    PSDsoft Merge settings with LX51:
      Memory     File          File          File Name
      Select     Address       Address
      Name       Start (hex)   Stop (hex)
      FS0         008000        00FFFF      ..MyApp.hex
      FS1         018000        01FFFF      ..MyApp.hex
      FS2         028000        02FFFF      ..MyApp.hex
      FS3         038000        03FFFF      ..MyApp.hex
      FS4         048000        04FFFF      ..MyApp.hex
      FS5         058000        05FFFF      ..MyApp.hex
      FS6         068000        06FFFF      ..MyApp.hex
      FS7         078000        07FFFF      ..MyApp.hex
    
      CSBOOT0     000000        001FFF      ..MyApp.hex
      CSBOOT1     002000        003FFF      ..MyApp.hex
      CSBOOT2     004000        005FFF      ..MyApp.hex
      CSBOOT3     006000        007FFF      ..MyApp.hex
    
      

SEE ALSO

LX51: GENERATING HEX FILES FOR BANKED APPLICATIONS

Article last edited on: 2005-12-15 09:33:43

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential