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
  • No, that doesn't work: the uVision Debug Functions use a C-like Language which is a subset of ANSI; it doesn't include Keil's extensions like SFRs, _at_, etc.

    However, they do provide builtin functions like _RBYTE which read from absolute hardware addresses.
    Unfortunately, the _RWORD function seems to use the wrong byte ordering, so can't be used to read a whole 16-bit DPTR in one go. :-(

    Just seems like another example of uVision's Not-Entirely-Integrated Development Environment (NEIDE?)

Reply
  • No, that doesn't work: the uVision Debug Functions use a C-like Language which is a subset of ANSI; it doesn't include Keil's extensions like SFRs, _at_, etc.

    However, they do provide builtin functions like _RBYTE which read from absolute hardware addresses.
    Unfortunately, the _RWORD function seems to use the wrong byte ordering, so can't be used to read a whole 16-bit DPTR in one go. :-(

    Just seems like another example of uVision's Not-Entirely-Integrated Development Environment (NEIDE?)

Children