I Purchased Keil DK51 in 2001 and updated in 2002 to version 7. However, I was given MON51.LIB dated 5/2/2001 and MON51B.LIB dated 6/29/1998. I was able to use MON51.LIB with my code banking code by manually switching bank to load user code. However, when I use banking monitor MON51B.LIB, my code can be be loaded. Does any one have experience of a working MON51B.LIB (6/29/1998). If it does not work, I believe that Keil has the obligation to supply a working MON51B.LIB without me paying the update fee. Thanks. Charles Lee
Dear David: Thank you for taking interest in my problem. (1) Hardware configuration: The Monitor resides at ROM (EF00 to FFFF). User's Ram is at E000-EFFF & F400-FFFF. (C509 chip) von-Neumann memory at 0-7FFF (4 banks, controlled by port pin) & at 8000-DFFF. Monitor Ram is at DF00-DFFF. 8000-CFFF is used for loading COMMON code. A ROM at 0000 is executed after power-up and jump to E000. Code at E000 switches off ROM at 0000 before jumping to MON51. Baud rate at 57600, Serial Interrupt is used. (2) Development Process: (A) Regular Monitor (MON51.LIB) is used to debug my software without code banking. User code can be loaded by Debugger and executed correctly without problem. (B) Reconfigure my software so that there are COMMON code at 8000-CFFF, and 2 code banks at 0-7FFF. Regular Monitor (MON51.LIB) is used. I need to switch port pin to load different user code banks (B00 & B01). The program can be loaded and executed correctly without problem. (C) Banking Monitor (MON51B.LIB) is used to debug the same code. The Debugger can be started. I can inspect & modify memory and confirm it as von-Neumann one. I can switch port pin via Debugger and verify that the correct code bank memory is working correctly. As soon as I type in "LOAD filename", I get a message "Connection to target lost". I can not use to Debugger to load my code with MON51B. MON_BANK.A51 is set up as: ?B_NBANKS=2; ?B_MODE=0; ?B_BANKSTART=0; ?B_BANKEND=7FFF; ?B_COMMON=FF; ?B_XRAM=FF; ?B_MON_DATA_BANK=0; ?B_PORT =F9; ?B_FIRSTBIT=0; (P9.0-P9.2 to control banks) Please let me know if any further information you need. Thanks.
Reconfigure my software so that there are COMMON code at 8000-CFFF The common area MUST include reset and interrupt vectors. http://www.keil.com/support/docs/158.htm Jon
I checked the Hex files, and I am sure that the C51 duplicated interrupt vectors & all COMMON code on each banks modules. Actually, I specified that the code bank area is from 90H to 7FFFH. C51 automatically duplicates interrupt vectors on all bank object modules. My code banking program works with non-code banking mointor (MON51.LIB), but not the banked monitor (MON51B.LIB). Thanks for your suggestion.
I redo the hardware to change the memory map. COMMON: 0-1FFF; A000-FFFF Bank: 2000-9FFF; Monitor resides at EE00, and a shadow program is used at power-up to jump to Monitor. After making all the changes, I can run MON51 at 57600 Baud. (My CPU is at 3.58MHz with C509L chip). When I switch to MON51B. I can not load my code at 57600 Baud. However, when I reduce the Baud Rate to 28800. I can make it work. Good Luck for people trying code banking. Charles Lee