> You also mention ADIv5/v6 DAP.
> There is the ADIv6 feature of "nested APs" that is not supported yet
> in OpenOCD (I should work on it in the next months).
> It's possible to have in ADIv6 one AP that is mapped in the memory
> space of a parent MEM-AP. This nesting can be multiple, with an AP
> behind another AP that is behind another AP ...
>If this is your case, keep in mind that it's not addressed yet.

Antonio,
Please hold off on implementing OpenOCD "nested AP" support.  Daniel Goehring 
<[email protected]> from Ampere Computing has been working on an 
implementation.  It is undergoing testing but appears to be working with ADIv6 
on Armv7/Armv8/Armv9 PEs and nested AHB, AXI, and APB Access Ports.  He should 
be able to submit a patch for review in the coming weeks that matches the 
capabilities of other mainstream debuggers.

- Tony Ferranti

________________________________________
From: Agnelo Dcosta (QUIC) <[email protected]>
Sent: Thursday, October 2, 2025 12:45 PM
To: Antonio Borneo
Cc: Ashi Gupta; OpenOCD
Subject: Re: OpenOCD support for debug of non-ARM subsystems accessible via ARM 
ADI DAP

Some people who received this message don't often get email from 
[email protected]. Learn why this is 
important<https://aka.ms/LearnAboutSenderIdentification>
Thanks for your response Antonio!

>  What kind of configuration do you have? MEM-AP or JTAG-AP?
It is a MEM-AP configuration that is present.
 And with respect to ADIv6 - No, we are not using Nested APs

As I mentioned in my previous mail. we have some implementation that is working 
for us for RISC-V core debug via the ARM DAP. But it needs to be made more 
generic. With guidance and inputs from you guys we would be glad to contribute 
towards adding the MEM-AP debug support in a proper manner.

Regards,
Agnelo


________________________________
From: Antonio Borneo <[email protected]>
Sent: Thursday, October 2, 2025 3:57 PM
To: Agnelo Dcosta <[email protected]>
Cc: OpenOCD <[email protected]>; Ashi Gupta 
<[email protected]>
Subject: Re: OpenOCD support for debug of non-ARM subsystems accessible via ARM 
ADI DAP

WARNING: This email originated from outside of Qualcomm. Please be wary of any 
links or attachments, and do not enable macros.

On Wed, Oct 1, 2025 at 12:53 PM Agnelo Dcosta <[email protected]> wrote:
>
> Hi Antonio,
>
> On Qualcomm SoCs, along with the main ARMv8 CPU there exist several other 
> subsystems/cores based on RISC-V, Xtensa and Qualcomm's own Hexagon DSP.  
> Debug access to these cores is provisioned via the main ARM ADIv5/v6 DAP.
> It appears, currently that there is no provision in the OpenOCD mainline to 
> be able to debug non-ARM sub-systems accessible through the ARM DAP.
>
> For enabling debug of RISC-V cores on QCOM SoCs, we have experimented by 
> making some hacks to the existing OpenOCD code and it is working for us.  We, 
> however, are not quite sure whether our approach is right.
>
> Would like to get your perspective on
>     (a) whether such configurations for debug of non-ARM cores via the ARM 
> DAP should/would be supported and
>     (b) if yes, what should the approach be

Hi Agnelo,

such mixed SoCs are getting common.
Also the new RPi2050 MCU should have both Cortex-M and RISC-V cores,
but I ignore the details.
So far there is no dev in OpenOCD for supporting such a mix, but any
contribution is welcome.

There are actually two ways to put a non-Arm core behind an Arm DAP:
- using a standard Arm memory Access Port (MEM-AP) to access the debug
bus of the non-Arm core;
- using an Arm JTAG-AP and then implement in the SoC a JTAG chain that
accesses the JTAG debug of the non-Arm core.

The first case should require:
- to provide the needed flags '-dap' and '-ap-num' to the command
'target create' (easy stuff)
- decouple the R/W access on the debug bus of the core from the
currently supported interface; there could be some JTAG API mixed in
the target's code
- check the presence of '-dap' info to switch between direct JTAG and
DAP (in case of DAP we already manage SWD/JTAG cases).

The second case is more tricky. While a preliminary support for
JTAG-AP has been proposed in gerrit, I rejected it as not properly
done.
I want to have OpenOCD supporting multiple interfaces, at first. I
mean handling two or more independent interfaces that connect to
independent SoCs
Once this is in place, the JTAG-AP should be added as a new interface,
driven by its parent DAP and by the parent interface.
This would allow addressing any possible core behind the JTAG-AP, with
minor modifications to the target's code.

What kind of configuration do you have? MEM-AP or JTAG-AP?

You also mention ADIv5/v6 DAP.
There is the ADIv6 feature of "nested APs" that is not supported yet
in OpenOCD (I should work on it in the next months).
It's possible to have in ADIv6 one AP that is mapped in the memory
space of a parent MEM-AP. This nesting can be multiple, with an AP
behind another AP that is behind another AP ...
If this is your case, keep in mind that it's not addressed yet.

Best Regards,
Antonio



Reply via email to