Post Go back to editing

Intermittently VisualDSP++ Reload crashes with __unknown_exception_occurred

Just as the title states, sometimes when VisualDSP++ is in some kind of mood, I may have to reload 50 or so times to get the program running

Other times it loads in and runs the firmware just fine

Utilizing the techniques described here I've isolated this much:

  • EXCAUSE = 21
  • RETX = FFA05F92

Obviously to understand RETX we need some context:

  • main starts at FFA05F8C

Instructions are:

  • [FFA05F8C] LINK 0xc ;
  • [FFA05F90] Call Initialize__3VDKFv ;
  • [FFA05F94] Call Run__3VDKv ;

If I understand things right, it looks like the Program Counter is landing in between the Initialize and Run call and subsequently we get the 0x21 which is an Undefined instruction.

Firstly, is this assessment correct and secondly, if so, where might we look to fix this?

It seems like checking "Verify all writes to target memory" slightly reduces the chance of getting the exception - but can't be sure