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
  • 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.

Reply
  • 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.

Children
No data