Hello I succeeded to configure QtCreator toolchain to compile and debug
my NRF52 board. So I wanted to share.
I use my own Makefile to compile everything so I will focus here on how to run
a debug session (with breakpoints and candies !) inside QtCreator (which is the best C++ IDE of course).
Even if you are not interested, can you try my tutorial and tell me where you have problems ?
So I can detail my configuration. It will help other guys.
OS: Windows 8.1
Arch: x86-64 but I tried to install 32bits tools
Easy step, I have version Qt Creator 4.0.0, based on Qt 5.6.0 (MSVC 2013, 32 bit)
Install SEGGER J-Link GDB Server V5.10u
To receive/send message via UART.
Install RealTerm: Serial Capture Program 126.96.36.199
Because it's cool to write documents with!
Open Help > About Plugins...
In Device Support section, enable BareMetal (v 4.0.0)
Open Tools > Options
In left pane, click BareMetal
Click Add > OpenOCD (even if we don't use OpenOCD)
Name = JLink GDB Server
Startup mode = No Startup
Host = localhost ; 2331
Init cmds =
set remote hardware-breakpoint-limit 6
set remote hardware-watchpoint-limit 6 #(Not sure about limit)
monitor semihosting enable
monitor reset 0
Reset cmds = monitor reset 0
Options left pane, go to Build & Run
Go to Debugger tab
Add a new one
Name = arm-gdb-py
Path = C:\nrf\toolchain\gnu-arm\5.3-2016q1\bin\arm-none-eabi-gdb-py.exe
(QtCreator needs python-enabled GDB)
Go to Kits tab
Name = NRF52
Device type = Bare Metal Device
Device = nrf52 device
Compiler = whatever, I use Makefile
Debugger = arm-gdb-py
Qt Version = None
Close and validate Options
make -rRj VERBOSE=0 nrf52
You should be able to set breakpoints and run in debug mode.
QtCreator will connect as a GDB client to the JLink GDB server (that you have to launch manually only once).
Then QtCreator will send the ".out" file to JLink which will load it into the board.
Any suggestions or improvements are welcome !
For some reason, Qt does not allow the creation of a Bare metal OpenOCD (only way to connect to jlink) configuration that as Startup mode = Startup in TCP/Ip mode.
So I'm unfortunately still manually launching gdb server.
i have been looking for even better integration, by having the debug output also sent to the application output pane, and start the gdb server automatically, but up till now did not succeed. Has anyone been able to do this?
Thanks, it was helpful. I managed to debug my custom board (based on a nrf52) using a j-link debugger and j-link gdb server