I am having a problem with debugging firmware.
Everything worked fine until last week and debugging as well as flashing was ok.
Then at some point (seemingly out of the blue) the debugging stopped working. I can flash the image using debug, but I cannot halt at any breakpoints. Also if I pause the debugger stops at some unknown state. A device-reset does not seem to have any effect.
I then tried to use older firmware that worked, but the same behaviour there. Even the SOC-Examples did not work anymore.
Hardware is BGM121 (EFR32BG1B232F256GM56) with wireless dev-kit. Also BGM123.
There is no error message or warning. Also the firmware does not work and it stays stuck at two locations where it loads something into a working reguster and compares it with 0x2 and 0x3. Maybe some kind of trap interrupt? I do not know. I attached an image of a halted debug-state.
I then tried reinstalling the complete IDE and started with a new soc-example. But the problem persists.
Thanks for any information!
It seems the problem has something to do with missing resets.
If I flash a board, it will not start, no matter what I do (see post above). Only by power cycling the board will the new firmware become active. Still not possilbe to debug, though.
Is the IAR or the GCC compiler being used for the project? If IAR, which version of the compiler is being used? Also in the project properties under [C/C++ Build] > [Settings] > [Optimization] is the Optimization level set to None? The compiler optimizations will make it harder to debug a project as the program flow is changed by the optimizations.
I am using the GCC compiler. The optimization level was set to 02, which was preset, as I am just trying to get a sample project to debug again (using soc-thermometer_2).
I set it to None, but this has not changed anything. No breakpoints are halted at all, also no break after pressing "Reset the Device". Only halting by sending pause, then it is stuck in some unknown loop as seen on the picture.
I am thinking, this might be a hardware fault and I have somehow broken my eval-board.
I am just missing any error or warning regarding this, since compilation and flashing/verification are done without any problem mentioned.
Hi @jpitt and @JStolle
I have a similar problem using a EFM32WG330F256 custom board and with an EFM32 Wonder Gecko Starter Kit. For me also breakpoints have no more effect, more or less out of the blue. Even worse, i can no longer connect to my custom board, on any up to date version (fresh install or updated version). Even though the board is detected, I get the message:
"The board EFM32 Wonder Gecko Starter Kit board (BRD2400A Rev A00) is not compatible with this operation; The part EFM32WG330F256 is not compatible with this operation". (see attached screenshot)
Older versions on different machines also show similar breakpoint issues but at least i can connect there. Contrary to @JStolle, on these machines my device runs normally besides not stopping at breakpoints. I also checked the optimization level and it was set to none.
Thanks in advance
I will try and find out if there is a way to reset the board, so that it works properly for you again. I know you are not able to debug with this board, but I do want to clarify if the applications are running correctly or not. At one point you mentioned that after power cycling a board the new image becomes active, so does that mean that the image runs correctly, you just can't debug it? Have you tried reloading the WSTK Adapter firmware on the board? You could also try putting the WSTK into boot mode and then reloading the WSTK firmware. Hold down both PB0 and PB1 while plugging in the USB cable. The board will revert to an older version of the adapter firmware and the latest version can then be reinstalled.
@Kaster, The screenshot looks like a EFM32 Wonder Development Kit (EFM32WG-DK3850) is selected instead of a WG Starter Kit (EFM32WG-STK3800) can you confirm, they are very different boards, can you confirm which is being used and which is selected?
I put the Eval-board into boot mode, and it reverted to the oldest hardware adapter.
Then I installed the newest one 1v0p3b689.
However the problem still persists.
Uploaded the soc_smartphone demo, but no breakpoints and stuck in infinite loop.
After Power-Reset: HTM/KEYFOB in Display, so then it works.
I then installed 1v0p2b678 from the menu.
Still the same. Always stuck in that same loop comparing register 0.
First of all thank you for your quick response.
I am using the EFM32WG-STK3800 and it is also selected in the Device View on the Launcher Perspective (see Screenshot). The switch on the board is set to DBG and the Debug Mode is set to OUT.
@KasterHmm, did you check the "Target" in the tab "Device-Hardware" in the "Device Configuration" of your Device in the Launcher?
yes i did and it is also set to the EFM32 Wonder Gecko Starter Kit board (BRD2400A Rev A00) and the EFM32WG330F256.
As said, I can connect to the board and "debug" on a different machine with an older Version (latest update 05/11/17), thus i made sure to have the exact same settings on the most recent Version.
However my code is not halting on any breakpoint there either.
From the addresses shown in the disassembly view in the first screenshot you attached, it appears the program is in the bootloader on the BGM121. Did you ever load a different bootloader onto the board? If you click the "Instruction Stepping Mode" at the top of the debug window does the program then step through the instructions on the disassembly window? You mentioned the debugger seemed to be stuck in a loop checking register r0, but the disassembly code shows several assembly instructions should be happening and if the debugger is put in Instruction Stepping Mode you should see them execute. I'm asking for help on the bootloader, i.e. if you should build and / or load a specific bootloader or something.
You mentioned a BGM123 I believe, can you debug programs correctly on it? I'm trying to determine if the issue is with that specific BGM121 you are using or not.