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

Regarding bank switching

I am using mentor graphics 8051 based 8051EW device. I am using code banking (16 banks). After running my code i am using LX51 comman to link the lnk fie and than "OHX51" to convert the obj file to hex and than "hexbin2" to convert hex to bin. In my code i have 5 files each conatning one function and a main. c file. When i palce the main.c and all the other 5 files in common bank, the following is the size of file ifound
obj format file -> 20 KB size after converting
hex file--> 2 kb size and after coverting hex to bin
bin file--> 1 kb size.

But if i place main.c in common bank and each of the five files in five seperate banks i.e bank1, bank2 so on than following is the file size odserved

obj format file -->29kb
hex file --> 6kb
bin file --> 193 kb can anone please tell me why is there such tremendous increase in the fianl executable file from 1 kb to 193 kb even though the bank switching code tht is inserted by complier is of afew bytes. Immediate help is highly appreciated

Parents
  • Isn't that described in the Manuals?

    I've never used the C51 banking - in my opinion, you should not be starting out with an 8051 if you know that you're going to need banking!

    Anyhow, it's a different question - so start a new thread.

    But be sure to study those Manuals first - and Application Notes, Examples, etc - you are far more likely to receive help when you show that you have done your basic groundwork!

Reply
  • Isn't that described in the Manuals?

    I've never used the C51 banking - in my opinion, you should not be starting out with an 8051 if you know that you're going to need banking!

    Anyhow, it's a different question - so start a new thread.

    But be sure to study those Manuals first - and Application Notes, Examples, etc - you are far more likely to receive help when you show that you have done your basic groundwork!

Children