hi friends ,
I m a R & D engineer working for a company i have encountered an amazing problem with my linker . I am using a BL51 Linker and i m using L51_BANK.A51 file for the appropriate settings of my files. i have FOUR files in my source project 1. C_ROOT.A51 2. C_BANK0.A51 3. C_BANK1.A51 4. L51_BANK.A51
i have used B_MODE =0
I filled the two bank files to the optimum limit with 64k of dummy data the linker linked it but the size of HEX FILE that it has generated is of 180KB
now the basic problem is that i have a 128k eeprom only how do i program such a big hex file in that.????!! CAN SOMEBODY HELP ME OUT
You need to understand that the size of the Hex file on your hard drive is not equal to the size of the binary data that it represents.
Infact, the size of the Hex file on your hard drive will be over twice the size of the binary data that it represents!
The Intel Hex file format is described here:
http://www.keil.com/support/docs/1584.htm
read it, and you will see why the file is bigger than the data it represents!
i have encountered an amazing problem with my linker
Not really. You formed wrong expectations based on incorrect understanding of the tools. And while that absolutely should be amazing, looking at the postings we see here, is not.
Your incorrect assumptions are that:
1) a hex file's size equals the size of the memory image it contains. That's wrong by almost a factor of three.
2) code banking and data banking are the same thing. They're not.
Refer to http://www.keil.com/support/docs/3250.htm
Jon
hi friends,
i m experimenting with code banking using a very small code. I m just trying to glow an LED by switching the banks.But, the amount of code generated is very less in size.
Now i want to test my program by filling both the banked files to the optimum capicity of 64 KB. can i do it by using the following code :
DUMMY_DATA: db: "12345678901234567890" db: "12345678901234567890" db: "12345678901234567890" db: "12345678901234567890"
if i repeatedly write this code in my file i will very easily attain 64KB . but, i m not sure, this has to considered as data or code, because for data banking i have to define some extra directives.
It sounds like you are just starting out.
If so, why start with banking?
Have you considered whether it would just be simpler and quicker (which could mean cheaper) to start with a different processor that doesn't need banking?
i m experimenting with code banking
WHY? if you have any idea about writing good code and this is not a case of choosing the wrong processor for the job, the likelyhood of you ever needing code banking is approximately zero.
Because code banking is possible does not mean you HAVE to use it.
Erik
And that's rather obviously the wrong thing for you to do, at this time. You should be sitting in a quiet room with a big pot of tea and studying the manual, not "experimenting" with things you don't know heads nor tails of.
but, i m not sure, this has to considered as data or code
So find out before you jump even deeper into completely unknown waters. If you don't even know the difference between code and data, how do you ever expect to grasp the difference between code and data banking?