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

uVision2 Debug Fn: Access to Extended Registers

I am using a Triscend TE505 (with 2 Data Pointers).
In addition to the standard set, the debugger Registers window adds the following under 'Sys':

Sys
 |
 :
 +--auxr1
 |
 +--dptr
 |   |
 |   +--[0]
 |   |
 |   +--[1]
 :
I assume that 'auxr1' is the Triscend DPS (Data Pointer Select) register.

The Function Editor does not recognise these names:
FUNC void ShowRegs( void ) 
{
    :
    printf( "  %02x", AUXR1 ); 
______________________^
*** error 34, line 18: undefined identifier
    printf( "%04x", DPTR[0] ); 
*** error 46, line 19: subscript requires array
    printf( "%04x", DPTR[1] ); 
*** error 46, line 19: subscript requires array
    printf( "\n" );
}
So, how can I access these extended registers from a Debug Function?

Parents
  • Yes, I know how to edit registers manually; what I wanted to know was how to access them symbolically (preferably) from a uVision2 Debug Function.
    The uVision debugger clearly knows about these extra registers as it's able to name & display them, and lets you modify them, as you described.
    So why can't the same debugger's Debug Function use the same names?
    NEIDE!

    BTW: The Triscend does actually have two DPTR registers; here are their C51 definitions:

    sfr DPL  = 0x82; // Standard 8051 DPTR
    sfr DPH  = 0x83;
    
    sfr DPL1 = 0x84; // Triscend 2nd DPTR
    sfr DPH1 = 0x85;
    
    sfr DPS  = 0x86; // DPTR Selector
    
    The setting of DPS governs which DPTR register is used/affected by instructions like MOVX A,@DPTR and MOV DPTR,#val16

Reply
  • Yes, I know how to edit registers manually; what I wanted to know was how to access them symbolically (preferably) from a uVision2 Debug Function.
    The uVision debugger clearly knows about these extra registers as it's able to name & display them, and lets you modify them, as you described.
    So why can't the same debugger's Debug Function use the same names?
    NEIDE!

    BTW: The Triscend does actually have two DPTR registers; here are their C51 definitions:

    sfr DPL  = 0x82; // Standard 8051 DPTR
    sfr DPH  = 0x83;
    
    sfr DPL1 = 0x84; // Triscend 2nd DPTR
    sfr DPH1 = 0x85;
    
    sfr DPS  = 0x86; // DPTR Selector
    
    The setting of DPS governs which DPTR register is used/affected by instructions like MOVX A,@DPTR and MOV DPTR,#val16

Children