Other Parts Discussed in Thread: BLE-STACK, SYSBIOS
Tool/software: TI C/C++ Compiler
I'm currently looking into an issue where a custom board is entering an error state, that I'm not able to debug. I can single-step through most of the initialization, some of the tasks start, but as soon as I let the firmware run (and the interrupts start firing), the board hangs. Any attempt to pause it from the debugger will give the following error:
Cortex_M3_0: Trouble Halting Target CPU: (Error -2062 @ 0x0) Unable to halt device. Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 7.0.48.0)
My firmware is using BLE-stack 2.2.1, is built on the Serial Port Profile example (spp_server), and adds a few changes to the existing tasks, and an additional, custom task running at priority 1. For the compiler, I've initially been using the recommended TI 5.2.6 compiler.
The code has been working just fine, until a recent change. The change looks fairly innocent, and I've currently narrowed it down to the addition of three global volatile bool variables in the custom task implementation file (which is a cpp file). I've commented out all other added functionality from that commit - only the three volatile bools remain. With 0-2 volatile bools, everything works - when the third is added, the problem above happens.
I tried recompiling with the 16.9.4 LTS compiler, and here everything works again.
My questions are:
- Is the above a known issue, and can someone maybe provide a bit more insight into what is going on?
- Are there any known issues when using the 16.9.x LTS series of compilers, instead of the recommended 5.2.6 compiler with the BLE-stack?
- In continuation of 2, what is the reason for 5.2.6 being the recommended compiler, rather than the newer ones?