I need to have an internal bootloader in my Dallas 520 that can reprogram my external flash, and contain functions the external program can use, as these functions need to use ports P0 and P2 (precluding there execution from external code space. The programs are in C. I'm thinking of placing the external code in a space starting around 0x1000, allowing the chip to access both internal and external code space as needed. I'm shy on assembly experience, but I figure I can use embedded assembly as needed. I downloaded the bootloader example, but it won't load in uVision2. There are references to a jump table in the bootloader example, but it's not clear what this is. Also, how would this affect an ISR in the external code? Can anybody help? Thanks, Larry Koepke.
Have you searched the Knowledge Base? NB: That's the 'Search' link along the top of the page; the one on the left just searches Forum messages.
I have searched the knowledge base quite a bit. While there are already two articles entitled "Splitting code between eprom and flash/eeprom" (one for 51, one for 251), they do not adequately cover the issue for me. They both refer to "jump tables", yet there is no explanation of what, where etc. these jump tables are (search for "jump table" fails), and they reference an example project for dScope, which will not load in uVision2.
A "jump table" is - surprise - a table of jumps! The interrupt vector table is an example of a jump table: the interrupt number indexes into the table, and the result is the address of the handler for that interrupt. In 'C', another example is an array of function pointers - but special precautions are needed for function pointers in Keil C51 (see the manual & knowledge base). 'C' compilers often implement switch statements as jump tables.