I’m working on application with bank switch. It was working fine up to last week. Then the code was bigger than code area and I must to reorganize modules on banks. It fits now, but LX51 shows:
*** ERROR L258: AJMP IN BANKTABLE OUT OF RANGE, CONFIGURATION ERROR IN L51_BANK.A51 START: 0000H JMPSTART: 80041B0H
What a meanning of both information (START and JMPSTART)?
Manual shows: There is a configuration error in the L51_BANK.A51 (banking configuration) file. Make sure that you are using the current version of this file. Also you should make not modifications to the PUBLIC symbols or segment names of that file.
I don’t understand what happens. I didn’t change L51_BANK.A51. It’s the same than last week.
I’m using on L51_BANK.A51:
?B_NBANKS EQU 2 ?B_MODE EQU 4 ?B_RTX EQU 0 ?B_VAR_BANKING EQU 0 ?B_RST_BANK EQU 0x00
The MAP file shows:
START STOP LENGTH ALIGN RELOC MEMORY CLASS SEGMENT NAME *** COMMON AREA *** 000800H 000F2FH 000730H PAGE INBLOCK CODE ?BANK?SWITCH … 0019B6H 0019C0H 00000BH BYTE UNIT CODE ?BANK?SELECT
I’m using 9.01 version and the areas used are: COMMON: 0000H to 24FDH CODE BANK 0: 2500H to F348H CODE BANK 1: 2500H to 7C7FH
How can I correct this error?
Thanks for any help :)
there is a compiler/linker option NOAJMP which you will need to activate
Erik
Thanks for your reply, Erik.
"there is a compiler/linker option NOAJMP which you will need to activate"
Unfortunately the code doesn't fit on flash if I use NOAJMP.
Is there other solutions?
Why this error occurs on BANKTABLE?
then you are hosed anyway, when the inevitable feature creep happens what will you do?
Yes!
Reviewed your code to see what opportunities exist to reduce its size?
Or, Rather than fight what is, after all, a fundamental limitiation of the 8051 architecture - redirect your effort to porting the application to a more suitable platform...
I don't know YET, but I must to do anything...
"redirect your effort to porting the application to a more suitable platform..."
The new version of this equipment is using MSP430, but I must to update firmware of thousand and thousand of 8051 one. Unfortunately...
Well, about the problem, I think it would work if I could reduce bank table size. How can I do that?
Table size is 0730H. I think isn’t big enough because almost all code is MOV DPTR,#xxx AJMP 0800H / 081BH
I understand the bank table size can be up to 0FFFH (address 0800H to 0FFFH). After that AJMP doesn’t work. Why bank table size can’t expand?
What a meanning of START: 0000H JMPSTART: 80041B0H
How can I use those information in order to resolve the problem?
I changed banks of some modules yesterday. It didn’t work, but I don’t understand why START and JMPSTART have the same values after that change.
An idea: How can I tell to LX51 use LJMP on bank table instead AJMP?
Thanks again