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

64k banked code

hi all,

i was thinking to write a 512K code as 8x64k banks for an external flash memory, using some kind of jump table for functions call that are to differn banks. Could the Keil banked linker works for this configuration and generate a 512k hex/binary ? I'm working with a command prompt makefile, so i would need some help to find the right linker directives to use.

Every suggestion/help is very appreciated.

angelo

  • The 8051 has a 64K code address space; you are talking about writing eight times this amount of code!
    Have you stopped to consider whether this is actually a good idea?

    By the time you've added the external flash & associated support, and messed about to get this banking working, might it not have been simpler to have just gone straight for an ARM or something and avoid all this messing about?!

    There are some very competitively-priced ARM-based microcontrollers about these days.

  • 8x64k is not a useful way of thinking of such a system. For banking to work, you need a common area (where all the jump tables to access functions across bank boundaries go), so it'll be more like (n) KiB common + 8x(64-n) KiB banked code.

    And I agree with Mr. Neil: 512 KiB of code on a plain vanilla 8051 is almost guaranteed to be a bad idea. It might be different if you were using one of the souped-up variants (e.g. the DS 80C390), that have hardware support for more than 64K of memory --- but if you were, I assume you'ld have said so.

  • "It might be different if you were using one of the souped-up variants (e.g. the DS 80C390), that have hardware support for more than 64K of memory --- but if you were, I assume you'ld have said so."

    And if you were, why would you be messing about with Banking anyway??

  • old adages never die

    To expand '51 I/O use a 8255
    There is no economically feasible replacement for a code banked '51
    You must use a programmer to load code into a '51

    all the above statements were true in the days when the king of diamonds were a jack and are blatantly false today.

    Erik

  • thanks all,

    yesterday night i've studied banking, so now i can see my question was stupid, since i must have a common area for "take-off" and "landing after" a bank swith. As in the lx51 help file, i wiil go for a 32k common + 15x32k banks, so i will add the hardware i need to do the bank switch.

    I wan't change processor, i'm using a DS89C420 already wired and working with a network chip, for now i'm using only the fisrt 64k bank of the 512K flash memory.

    Many thanks, Angelo