Reply
Posts: 49
Registered: ‎05-03-2016

Problem in debugging simplicity v4

Hi!

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!

Jan

 

 

Posts: 49
Registered: ‎05-03-2016

Re: Problem in debugging simplicity v4

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.

Posts: 508
Registered: ‎12-05-2016

Re: Problem in debugging simplicity v4

Hi @JStolle,

 

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.

 

Thank you,

jpitt

Posts: 49
Registered: ‎05-03-2016

Re: Problem in debugging simplicity v4

Hi @jpitt,

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.

 

Greetings,

Jan

Posts: 9
Registered: ‎07-10-2017

Re: Problem in debugging simplicity v4

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

Kaster

Posts: 508
Registered: ‎12-05-2016

Re: Problem in debugging simplicity v4

Hi @JStolle,

 

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?

 

Thank you,

jpitt

Posts: 49
Registered: ‎05-03-2016

Re: Problem in debugging simplicity v4

@jpitt

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.

Greetings

 Jan

Posts: 9
Registered: ‎07-10-2017

Re: Problem in debugging simplicity v4

Hi @jpitt,

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.
Regards

Kaster

Posts: 49
Registered: ‎05-03-2016

Re: Problem in debugging simplicity v4

@KasterHmm, did you check the "Target" in the tab "Device-Hardware" in the "Device Configuration" of your Device in the Launcher?

 

 

Posts: 9
Registered: ‎07-10-2017

Re: Problem in debugging simplicity v4

Hey,
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.

 

Thanks again

Kaster

 

Posts: 508
Registered: ‎12-05-2016

Re: Problem in debugging simplicity v4

Hi @JStolle,

 

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.

 

Thank you,

jpitt

Posts: 508
Registered: ‎12-05-2016

Re: Problem in debugging simplicity v4

Hi @Kaster,

 

The last screenshot shows the debug interface is set to JTAG, is that what the custom board is laid out to use (instead of a SWD interface)?

 

Can you share what the project properties show for the C/C++ Build Board / Part / SDK settings?

 

Thank you,

jpitt

Posts: 9
Registered: ‎07-10-2017

Re: Problem in debugging simplicity v4

Hey @jpitt,

Yes it is, but thanks for the suggestion.

I also tried using the v1.1 without success.

Regards

Kaster

Posts: 9
Registered: ‎07-10-2017

Re: Problem in debugging simplicity v4

Hey @jpitt,

Actually it is an SWD interface, i am just using a JTAG adapter... and this solved my debug problem on the different machine! I do not believe i messed that up...

Sadly it did not solve my connection issue on the latest version.

Thanks again

Kaster

Posts: 49
Registered: ‎05-03-2016

Re: Problem in debugging simplicity v4

@jpitt

Hi Jpitt,

I never used any bootloader on those boards.

The problem first happened, while debugging an external BGM123 Board via JTAG Interface of the Eval-board (also no bootloader). At some point the debugging stopped working. I first thought I had some firmware issues, went back to an older version, but no luck. Then I exchanged the external BMG123 Board with another, but the same problem.

At that point I put the BGM121 Module on the eval board, switched to MCU Debugging and it also showed the same problems.

 

I have ordered a new eval-board which should arrive tomorrow, so I can maybe check if the eval-board is faulty (which is kinda my guess) or there is some setting (ported even through a reinstall) shooting down all my BGMs.

 

Greetings,

 Jan

 

Posts: 508
Registered: ‎12-05-2016

Re: Problem in debugging simplicity v4

@JStolle,

 

Hi Jan,

 

Okay, I hope the new WSTK takes care of the issue.  I haven't heard of any thing else to try on the existing board to try to get it working correctly, but if I do I will post an update.

 

Thank you,

jpitt

Posts: 261
Registered: ‎09-07-2012

Re: Problem in debugging simplicity v4

Hi, @JStolle,

 

