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

MON51 hack

First let me describe a little bit about our system:

It is not von-neuman, and the main code executes from OTP (One Time Programable) memory. there is also a small amount of XRAM, and code can also be executed from there too.

When executing from OTP, we are unable to use MOVX to read or write CODE. We can use MOVC read CODE.

When executing from XRAM, we are unable to use MOVX to read or write XDATA. We can use both MOVC and MOVX to read CODE.

Despite being OTP, we do have the ability to dynamically patch an small number of quads of OTP code at any address to whatever value we choose.

My belief is that all the elements that are needed to execute a MON51 stub from OTP are present. We can patch code to jump to the stub on a break point, and code can be read through the MOVC to keep adjacent instructions coherent in the patch?

My question is, does anyone have any experience or deep working knowledege of the MON51 that can point me to section that inserts the jumps that set and clear break points? Are there any thoughts about how to modify this with minimum impact on the stub?

Thanks in advance,

Chris.

Parents
  • 3) We can never write to CODE (OTP) space

    if that is really the case and you can not switch your memory map to do a write into code space you will not have any chance to use mon51.

    I remember reading somewhere about single stepping
    being implimented with an interrupt?

    No, the serial interrupt is only usesd to be able to change from run mode to stop mode (Stop Button). So as long as you are in run mode code will be executed at full speed.

    Here is my expiriance with mon51:
    regardless what you have configured in mon51 you need at least 256 bytes (one page) which is fully VNM.
    So there must be some space where MOVX and MOVC is reading the same address! If that is not the case mon51 will not work.

    Thomas

Reply
  • 3) We can never write to CODE (OTP) space

    if that is really the case and you can not switch your memory map to do a write into code space you will not have any chance to use mon51.

    I remember reading somewhere about single stepping
    being implimented with an interrupt?

    No, the serial interrupt is only usesd to be able to change from run mode to stop mode (Stop Button). So as long as you are in run mode code will be executed at full speed.

    Here is my expiriance with mon51:
    regardless what you have configured in mon51 you need at least 256 bytes (one page) which is fully VNM.
    So there must be some space where MOVX and MOVC is reading the same address! If that is not the case mon51 will not work.

    Thomas

Children
  • "I remember reading somewhere about single stepping
    being implimented with an interrupt?"

    It is quite possible that some debugging schemes use an interrupt but, aparrently, not MON51.

    (the Triscend did have a breakopint interrupt, if I remember correctly...)