The assembly code is as following
ConfigurationDscr:
db DSCR_CONFIG_LEN ;; Descriptor length
db DSCR_CONFIG ;; Descriptor type
db (ConfigurationDscrEnd-ConfigurationDscr) mod 256 ;; Total Length (LSB)
db (ConfigurationDscrEnd-ConfigurationDscr) / 256 ;; Total Length (MSB)
ConfigurationDscrEnd:
The expression (ConfigurationDscrEnd-ConfigurationDscr) will cause invalid relocatable segment in LX51 but not in BL51. Is there any good solution ?
You should check the SEGMENT definition or use A51 to translate this file.
When you define the SEGMENT with:
?CO?MYSEG SEGMENT CODE AT 0x2000
It should work in AX51 too.
See also: http://www.keil.com/support/man/docs/a51/a51_st_segment.htm
The expression (ConfigurationDscrEnd-ConfigurationDscr) will cause invalid relocatable segment in LX51 but not in BL51. Is there any good solution ? I guess you have ajmp or acall in your code. If one of the linkers locate it just a tad differently, this error could pop up.
Erik