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

How to get the specific address on an Access Breakpoint with a range?

When I set an Access Breakpoint on a memory range, I'd like to use the specific address when the breakpoint is triggered. For example:

func void showAddress(void) {
  if (BA_MODE == BA_WRITE) {
    printf("Write to 0x%X.\n", BA_ADDR);
  } else {
    printf("Read from 0x%X.\n", BA_ADDR);
  }
}

ba readwrite 0x40002000, 0x40, 1, "showAddress()"

Are there any system variables that represent the attributes of the access that triggers the breakpoint?

Please note: the "printf" in the code above is just an example. Actually I'd like to simulate certain hardware behaviour, for example memory mirrors when not all address lines are used. Such a feature could also help to write simulations for external devices.

Parents
  • Thanks for the quick reply!

    So my version (see below for a list of numbers) does not have these variables, does it?

    uVision3 V3.12a
    CPU DLL: SARM.DLL V1.27e
    Dialog DLL: DARMP.DLL V1.09
    Target DLL: BIN\UL2ARM.DLL V1.07
    Dialog DLL: TARMP.DLL V1.08

    Is there any other possibility to retrieve the address?

Reply
  • Thanks for the quick reply!

    So my version (see below for a list of numbers) does not have these variables, does it?

    uVision3 V3.12a
    CPU DLL: SARM.DLL V1.27e
    Dialog DLL: DARMP.DLL V1.09
    Target DLL: BIN\UL2ARM.DLL V1.07
    Dialog DLL: TARMP.DLL V1.08

    Is there any other possibility to retrieve the address?

Children
  • None of the uVision-MDK releases out in the world do have these system variables. They will come with next MDK release (currently in Release Candidate state).

    Sorry, there is no way to get the accessed address/access type within a user or signal function.