LS1046ARDB - How to use CMIS-DAP interface for debug ?

Showing results for 
Search instead for 
Did you mean: 

LS1046ARDB - How to use CMIS-DAP interface for debug ?

Contributor II


In LS1046ARDB reference manual it is stated that CMIS DAP interface can be used for debugging or flashing applications.

"CMSIS-DAP features a mass storage device (MSD) boot loader, which provides a quick and easy mechanism for loading different CMSIS-DAP applications, such as flash programmers, run control debug interfaces, serial-to-USB converters, and so on."

Figure 2-15 shows that K22 MCU is used to acces JTAG signals, so that it is possible to debug or flash.

How can we use this feature ? Where can we get binairies for K22 MCU ?


Labels (1)
0 Kudos
2 Replies

Contributor II


For those interested, here is a config file for Open OCD.

# Include script to setup CMSIS debug interface
source [find interface/cmsis-dap.cfg]

# Select transport type
transport select jtag

# Target definition
if { [info exists CHIPNAME] } {
} else {
    set _CHIPNAME ls1046a

if { [info exists CPUTAPID] } {
} else {
    set _CPUTAPID 0x5ba00477

adapter_khz 6000
reset_config srst_only

jtag newtap $_CHIPNAME cpu -irlen 4 -expected-id $_CPUTAPID
jtag newtap $_CHIPNAME sap -irlen 8 -expected-id 0x06b3001d

dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu

target create $ ls1_sap \
                         -chain-position $

## declare the 4 cores
set $_TARGETNAME.cti(0) 0x80420000
set $_TARGETNAME.cti(1) 0x80520000
set $_TARGETNAME.cti(2) 0x80620000
set $_TARGETNAME.cti(3) 0x80720000
set $_TARGETNAME.dbgbase(0) 0x80410000
set $_TARGETNAME.dbgbase(1) 0x80510000
set $_TARGETNAME.dbgbase(2) 0x80610000
set $_TARGETNAME.dbgbase(3) 0x80710000

set _smp_command ""

set _cores 4
for { set _core 0 } { $_core < $_cores } { incr _core 1 } {
    cti create cti$_core \
    -dap $_CHIPNAME.dap\
    -ctibase [set $_TARGETNAME.cti($_core)] \
     -ap-num 1
    set _command "target create ${_TARGETNAME}$_core aarch64 \
                         -dap $_CHIPNAME.dap -coreid $_core \
             -dbgbase [set  $_TARGETNAME.dbgbase($_core)]\
             -cti cti$_core"
    if { $_core != 0 } {
        # non-boot core examination may fail
        # set _command "$_command -defer-examine"
        set _smp_command "$_smp_command ${_TARGETNAME}$_core"
    } else {
        set _smp_command "target smp ${_TARGETNAME}$_core"
    eval $_command
eval $_smp_command

proc ls1046a_prepare { } {
    # Bypass Trust Zone Controller to allow reading and writing anywhere
    echo "Bypassing TZC..."
    targets mww 0x151021c 0 1
$ configure -event examine-end ls1046a_prepare

NXP TechSupport
NXP TechSupport

NXP offers CodeWarrior CW4NET 1801:


This CodeWarrior supports CMSIS-DAP for code loading and debugging.

Download and install the latest CMSIS-DAP serial driver for Windows:

Look at the Section 5.4 of the ARMv8_Targeting_Manual.pdf file about using CMSI-DAP.

This file is available in CodeWarrior folder.

Evaluation version of CodeWarrior provides full functionality during one month.

Have a great day,
Pavel Chubakov

Note: If this post answers your question, please click the Correct Answer button. Thank you!

0 Kudos