I tried to resume work on one of my LPC11U35 projects today, but I'm unable to get my previously working program to run. It keeps throwing hard fault exceptions before it even gets to main(). Older known-good versions are hard faulting as well. In trying to reproduce the problem outside of my main code, I've discovered something very weird that I think might be related:
If I create a demo program using mbed-rtos and USBDevice, everything works fine. But if I add a class with a destructor to the mix, the USB driver no longer works, and Windows reports a malfunction. Simply removing the destructor "fixes" the problem. Reverting to older versions of mbed-rtos and USBDevice has no effect.
At this point, I believe this may be a compiler/linker problem that's outside of my control... Here is a demo program demonstrating the bug:
[Repository '/users/neilt6/code/LPC11U35_WeirdBug/' not found]
I tried to resume work on one of my LPC11U35 projects today, but I'm unable to get my previously working program to run. It keeps throwing hard fault exceptions before it even gets to main(). Older known-good versions are hard faulting as well. In trying to reproduce the problem outside of my main code, I've discovered something very weird that I think might be related:
If I create a demo program using mbed-rtos and USBDevice, everything works fine. But if I add a class with a destructor to the mix, the USB driver no longer works, and Windows reports a malfunction. Simply removing the destructor "fixes" the problem. Reverting to older versions of mbed-rtos and USBDevice has no effect.
At this point, I believe this may be a compiler/linker problem that's outside of my control... Here is a demo program demonstrating the bug:
[Repository '/users/neilt6/code/LPC11U35_WeirdBug/' not found]