dlbeer / mspdebug

Debugging tool for MSP430 MCUs
GNU General Public License v2.0
184 stars 80 forks source link

Compiled Software Breakpoints #89

Open cr1901 opened 4 years ago

cr1901 commented 4 years ago

I'm willing to add (a limited version of1) this feature myself- it should be simple enough (famous last words), but the TI-provided debuggers allow you set an EEM trigger which triggers whenever the data lines see a specific opcode bit pattern.

This can be used to create software breakpoints by erasing the flash and storing the erased opcode in a table, but what I need is the ability to breakpoint on the NOP pattern 0x4343 when this pattern was precompiled for some software I'm debugging.

Does mspdebug allow you to create data triggers for the EEM? If so, how would you accomplish this? I have not found any documentation online for the EEM- even my family manual (slau208q.pdf) has barely anything on it.

  1. I would create an option to enable software breakpoints at the cost of one hw breakpoint/trigger. I just don't know the sequence of EEM writes that accomplishes this...
smunaut commented 4 years ago

The source code for the MSP-FET firmware is available and contains some register definition for the EEM. It's not a "doc" per-se but that's the best I found when I looked the last time.