I am using 8051F120 having 127KB Program memory, theoretically. I have written 4 *.C files residing in each bank. The length of the code in Bank1 and Bank2 is less than 32KB (observing the list file). But, instead of this, the linker gives an address space overflow for both the banks. Kindly assist.
Dhaval Solanki
Doesn't stop you voicing your opinion that there may be A Better Way, though - does it?
IMO, one sure fire way of alienating a development department who may have spent a lot of time really understanding a situation is for a consultant new to the task to come in and say "you're bodging it" and "I wouldn't do it that way".
There are always ways to alienating yourself. But being silent instead of bringing up potential issues just means they pay for a consultant that doesn't deliver the full knowledge/experience.
While it is obviously not a good idea to cut someone at the knees by asking who was the fool to select a specific processor, there are lots of ways to point out the potential problems with the selected route and wonder if alternative routes - such as using a (similarly priced) processor with a large linear address space - would be an option to speed up the total development times and cut problem complexity.
Many times, people just don't realize the implications of having a processor with 256kB of flash but an adressing scheme that requires only a small part of that flash to be visible at any one time. Datasheets for the processor (or application notes) will obviously not spend time describing the issues with the processor. At best, the application note will describe the availability of code banking - making it sound like a nice feature of the processor instead of a cludge to work around a huge design issue.
Certainly can't dispute that.
I've witnessed it from both sides; and admit to being really ticked off in one situation where the management recruited a "sharp-as-a-knife consultant" who caused a product to be redesigned very late in the day because what we'd done was "so Heath Robinson" and should be chucked out.
The expert consultant really didn't understand what we'd done and why. He had pre-conceived ideas from which he would not deviate and he would not listen to technical or cost arguments. But the management liked him because he was oh so decisive.
Long story short, the expert consultant failed in his task, he was kicked out, our work was resurrected and the project was successfully completed.
But this is not a cunsultancy session - this is a discussion forum.
If the OP wants to engage in the discussion, he could explain why the bodge is necessary or appropriate in his particular case.
I am open to be persuaded...
To the OP.
Without further details it's hard to determine what might be wrong. You need to check the banking parameters (especially start, size etc).
You, I and nobody apart from the OP (and his team) knows whether it is necessary and/or appropriate to use banking at this time. Until such time, it would be better to avoid looking excessively arrogant and assume it might not be a bodge.
Experience of this and other forums suggests that is quite possibly not a valid assumption.
www.catb.org/.../smart-questions.html