Skip to content

Commit

Permalink
boards: lpcxpresso55s69: enable multicore debugging
Browse files Browse the repository at this point in the history
 - Refactoring of the cmake code so LinkServer can be invoked with the
correct switches.
 - Documentation update

Signed-off-by: Yves Vandervennet <[email protected]>
  • Loading branch information
yvanderv committed Oct 29, 2024
1 parent 0e036a3 commit baf4b70
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
14 changes: 9 additions & 5 deletions boards/nxp/lpcxpresso55s69/board.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,19 @@
## DAP Link implementation in pyocd is underway,
## until then jlink can be used or copy image to storage

if(CONFIG_BOARD_LPCXPRESSO55S69_LPC55S69_CPU0 OR
CONFIG_BOARD_LPCXPRESSO55S69_LPC55S69_CPU0_NS OR
CONFIG_SECOND_CORE_MCUX)
board_runner_args(linkserver "--device=LPC55S69:LPCXpresso55S69")

if(CONFIG_SECOND_CORE_MCUX)
board_runner_args(linkserver "--core=all")
elseif(CONFIG_BOARD_LPCXPRESSO55S69_LPC55S69_CPU0 OR
CONFIG_BOARD_LPCXPRESSO55S69_LPC55S69_CPU0_NS)
board_runner_args(jlink "--device=LPC55S69_M33_0")
board_runner_args(linkserver "--device=LPC55S69:LPCXpresso55S69")
board_runner_args(linkserver "--override=/device/memory/0/flash-driver=LPC55xx_S.cfx")
board_runner_args(linkserver "--override=/device/memory/0/location=0x10000000")
board_runner_args(linkserver "--core=cm33_core0")
elseif(CONFIG_BOARD_LPCXPRESSO55S69_LPC55S69_CPU1)
board_runner_args(jlink "--device=LPC55S69_M33_1")
board_runner_args(linkserver "--core=cm33_core1")
endif()

board_runner_args(pyocd "--target=lpc55s69")
Expand All @@ -25,6 +29,6 @@ if(CONFIG_BUILD_WITH_TFM)
set_property(TARGET runners_yaml_props_target PROPERTY hex_file tfm_merged.hex)
endif()

include(${ZEPHYR_BASE}/boards/common/linkserver.board.cmake)
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake)
include(${ZEPHYR_BASE}/boards/common/linkserver.board.cmake)
7 changes: 4 additions & 3 deletions boards/nxp/lpcxpresso55s69/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ Build and flash applications as usual (see :ref:`build_an_application` and
Configuring a Debug Probe
=========================

LinkServer is the default runner for this board.
A debug probe is used for both flashing and debugging the board. This board is
configured by default to use the LPC-Link2 CMSIS-DAP Onboard Debug Probe,
however the :ref:`pyocd-debug-host-tools` does not yet support this probe so you
Expand Down Expand Up @@ -316,7 +317,7 @@ Flashing
========

Here is an example for the :zephyr:code-sample:`hello_world` application. This example uses the
:ref:`jlink-debug-host-tools` as default.
:ref:`linkserver-debug-host-tools` as default.

.. zephyr-app-commands::
:zephyr-app: samples/hello_world
Expand All @@ -328,8 +329,8 @@ see the following message in the terminal:

.. code-block:: console
***** Booting Zephyr OS v1.14.0 *****
Hello World! lpcxpresso55s69
***** Booting Zephyr OS v3.7.0 *****
Hello World! lpcxpresso55s69/lpc55s69/cpu0
Building and flashing secure/non-secure with Arm |reg| TrustZone |reg|
----------------------------------------------------------------------
Expand Down

0 comments on commit baf4b70

Please sign in to comment.