Arm Mbed OS support forum

Mbed Studio hangs on "Erasing" with J-Link EDU

I’m trying out Mbed Studio for the first time. It’s a Windows 10 machine with Mbed Studio 1.4.1 and Mbed OS 6.11.0. I’m trying to flash the simply Blinky example to a custom nRF52 board using a J-Link EDU.

The short story is that Mbed Studio hangs with an “Erasing…” message. I am confident that my connections to the J-Link and the nRF52 board are good as I get successful flashes through Keil as well as through VS Code with the PlatformIO plugin installed. I’ve swapped back and forth between Mbed Studio and Keil to ensure flashing is still working.

When I first ran Mbed Studio with the J-Link connected, there was a pop-up stating that the device could not be automatically configured and would I like to do it manually. (This was surprising given that it’s a standard J-Link device.)

The manual setup is configured with a build target of “Nordic nRF52-DK” (the same as I use in Keil and VS Code), debug flags are set to --target nrf52 --erase=chip, and I’ve tried the “Deploy and debug target” as both “nrf52 (Native)” and “nRF52832_xxAA”.

If anyone has suggestions as to what to look at next, I would appreciate it. Thanks!

Hello,

I hope information from this discussion, please see below, will help you to solve or understand to this problem.

BR, Jan

It does explain the problem, so thank you for that.

Unfortunately, though, it doesn’t help solve it. I’m using Mbed Studio 1.4.1 and that post refers to 1.4.0 having a potential fix.

For me it seems to be that MBED studio adds zeroes before the uid and that makes it hang:

[2021-06-05T14:31:40.550] [INFO] root/mbs-deploy - flash --uid 000682112252 --target nrf52 --erase=chip /home/tjheiska/Mbed Programs/mbed-os-example-ble/BLE_GattServer_CharacteristicWrite/BUILD/NRF52_DK/ARMC6/BLE_GattServer_CharacteristicWrite.hex []
[2021-06-05T14:31:40.551] [DEBUG] root/process - Starting raw process: /home/tjheiska/.config/Mbed Studio/mbed-studio-tools/python/bin/pyocd, with args: flash --uid 000682112252 --target nrf52 --erase=chip /home/tjheiska/Mbed Programs/mbed-os-example-ble/BLE_GattServer_CharacteristicWrite/BUILD/NRF52_DK/ARMC6/BLE_GattServer_CharacteristicWrite.hex,  with options: {"cwd":"/home/tjheiska/.config/Mbed Studio/mbed-studio-tools/python/bin"} []
[2021-06-05T14:31:41.879] [INFO] root/mbs-deploy - Waiting for a debug probe matching unique ID '000682112252' to be connected...

pyocd list output

  #   Probe                                    Unique ID  
----------------------------------------------------------
  0   Segger J-Link OB-SAM3U128-V2-NordicSem   682112252  
1 Like