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

22-bit Contiguous Mode of DS80C390

I've developed a firmware to run on 22-bit contiguous mode of DS80C390. In the "debug" property sheet of "options for target" window, I've added the "-C390" parameter for "S8051.DLL". However, in the debug session, it has the problems below :-
1) the disassembler window failed to display 22-bit assembler instructions
2) the debugger failed to step over C source lines (if it contain 22-bit assembler instructions)

My uVision2 is PK51 V2.40a. Can you advice how to correct these problem ?

Parents
  • I've added the "-C390" parameter for "S8051.DLL"

    That feels wrong already --- you shouldn't have to do that yourself. It's supposed to happen automatically, as soon as you configure the project for the 'C390 and contiguous mode.
    And just in case: the automatically inserted parameter I see here is "-c390" (note: lower-case 'c'); that might make a difference.

    So: how exactly did the disassembler "fail to display" those instructions? Was the CPU actually put into 22-bit contiguous mode (check out your START390.A51 configuration) at all? Did you configure the compiler to be in contiguous mode?

Reply
  • I've added the "-C390" parameter for "S8051.DLL"

    That feels wrong already --- you shouldn't have to do that yourself. It's supposed to happen automatically, as soon as you configure the project for the 'C390 and contiguous mode.
    And just in case: the automatically inserted parameter I see here is "-c390" (note: lower-case 'c'); that might make a difference.

    So: how exactly did the disassembler "fail to display" those instructions? Was the CPU actually put into 22-bit contiguous mode (check out your START390.A51 configuration) at all? Did you configure the compiler to be in contiguous mode?

Children
  • Thks for the info.

    I'd modified the "start390.a51" file to customize for my MCU. The problem is fixed by adding back the ACON_VAL variable in the
    file.

  • I built a DS80C390 compatible emulator, and write a C program to test 22-bit contiguous mode. When I use the DS80C390 simulator, the disassembler window displays 22-bit assembler instruction correctly. But, when I use my emulator, the disassembler window displays 22-bit assembler instruction as 16-bit instruction, as below :-

    [displayed as 16-bit inst]
    C:0x0011F4 900100 MOV DPTR,#0x0100
    C:0x0011F7 14 DEC A

    [should be]
    C:0x0011F4 90010014 MOV DPTR,#0x010014

    I've already set "-c390" parameter for S8051.DLL for both simulator & emulator, and included the "start390.a51" file. Can you advise how to correct the problem with the emulator ?

  • What's the link between that emulator of yours (which I assume to mean a piece of hardware acting as a drop-in replacement for an actual CPU) and the Keil IDE? Are you sure you got that link set up correctly?

  • Both the emulator and AGDI driver are developed by our company. The emulator works well in 16-bit mode, but only failed to display 22-bit assembler instructions in debug mode. Is there anything in AGDI specific for 22-bit contiguous mode ?

  • I have another question related to 22-bit contiguous mode of uVision2 debugger.

    With object code of the C program and current content of ACON register(as returned from emulator or simulator), the debugger should be able to identify 22-bit assembler instructions and display it in disassembler window. If yes, the "fail to display 22-bit instructions" problem should NOT be related to the implementation of AGDI driver & emulator(as long as the emulator returns correct ACON content). Is that correct ?

  • [...]ACON register(as returned from emulator or simulator), the debugger should be able to identify[...]

    If it knew it had to check ACON to find out about this --- yes. But why should the disassembler look into that register if it has no particular reason to assume that the processor even has a 22-bit contiguous mode? Note that 22-bit contiguous mode is very particular, there are only about a handful of '51-style processors that support it, among hundreds and hundreds that don't.

  • Can you advise how to correct the "fail to display 22-bit assembler instruction" problem for emulator ? Or, can you tell me the facilities in AGDI for 22-bit contiguous mode ? So that, I can check our AGDI driver.

    Our ctmrs are waiting for our emulator, pls help. Thks.

  • Does 22-bit contiguous mode works for DS80C390 emulator from Dallas ?

  • Tony, are you trying to build an own emulator or what is the background of your question?

    Currently the AGDI interface assumes that the device starts already in CONTIGUOUS MODE. This is because the Monitor MON390 brings the device instantly into the CONTIGUOUS MODE.

    In the next tool revision, it will be possible to tell the debugging about the mode.

    Reinhard

  • Yes, we're developing an emulator & AGDI DLL for our MCU with 22-bit contiguous mode compatible to DS80C390. The emulator works well for both 16-bit and 22-bit modes, except that uVision2 debugger failed to display 22-bit assembler instructions and failed to step over C source lines(with 22-bit instructions).

    I've written a test application(in C lang) to test 22-bit mode. I've enabled "-c390" option for "S8051.DLL". However, it worked for simulator, but failed for emulator.

    I want to know what makes the debugger failed 22-bit mode. If it's problem with our emulator, can you give me info of AGDI interface, which are used for 22-bit mode ? So that, I can check our AGDI DLL. Pls help, thks.