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

DPP1 problem

Hi there!

I need some help with DPP (I think so).

code:

...
mov     r0, # _setP0

; some below

_setP0: scxt    SYSCON, # 4C0h
...

after compiling and linking label was placed into adress 0x44C2 (in .M66 file and in disassembler).
When I step over MOV command - in R0 was written 0x04C2 value, not 0x44C2. In disassembler I can see

00004482 E6F0C204  MOV      R0,#0x04C2

Why MM part of code is C2 04, not C2 44?

As I can understand - 0x44C2 placed into 1st memory page and must be accessed via DPP1. I filled DPP1 with 0x1 which gives 1st page from 0x4000 + concatenated 14bit address = 4000 + 4C2 = 44C2.

Some info:
Infenion 166
Memory model - small,
Rom - 0x0 - 0x10000
Ram - 0x20000 - 0x40000
Rtx-166 tiny
Reserve: 08h-0Bh,0ACh-0AFh,3000h-0031B8h,3200h-004428h

Any ideas?

Parents
  • HI again Chris!
    Thanks for trying.

    You got the SAME address because of your project is very SMALL (may be only one function in one c-file).
    I have the BIG project (6 files) and this function processed in the end of compiling.

    If i put this function in beginning of main c-file - it works as your sample (2 address are same), but i want to make my project more reasonable separated in files. It is not error in KEIL, so I don't want to contact to support. I just want to understand where I am wrong in my opinion about compiler\linker working.

    So, CAN ANYBODY ELSE SAY SOMETHING ABOUT THIS CASE?

    PS: thanks Chris for trying once more

Reply
  • HI again Chris!
    Thanks for trying.

    You got the SAME address because of your project is very SMALL (may be only one function in one c-file).
    I have the BIG project (6 files) and this function processed in the end of compiling.

    If i put this function in beginning of main c-file - it works as your sample (2 address are same), but i want to make my project more reasonable separated in files. It is not error in KEIL, so I don't want to contact to support. I just want to understand where I am wrong in my opinion about compiler\linker working.

    So, CAN ANYBODY ELSE SAY SOMETHING ABOUT THIS CASE?

    PS: thanks Chris for trying once more

Children