I’m using the Mbed Studio IDE to develop some code for my FRDM-K64F board. The debugger built into that board is fine for now. Once I build my own boards for my design, they’ll lack the embedded debugger hardware and I’ll need to use something like a Segger J-Link to program and debug my code.
Is there a plan to support the Segger J-Link from within the Mbed Studio IDE?
If not, is there an alternative standalone programmer / debugger I can use to debug my software once I transition to my own board design?
Apologies for the late reply on this. We are introducing support for custom boards in our 1.0 release and have mainly been using an external STLink for testing. However, Mbed Studio currently uses pyOCD under the hood, and Segger J-Link is listed as “experimental”: https://github.com/mbedmicro/pyOCD
For moving to your custom board, we have a couple of options: export to an IDE like Keil MDK and use that (J-link is supported), or use the Mbed command line tools, which we do ship with Mbed Studio (you’ll need to manually set up a debugger etc for this).
We are also carrying out some research at the moment to understand how we can support custom board development more seamlessly, so if you are happy to provide some insight, please get in touch with us at firstname.lastname@example.org.
i am using SEGGER J-Link for flashing our boards.
- Create a file
jlflash.jlink with this content
loadfile BUILD/main/app_main.hex 0
- Flash the hex with this command
Thanks for the replies, everybody! I’ll check out the command line tools. I’ve also found a few open source projects to build low-cost USB CMSIS-DAP debuggers that connect to the target using the 10-pin SWD interface that I plan on checking out.
I use JLink and Ozone.
Accono has an inexpensive programmer with tag-connect. I haven’t tried it yet. But, I thought it might work for you.
Hi @bikerglen, @schef, @lonesometraveler,
A new version of Mbed Studio has just been released today. We added support in it for custom boards connected using external probes. You can find more information about it here: https://os.mbed.com/docs/mbed-studio/current/mbed-os/custom-targets.html
Arek - Mbed Studio team
Thanks, Alex. I’ll try to install it tonight and take a look at it.
I’d also love to hook my J-Link up to Mbed Studio. I’ve noticed that the new custom board feature seems to recognize the J-Link driver, but if I try to use the run or debug functions, it produces a PyOCD deploy failed error. Anything special I need to do? I’m targeting a MK64F.
Have you tried your J-Link with pyOCD directly? According to this: https://github.com/mbedmicro/pyOCD/blob/master/pyocd/probe/jlink_probe.py it should be supported, but to be open with you, our team doesn’t have access to any J-Link probes at the moment since we’re all WFH.
I’m able to flash and use the commander from the pyOCD command line interface. Any info I can give you to help?
Has there been any updates on supporting J-Links in MBED studio?
I’m trying to use the JLink-Edu Mini with the nrf52832 and I get the following error when running pyocd in Mbed Studio Terminal window.
0001188:INFO:board:Target type is nrf52
0001538:INFO:dap:DP IDR = 0x2ba01477 (v1 rev2)
0001580:CRITICAL:main:uncaught exception: ‘JLinkProbe’ object has no attribute ‘_lock’
I have pyocd version 0.27.0 along with Python 3.7.1
Any help would be really appreciated.