
https://www.lairdconnect.com/
9
© Copyright 2021 Laird Connectivity, Inc.
All Rights Reserved
Americas
: +1-800-492-2320
Europe
: +44-1628-858-940
Hong Kong
: +852 2923 0610
Use pyOCD to start a GDB server with the module. The command line options are: pyocd gdbserver -t <TARGET>
where <TARGET> can be nrf51, nrf52 or nrf52840.
If there is an issue during debugging, it could be related to the flash programming speed.
The speed can be increased or reduced by using the -f <FREQUENCY> option. Try starting at 5M and decrementing by
1. If programming still fails at 1 MHz then the setup of the programming board and target module should be
investigated. Speeds can also be increased up to 8M for faster debugging.
Launch ARM GCC GDB from where your files to debug are located.
Connect from GDB to the server by sending the following command: target remote localhost:3333.
You are now able to load/debug code on the target device. It is possible that external toolchains can be set up to allow
debugging through a GUI. This is outside the scope of this document.
The BT510 module can be programmed directly from a Zephyr RTOS build tree. For details and an example of how to do this,
follow the instructions on the Zephyr documentation site:
https://docs.zephyrproject.org/latest/boards/arm/bt510/doc/bt510.html
A boards file is included with Zephyr which maps the sensors/peripherals and GPIOs out for software development. We
recommend that a complete application should have the application firmware and the mcuboot bootloader programmed so that
the software on the unit can be upgraded in the field (for example, using Bluetooth). The design of such an upgrade system is
outside the scope of this document. Details and information on this can be found on the Zephyr project website.
The USB-SWD Programmer features a UART (J1) which can be used to connect to modules and other devices. A jumper
must be fitted on J35 to route the pins to the UART interface, otherwise they are disconnected. Note that this is a UART
interface which is exposed to the host PC, no external USB/PC UART cable needs to be connected to this PC for access of
the UART by the PC.
Note:
Power is supplied via this interface (and subject to the same constraints as listed in the
DD
pin at the level set by the switches. There is a solder bridge (SB2) which can be
cut to prevent this if it is not desired.
The UART operates over the voltage range of 0v to V
DD
(set by the switches) as a TTL UART and is not compatible with an
RS232 UART. Connecting RS232 lines directly to the UART interface is likely to cause irreparable damage to the
programming board and devices to which it is connected. A voltage level translation circuit is required for this operation which
is outside the scope of this document.
The pinout of this connector is displayed on the board, and is as follows:
Pin
Function
Perspective (USB-SWD Programmer Board)
1
Ground