I'm playing around with a C++ project based on the STM32F4-DISCOVERY-G++ example.
I want to integrate the CMSIS DSP Library to play around with realtime processing of some sort. I've downloaded it from arm.com (Version 3.01) and am attempting to use it. I have added CMSIS/Include to my UINCDIR and CMSIS/Lib/GCC to ULIBDIR. I've linked with -larm_cortexM4lf_math (although I've also tried the one in CMSIS/Lib/G++ with no luck).
The project at the moment is not much more than a glorified blinky (single blinker thread flashing LED4).
What seems to happen, even if I do not call any functions from the library, is after flashing (I use the texane stlink utilities), the program runs; sometimes flashing the LED, sometimes crashes. When I attempt to hook gdb up, it's usually off in la-la land:
Code: Select all
#0 0x00000000 in ?? ()
#1 <signal handler called>
#2 0x00000000 in ?? ()
#3 0x00000000 in ?? ()
Oddly, I cannot even reset the board, it usually requires re-flashing it. Sometimes I can re-flash and get it to stop on a break point, but it usually ends up in a weird state after single-stepping a few times. I've also seen it end up in unhandled_exception() handler, and also __gnu_unwind_execute() with no returning.
I've enabled all DBG options in chconf.h to no avail. I've tried increasing the stack (I noticed several large global static arrays[] in the CMSIS code, but un-sure if that requires stack space?)
What else can I try? I find it odd that the board cannot even be reset by gdb.
All goes away if I do not link to CMSIS library.