Skip to content

Commit 27bbb24

Browse files
author
Jamie McCrae
committedMar 8, 2021
boards: arm: bt510: add support for pyocd
The programming hardware for this board is not JLINK based Signed-off-by: Jamie McCrae <jamie.mccrae@lairdconnect.com>
1 parent 1ce264e commit 27bbb24

File tree

3 files changed

+30
-9
lines changed

3 files changed

+30
-9
lines changed
 

‎boards/arm/bt510/board.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# SPDX-License-Identifier: Apache-2.0
22

3+
board_runner_args(pyocd "--target=nrf52840" "--frequency=4000000")
34
board_runner_args(nrfjprog "--softreset")
45
board_runner_args(jlink "--device=nrf52" "--speed=4000")
6+
include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake)
57
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
68
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)

‎boards/arm/bt510/doc/bt510.rst

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -164,32 +164,48 @@ A non-standard layout is used to include access to the sensor debug UART.
164164
Connectivity to the programmer/debugger must be modified to match
165165
the pinout shown above.
166166

167-
Laird Connectivity provide the USB-SWD programming board that supports
167+
Laird Connectivity provide the USB-SWD programming board (750-03239) that supports
168168
this connector layout, refer to the `USB SWD Programmer product page`_
169169
.
170170

171171
Flashing
172172
========
173173

174-
Follow the instructions in the :ref:`nordic_segger` page to install
175-
and configure all the necessary software. Further information can be
176-
found in :ref:`nordic_segger_flashing`. Then build and flash
177-
applications as usual (see :ref:`build_an_application` and
178-
:ref:`application_run` for more details).
174+
To connect the BT510 board for programming or debugging using the USB-SWD programming
175+
board, on the programming board set SW6 to the supply out position and SW5 to the 3V3
176+
position, ensure there is a jumper on J35 and that SW1 is in the debug position, then
177+
connect the BT510 to the board using the Tag-Connect cable via J3:
178+
179+
.. figure:: img/bt510_prog.png
180+
:width: 630px
181+
:align: center
182+
:alt: Sentrius BT510 Sensor connected to programming board
183+
184+
Sentrius BT510 Sensor connected to programming board
185+
186+
Then build and flash applications as usual (see :ref:`build_an_application` and
187+
:ref:`application_run` for more details). For example, to flash:
188+
189+
.. code-block:: console
190+
191+
$ ninja flash
179192
180193
Here is an example for the :ref:`hello_world` application.
181194

182195
First, run your favorite terminal program to listen for output.
183196

184197
NOTE: On the BT510, the UART lines are at TTL levels and must be passed through
185198
an appropriate line driver circuit for translation to RS232 levels. Refer to the `MAX3232 datasheet`_
186-
for a suitable driver IC.
199+
for a suitable driver IC. The USB-SWD programming board has an in-built UART connected
200+
to the BT510 acting as a USB CDC port, on Linux and Windows 10 this driver should be
201+
installed automatically, for Windows 7, the MBED driver is required to use the serial
202+
port - see the `MBED Serial Driver`_ link for details and how to install the driver.
187203

188204
.. code-block:: console
189205
190206
$ minicom -D <tty_device> -b 115200
191207
192-
Replace :code:`<tty_device>` with the port where the bt510 can be found. For example, under Linux, :code:`/dev/ttyUSB0`.
208+
Replace :code:`<tty_device>` with the port where the bt510 can be found. For example, under Linux, :code:`/dev/ttyACM0`.
193209

194210
Then build and flash the application in the usual way.
195211

@@ -206,7 +222,9 @@ Debugging
206222
The ``bt510`` board does not have an on-board J-Link debug IC
207223
as some nRF5x development boards, however, instructions from the
208224
:ref:`nordic_segger` page also apply to this board, with the additional step
209-
of connecting an external debugger.
225+
of connecting an external debugger. The USB-SWD programmer board has a CMSIS debugger
226+
compatible interface and debugging can be performed using pyocd, openocd or any other
227+
applications that support the CMSIS interface.
210228

211229
Testing Bluetooth on the BT510
212230
***********************************
@@ -244,3 +262,4 @@ References
244262
.. _Silabs 7055 datasheet: https://www.silabs.com/documents/public/data-sheets/Si7050-1-3-4-5-A20.pdf
245263
.. _ST Microelectronics LIS2DH datasheet: https://www.st.com/resource/en/datasheet/lis2dh.pdf
246264
.. _Honeywell SM351LT datasheet: https://sensing.honeywell.com/honeywell-sensing-nanopower-series-datasheet-50095501-c-en.pdf
265+
.. _MBED Serial Driver: https://os.mbed.com/docs/mbed-os/v6.8/program-setup/windows-serial-driver.html
373 KB
Loading

0 commit comments

Comments
 (0)
Please sign in to comment.