I think you are correct about the issue being related to reset not working. In the image in your first post the code is running from RAM. My guess is that this is the flashloader that was used to flash your application, and that device was never reset to start running your code afterwards.

 

This could be caused by some damage to the WSTK mainboard that has somehow caused the reset line to become disconnected or pulled high. Do your code start running if you press the reset button on the board, or is a power cycle required? It will be interesting to see if a new board solves your problem, please let me know!

Posts: 49
Registered: ‎05-03-2016

Re: Problem in debugging simplicity v4

Hi@Audun,

the Reset Button is also not working.

I do not see any visible problems on the board, but maybe the input-port is damaged.

If you can tell me where the reset pin is located I could trace it with an oscillator image to verify if the reset-signal is arriving.

 

Greetings, Jan

Posts: 49
Registered: ‎05-03-2016

Re: Problem in debugging simplicity v4

Hi!

 

I got the new evalkit and it works out of the box with the old BMG121 board.

That would verify the broken reset-line hypothesis. How it got broken is another thing, since at the time it stopped working I was just debugging not soldering. Maybe stray EMV or something.

As long as the new board does not get the same error, everything is fine.

 

Greetings

 Jan

 

 

Btw. one thing I noticed: the adapter firwmware on the board is newer (1v0p4b737) than what i downloaded just a three days ago (1v0p3b689).

Posts: 261
Registered: ‎09-07-2012

Re: Problem in debugging simplicity v4

Hi Jan,

 

Thanks for the follow-up, and I'm glad the new board works.

 

Regarding the firmware version - we sometimes do fixes related to production test that is used during production, but doesn't really affect regular use. The 1.0.4 version you have is one of these cases, and is functionally equal to the 1.0.3 release that's available through Studio.

Posts: 49
Registered: ‎05-03-2016

Re: Problem in debugging simplicity v4

Hi @Audunand @jpitt,

it must be something I am doing wrong with the board. I had the BMG121 running ok, as stated yesterday. Today I attached my external board via the JTAG Interface again and started the debugging, now I have the same problem again! If I reset to example-firmware now also no debugging possilbe. >_<

 

I could send you the project-data I had flashed into the board ( maybe via confidential e-mail or PN?) and if it helps the layout of the JTAG-Adapter, though that is nothing special.

 

Otherwise only things I did:

Attach new Eval-board with BMG121 Kit. Flash SOC-Smartphone into the BGM -> Debugging was ok.

Then today disattach Eval-Board. Dislodge BMG121 Kit. Attach external BGM123 Board via JTAG (not SWD) Interface. BGM123 Board has its own power supply.

 

Change Debug settings in Launcher from MCU to Out.

Check Device via Simplicity Commander (Preferences Bare run - connect -> Device is fould) no Flashing.

Change Device hardware in Launcher Device Window to EFR32BG1B132F256GM56.

Flash my custom hardware into the board via debug.

Then I got the same problem as I had before.

 

On the old board before the problem occured I had the firmware working on the external board, so there must be some kind of setting or small change which kills (?) the eval-board.

 

 

Greetings!

 Jan

 

 

 

Posts: 49
Registered: ‎05-03-2016

Re: Problem in debugging simplicity v4

Sorry, too early.

I got it working again after following the same steps again (without simplicity commander this time).

I had Debug Interface set to SWD this time, though I am actually using the JTAG Interface on the right side. Also the Debug interface says the board is not compatible.

I am a bit confused, why this is working now.

 

I will countercheck this with the old board later.

 

 

 

 

Posts: 49
Registered: ‎05-03-2016

Re: Problem in debugging simplicity v4

Breakpoints work right now, but pressing Reset (on new board) gets me an error message:

 

"

Reset failed
TCF error report:
Command: DeviceSupport reset "root.000440095746", "core"
Time: 2017-07-14 11:21:57.335
Error text: Command is not recognized
Error code: 25

"

 

I did not get this message with the old board.

 

