boards: cc3235sf_launchxl: use OpenOCD from Zephyr SDK
We should use OpenOCD from the latest Zephyr SDK as opposed to using TI OpenOCD. There is a known issue with the current release (0.10.2) of the SDK in how it resets the network processor, but we can deal with it subsequently. Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
This commit is contained in:
parent
fb0c846db9
commit
89930a4259
3 changed files with 30 additions and 19 deletions
|
@ -1,8 +1,5 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
# Use the TI OpenOCD (by default in /usr/local/openocd)
|
||||
# See the Zephyr project CC3235SF_LAUNCHXL documentation on
|
||||
# flashing prerequisites.
|
||||
set(OPENOCD "/usr/local/bin/openocd" CACHE FILEPATH "" FORCE)
|
||||
set(OPENOCD_DEFAULT_PATH ${OPENOCD}/scripts)
|
||||
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
|
|
|
@ -152,17 +152,31 @@ Prerequisites:
|
|||
|
||||
Remove power from the board (disconnect USB cable) before switching jumpers.
|
||||
|
||||
#. Install TI OpenOCD
|
||||
#. Install OpenOCD
|
||||
|
||||
Clone the TI OpenOCD git repository from: http://git.ti.com/sdo-emu/openocd.
|
||||
Follow the instructions in the Release Notes in that repository to build
|
||||
and install.
|
||||
You can obtain OpenOCD by following these
|
||||
:ref:`installing the latest Zephyr SDK instructions <zephyr_sdk>`.
|
||||
|
||||
Since the default TI OpenOCD installation is ``/usr/local/bin/``,
|
||||
and ``/usr/local/share/``, you may want to backup any current openocd
|
||||
installations there.
|
||||
If you decide to change the default installation location, also update
|
||||
the OPENOCD path variable in :zephyr_file:`boards/arm/cc3235sf_launchxl/board.cmake`.
|
||||
After the installation, add the directory containing the OpenOCD executable
|
||||
to your environment's PATH variable. For example, use this command in Linux:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
export PATH=$ZEPHYR_SDK_INSTALL_DIR/sysroots/x86_64-pokysdk-linux/usr/bin/openocd:$PATH
|
||||
|
||||
If you had previously installed TI OpenOCD, you can simply switch to use
|
||||
the one in the Zephyr SDK. If for some reason you wish to continue to use
|
||||
your TI OpenOCD installation, you can set the OPENOCD and
|
||||
OPENOCD_DEFAULT_PATH variables in
|
||||
:zephyr_file:`boards/arm/cc3220sf_launchxl/board.cmake` to point the build
|
||||
to the paths of the OpenOCD binary and its scripts, before
|
||||
including the common openocd.board.cmake file:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
set(OPENOCD "/usr/local/bin/openocd" CACHE FILEPATH "" FORCE)
|
||||
set(OPENOCD_DEFAULT_PATH /usr/local/share/openocd/scripts)
|
||||
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||
|
||||
#. Ensure CONFIG_XIP=y (default) is set.
|
||||
|
||||
|
@ -200,6 +214,12 @@ To see program output from UART0, connect a separate terminal window:
|
|||
|
||||
Then press the reset button (SW1) on the board to run the program.
|
||||
|
||||
When using OpenOCD from Zephyr SDK 0.10.2 to flash the device, you may notice
|
||||
the program hangs when starting the network processor on the device, if the
|
||||
program uses it. There is a known issue with how that version of OpenOCD
|
||||
resets the network processor. You would need to manually hit the reset button
|
||||
on the board to properly reset the device after flashing.
|
||||
|
||||
Debugging
|
||||
=========
|
||||
|
||||
|
|
|
@ -1,10 +1,4 @@
|
|||
#
|
||||
# TI CC3235SF-LaunchXL Evaluation Kit
|
||||
#
|
||||
source [find interface/xds110.cfg]
|
||||
transport select swd
|
||||
source [find target/ti_cc3220sf_vr.cfg]
|
||||
if { ![using_hla] } {
|
||||
cortex_m reset_config srst_only
|
||||
}
|
||||
adapter_khz 2500
|
||||
source [find board/ti_cc3220sf_launchpad.cfg]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue