|
Technical Support Support Resources Product Information | LX51: USING LX51 IN A CODE BANKED APPLICATION WITH STM UPSD3XXX
Information in this article applies to:
QUESTIONI want to use the LX51 linker instead of BL51 in a µVision 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. ANSWERThere are two things to consider when you want to use LX51 in an application that uses code banking with a STMicroelectronics uPSD3xxx device. - 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, µVision 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.
- 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 ALSOLX51: GENERATING HEX FILES FOR BANKED APPLICATIONS Last Reviewed: Thursday, December 15, 2005
|
|