Posts: 261
Registered: ‎09-07-2012

Re: Problem in debugging simplicity v4

[ Edited ]

I think this is expected behavior.

When you press the reset button, the debugger's state and context information about the chip is no longer valid, and the connection will fail. I guess this didn't happen on the old board because reset didn't work.

Posts: 9
Registered: ‎07-10-2017

Re: Problem in debugging simplicity v4

Hi everybody,

@jpitt@Audun Thanks for your help earlier and for pointing out the SWD mistake, however as said this did not solve the connection issue with the latest version of Simplicity Studio (reverting to an older version unfortunately is not possible with this one). Do you have any other ideas why i can not connect to my board on an updated machine or how to get a working version for that machine?

@JStollesorry for hijacking your post again. Btw, did you find out whether the reset pin is getting the signal on your old board (eg. via oscilloscope)?

 

Regards
Kaster

Posts: 49
Registered: ‎05-03-2016

Re: Problem in debugging simplicity v4

I did not do any oscilloscope tracing so far. When using the new board, I seemingly had the same problem with the halting of the board. I am still not quite sure, what the problem was/is there. After switching to SWD for external (see post above) I got the breakpoints to work again. Then played a bit with the reset-types (CORE, default, etc) and then I had it working. As long as it works, I have to see that I get forward with my project. I tried the old board today again to see if it would work that way, too. But there the Board can still not use any breakpoints. I will send it in for checking, today. Greetings, Jan
Posts: 508
Registered: ‎12-05-2016

Re: Problem in debugging simplicity v4

Hi @Kaster,

 

Please enable adapter pack logging ([Window] > [Preferences] > [Simplicity Studio] > [Adapter Packs] and then check the box next to "Adapter pack log:") then recreate the problem of connecting to the target. After that please generate a zip file of the Simplicity Studio Logs - [Help] > [Report Bug...] make sure "Export Simplicity Studio log files" is selected, then hit [Next] twice and [Finish] and upload the resulting zip file to either this forum thread or to a support case created using your SiLabs account.  Also if it would be possible to zip up and share a project that the issue is occurring with that might be helpful as well.

 

Thank you,

jpitt

Highlighted
Posts: 9
Registered: ‎07-10-2017

Re: Problem in debugging simplicity v4

Hi @jpitt,

Thanks again for the quick reply. I did as you requested and added the files as attachments.

I cleared out the project of sensitive files, so it is more or less a bare project now (with no effect on the Issue). I hope this will be of help.

Best Regards

Kaster

Posts: 9
Registered: ‎07-10-2017

Re: Problem in debugging simplicity v4

Hey @jpitt,

Did my files give you a hint what my problem might be?

Thanks and regards

Kaster

Posts: 508
Registered: ‎12-05-2016

Re: Problem in debugging simplicity v4

Hi @Kaster,

 

I didn't realize this was running on Linux, which distribution is being used?  The logs files did not include the adapter pack logging, are you sure that was enabled in the preferences?  If so can you look at the location specified and send us the adapter pack log file separately?

 

The error log files do show a lot of file not found errors for the Simplicity Studio cache directory.  Please exit Simplicity Studio and then delete this directory:

/DIST/home/jpfeuffer/SimplicityStudio_v4/configuration/cache

 

Then restart Simplicity Studio.  I have also shared the log files with a developer to try and get other ideas on what the issue might be.

 

Thank you,

jpitt

Posts: 9
Registered: ‎07-10-2017

Re: Problem in debugging simplicity v4

Hey @jpitt,

thanks again for the quick response. The OS of the problematic machine is Ubuntu 14.04.5 LTS. Apparently the adapter log file was not included in the files i send to you even though i enabled them in the preferences. As you asked i attached it separately and deleted the cache (though it did not resolve the issue unfortunately). The adapter log file shows multiple unsuccessful connections since i tried the procedure every few days in case an update in simplicity v4 solved the issue by chance.

Best regards

Kaster