This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Questions about code banking

Hello,

I have the following problem with code banking. I am programming a C8051F124. For security reason I want to put CRC checksums at the end of bank 3. My program is going to be bigger than 32k, so I need to use bank 1 and 2.

I looked at the code banking tutorial for Keil at Cygnal, an in fact it worked fine. But when I try to do the same with my actual firmware. I integrated the same configuration files (L51_BANK.A51, STARTUP.A51) in my program and located a function into bank 1. But now there is a warning: "Warning L19: COMMON CODE SEGMENTS LOCATED AT BANKED AREA". Ususally this should mean my firmware is too big for common area. But this cannot be, because when I put the function into bank 0 everything is fine and no error warning about the program size appears. Unfortunately my firmware is not quite stable when putting it on more than a bank.

I am actually using the A51, C51 and BL51 tools. I also tried Ax51, Cx51 and Lx51, but the linker fails and puts out the message:
"FATAL ERROR L204: INVALID KEYWORD
POS 1510
[...]\STARTUP.OBJ"
which means that the copied Startup file is not accepted by the Linker.

So my question is: does anyone know how to solve my linking problem? Why do I have this strange warning message?

The second problem I have is how to integrate the CRC checksums. With Cygnal IDE I can put data of a HEX-file into two banks. But when I want to use 3, is there a more practical way to load the HEX-file up to the flash besides splitting the code into pieces?

Thanks for your help in advance,
Markus Koenig