Skip to content

Commit 2a9f68a

Browse files
d-katoc1728p9
authored andcommitted
Add the process for the Cortex-A
- It branches in processing for Cortex-A by macro TARGET_MCU_CORTEX_A. - A "swd_host.c" for Cortex-A is created as "swd_host_ca.c". - The binary inspection was changed to "__weak" because there was no NVIC in Cortex-A.
1 parent 61e0765 commit 2a9f68a

File tree

5 files changed

+1256
-2
lines changed

5 files changed

+1256
-2
lines changed
Lines changed: 294 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,294 @@
1+
/**
2+
* @file debug_ca.h
3+
* @brief Access to ARM DAP (Cortex-A) using CMSIS-DAP protocol
4+
*
5+
* DAPLink Interface Firmware
6+
* Copyright (c) 2009-2016, ARM Limited, All Rights Reserved
7+
* SPDX-License-Identifier: Apache-2.0
8+
*
9+
* Licensed under the Apache License, Version 2.0 (the "License"); you may
10+
* not use this file except in compliance with the License.
11+
* You may obtain a copy of the License at
12+
*
13+
* http://www.apache.org/licenses/LICENSE-2.0
14+
*
15+
* Unless required by applicable law or agreed to in writing, software
16+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
17+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18+
* See the License for the specific language governing permissions and
19+
* limitations under the License.
20+
*/
21+
22+
#ifndef DEBUG_CA_H
23+
#define DEBUG_CA_H
24+
25+
#ifdef __cplusplus
26+
extern "C" {
27+
#endif
28+
29+
// Debug Port Register Addresses
30+
#define DP_IDCODE 0x00 // IDCODE Register (Read only)
31+
#define DP_ABORT 0x00 // Abort Register (Write only)
32+
#define DP_CTRL_STAT 0x04 // Control & Status
33+
#define DP_WCR 0x04 // Wire Control Register (SW Only)
34+
#define DP_DLCR 0x04 // Data Link Control Register (Renamed WCR)
35+
#define DP_SELECT 0x08 // Select Register (JTAG R/W & SW W)
36+
#define DP_RESEND 0x08 // Resend (SW Read Only)
37+
#define DP_RDBUFF 0x0C // Read Buffer (Read Only)
38+
39+
// Abort Register definitions
40+
#define DAPABORT 0x00000001 // DAP Abort
41+
#define STKCMPCLR 0x00000002 // Clear STICKYCMP Flag (SW Only)
42+
#define STKERRCLR 0x00000004 // Clear STICKYERR Flag (SW Only)
43+
#define WDERRCLR 0x00000008 // Clear WDATAERR Flag (SW Only)
44+
#define ORUNERRCLR 0x00000010 // Clear STICKYORUN Flag (SW Only)
45+
46+
// Debug Control and Status definitions
47+
#define ORUNDETECT 0x00000001 // Overrun Detect
48+
#define STICKYORUN 0x00000002 // Sticky Overrun
49+
#define TRNMODE 0x0000000C // Transfer Mode Mask
50+
#define TRNNORMAL 0x00000000 // Transfer Mode: Normal
51+
#define TRNVERIFY 0x00000004 // Transfer Mode: Pushed Verify
52+
#define TRNCOMPARE 0x00000008 // Transfer Mode: Pushed Compare
53+
#define STICKYCMP 0x00000010 // Sticky Compare
54+
#define STICKYERR 0x00000020 // Sticky Error
55+
#define READOK 0x00000040 // Read OK (SW Only)
56+
#define WDATAERR 0x00000080 // Write Data Error (SW Only)
57+
#define MASKLANE 0x00000F00 // Mask Lane Mask
58+
#define MASKLANE0 0x00000100 // Mask Lane 0
59+
#define MASKLANE1 0x00000200 // Mask Lane 1
60+
#define MASKLANE2 0x00000400 // Mask Lane 2
61+
#define MASKLANE3 0x00000800 // Mask Lane 3
62+
#define TRNCNT 0x001FF000 // Transaction Counter Mask
63+
#define CDBGRSTREQ 0x04000000 // Debug Reset Request
64+
#define CDBGRSTACK 0x08000000 // Debug Reset Acknowledge
65+
#define CDBGPWRUPREQ 0x10000000 // Debug Power-up Request
66+
#define CDBGPWRUPACK 0x20000000 // Debug Power-up Acknowledge
67+
#define CSYSPWRUPREQ 0x40000000 // System Power-up Request
68+
#define CSYSPWRUPACK 0x80000000 // System Power-up Acknowledge
69+
70+
// Debug Select Register definitions
71+
#define CTRLSEL 0x00000001 // CTRLSEL (SW Only)
72+
#define APBANKSEL 0x000000F0 // APBANKSEL Mask
73+
#define APSEL 0xFF000000 // APSEL Mask
74+
75+
// Access Port Register Addresses
76+
#define AP_CSW 0x00 // Control and Status Word
77+
#define AP_TAR 0x04 // Transfer Address
78+
#define AP_DRW 0x0C // Data Read/Write
79+
#define AP_BD0 0x10 // Banked Data 0
80+
#define AP_BD1 0x14 // Banked Data 1
81+
#define AP_BD2 0x18 // Banked Data 2
82+
#define AP_BD3 0x1C // Banked Data 3
83+
#define AP_ROM 0xF8 // Debug ROM Address
84+
#define AP_IDR 0xFC // Identification Register
85+
86+
// AP Control and Status Word definitions
87+
#define CSW_SIZE 0x00000007 // Access Size: Selection Mask
88+
#define CSW_SIZE8 0x00000000 // Access Size: 8-bit
89+
#define CSW_SIZE16 0x00000001 // Access Size: 16-bit
90+
#define CSW_SIZE32 0x00000002 // Access Size: 32-bit
91+
#define CSW_ADDRINC 0x00000030 // Auto Address Increment Mask
92+
#define CSW_NADDRINC 0x00000000 // No Address Increment
93+
#define CSW_SADDRINC 0x00000010 // Single Address Increment
94+
#define CSW_PADDRINC 0x00000020 // Packed Address Increment
95+
#define CSW_DBGSTAT 0x00000040 // Debug Status
96+
#define CSW_TINPROG 0x00000080 // Transfer in progress
97+
#define CSW_HPROT 0x02000000 // User/Privilege Control
98+
#define CSW_MSTRTYPE 0x20000000 // Master Type Mask
99+
#define CSW_MSTRCORE 0x00000000 // Master Type: Core
100+
#define CSW_MSTRDBG 0x60000000 // Master Type: Debug
101+
#define CSW_RESERVED 0x01000000 // Reserved Value
102+
103+
// Core Debug Register Address Offsets
104+
#define DBG_OFS 0x0DF0 // Debug Register Offset inside NVIC
105+
#define DBG_HCSR_OFS 0x00 // Debug Halting Control & Status Register
106+
#define DBG_CRSR_OFS 0x04 // Debug Core Register Selector Register
107+
#define DBG_CRDR_OFS 0x08 // Debug Core Register Data Register
108+
#define DBG_EMCR_OFS 0x0C // Debug Exception & Monitor Control Register
109+
110+
// Core Debug Register Addresses
111+
#define DBG_HCSR (DBG_Addr + DBG_HCSR_OFS)
112+
#define DBG_CRSR (DBG_Addr + DBG_CRSR_OFS)
113+
#define DBG_CRDR (DBG_Addr + DBG_CRDR_OFS)
114+
#define DBG_EMCR (DBG_Addr + DBG_EMCR_OFS)
115+
116+
// Debug Halting Control and Status Register definitions
117+
#define C_DEBUGEN 0x00000001 // Debug Enable
118+
#define C_HALT 0x00000002 // Halt
119+
#define C_STEP 0x00000004 // Step
120+
#define C_MASKINTS 0x00000008 // Mask Interrupts
121+
#define C_SNAPSTALL 0x00000020 // Snap Stall
122+
#define S_REGRDY 0x00010000 // Register R/W Ready Flag
123+
#define S_HALT 0x00020000 // Halt Flag
124+
#define S_SLEEP 0x00040000 // Sleep Flag
125+
#define S_LOCKUP 0x00080000 // Lockup Flag
126+
#define S_RETIRE_ST 0x01000000 // Sticky Retire Flag
127+
#define S_RESET_ST 0x02000000 // Sticky Reset Flag
128+
#define DBGKEY 0xA05F0000 // Debug Key
129+
130+
// Debug Exception and Monitor Control Register definitions
131+
#define VC_CORERESET 0x00000001 // Reset Vector Catch
132+
#define VC_MMERR 0x00000010 // Debug Trap on MMU Fault
133+
#define VC_NOCPERR 0x00000020 // Debug Trap on No Coprocessor Fault
134+
#define VC_CHKERR 0x00000040 // Debug Trap on Checking Error Fault
135+
#define VC_STATERR 0x00000080 // Debug Trap on State Error Fault
136+
#define VC_BUSERR 0x00000100 // Debug Trap on Bus Error Fault
137+
#define VC_INTERR 0x00000200 // Debug Trap on Interrupt Error Fault
138+
#define VC_HARDERR 0x00000400 // Debug Trap on Hard Fault
139+
#define MON_EN 0x00010000 // Monitor Enable
140+
#define MON_PEND 0x00020000 // Monitor Pend
141+
#define MON_STEP 0x00040000 // Monitor Step
142+
#define MON_REQ 0x00080000 // Monitor Request
143+
#define TRCENA 0x01000000 // Trace Enable (DWT, ITM, ETM, TPIU)
144+
145+
// NVIC: Interrupt Controller Type Register
146+
#define NVIC_ICT (NVIC_Addr + 0x0004)
147+
#define INTLINESNUM 0x0000001F // Interrupt Line Numbers
148+
149+
// NVIC: CPUID Base Register
150+
#define NVIC_CPUID (NVIC_Addr + 0x0D00)
151+
#define CPUID_PARTNO 0x0000FFF0 // Part Number Mask
152+
#define CPUID_REVISION 0x0000000F // Revision Mask
153+
#define CPUID_VARIANT 0x00F00000 // Variant Mask
154+
155+
// NVIC: Application Interrupt/Reset Control Register
156+
#define NVIC_AIRCR (NVIC_Addr + 0x0D0C)
157+
#define VECTRESET 0x00000001 // Reset Cortex-M (except Debug)
158+
#define VECTCLRACTIVE 0x00000002 // Clear Active Vector Bit
159+
#define SYSRESETREQ 0x00000004 // Reset System (except Debug)
160+
#define VECTKEY 0x05FA0000 // Write Key
161+
162+
// NVIC: Debug Fault Status Register
163+
#define NVIC_DFSR (NVIC_Addr + 0x0D30)
164+
#define HALTED 0x00000001 // Halt Flag
165+
#define BKPT 0x00000002 // BKPT Flag
166+
#define DWTTRAP 0x00000004 // DWT Match
167+
#define VCATCH 0x00000008 // Vector Catch Flag
168+
#define EXTERNAL 0x00000010 // External Debug Request
169+
170+
// Debug registers
171+
#define DEBUG_REGSITER_BASE (0x80030000)
172+
173+
#define DBGDIDR (DEBUG_REGSITER_BASE + (0 * 4)) // Debug ID
174+
#define DBGWFAR (DEBUG_REGSITER_BASE + (6 * 4)) // Watchpoint Fault Address
175+
#define DBGVCR (DEBUG_REGSITER_BASE + (7 * 4)) // Vector Catch
176+
#define DBGECR (DEBUG_REGSITER_BASE + (9 * 4)) // Event Catch
177+
#define DBGDTRRX (DEBUG_REGSITER_BASE + (32 * 4)) // Host to Target Data Transfer
178+
#define DBGITR (DEBUG_REGSITER_BASE + (33 * 4)) // WO Instruction Transfer
179+
#define DBGDSCR (DEBUG_REGSITER_BASE + (34 * 4)) // Debug Status and Control
180+
#define DBGDTRTX (DEBUG_REGSITER_BASE + (35 * 4)) // Target to Host Data Transfer
181+
#define DBGDRCR (DEBUG_REGSITER_BASE + (36 * 4)) // Debug Run Control
182+
#define DBGEACR (DEBUG_REGSITER_BASE + (37 * 4)) // External Auxiliary Control
183+
#define DBGPCSR (DEBUG_REGSITER_BASE + (40 * 4)) // Program Counter Sampling
184+
#define DBGCIDSR (DEBUG_REGSITER_BASE + (41 * 4)) // Context ID Sampling
185+
#define DBGVIDSR (DEBUG_REGSITER_BASE + (42 * 4)) // Virtualization ID Sampling
186+
#define DBGBVR0 (DEBUG_REGSITER_BASE + (64 * 4)) // Breakpoint Value
187+
#define DBGBVR1 (DEBUG_REGSITER_BASE + (65 * 4)) // Breakpoint Value
188+
#define DBGBVR2 (DEBUG_REGSITER_BASE + (66 * 4)) // Breakpoint Value
189+
#define DBGBVR3 (DEBUG_REGSITER_BASE + (67 * 4)) // Breakpoint Value
190+
#define DBGBVR4 (DEBUG_REGSITER_BASE + (68 * 4)) // Breakpoint Value
191+
#define DBGBVR5 (DEBUG_REGSITER_BASE + (69 * 4)) // Breakpoint Value
192+
#define DBGBVR6 (DEBUG_REGSITER_BASE + (70 * 4)) // Breakpoint Value
193+
#define DBGBVR7 (DEBUG_REGSITER_BASE + (71 * 4)) // Breakpoint Value
194+
#define DBGBVR8 (DEBUG_REGSITER_BASE + (72 * 4)) // Breakpoint Value
195+
#define DBGBVR9 (DEBUG_REGSITER_BASE + (73 * 4)) // Breakpoint Value
196+
#define DBGBVR10 (DEBUG_REGSITER_BASE + (74 * 4)) // Breakpoint Value
197+
#define DBGBVR11 (DEBUG_REGSITER_BASE + (75 * 4)) // Breakpoint Value
198+
#define DBGBVR12 (DEBUG_REGSITER_BASE + (76 * 4)) // Breakpoint Value
199+
#define DBGBVR13 (DEBUG_REGSITER_BASE + (77 * 4)) // Breakpoint Value
200+
#define DBGBVR14 (DEBUG_REGSITER_BASE + (78 * 4)) // Breakpoint Value
201+
#define DBGBVR15 (DEBUG_REGSITER_BASE + (79 * 4)) // Breakpoint Value
202+
#define DBGBCR0 (DEBUG_REGSITER_BASE + (80 * 4)) // Breakpoint Control
203+
#define DBGBCR1 (DEBUG_REGSITER_BASE + (81 * 4)) // Breakpoint Control
204+
#define DBGBCR2 (DEBUG_REGSITER_BASE + (82 * 4)) // Breakpoint Control
205+
#define DBGBCR3 (DEBUG_REGSITER_BASE + (83 * 4)) // Breakpoint Control
206+
#define DBGBCR4 (DEBUG_REGSITER_BASE + (84 * 4)) // Breakpoint Control
207+
#define DBGBCR5 (DEBUG_REGSITER_BASE + (85 * 4)) // Breakpoint Control
208+
#define DBGBCR6 (DEBUG_REGSITER_BASE + (86 * 4)) // Breakpoint Control
209+
#define DBGBCR7 (DEBUG_REGSITER_BASE + (87 * 4)) // Breakpoint Control
210+
#define DBGBCR8 (DEBUG_REGSITER_BASE + (88 * 4)) // Breakpoint Control
211+
#define DBGBCR9 (DEBUG_REGSITER_BASE + (89 * 4)) // Breakpoint Control
212+
#define DBGBCR10 (DEBUG_REGSITER_BASE + (90 * 4)) // Breakpoint Control
213+
#define DBGBCR11 (DEBUG_REGSITER_BASE + (91 * 4)) // Breakpoint Control
214+
#define DBGBCR12 (DEBUG_REGSITER_BASE + (92 * 4)) // Breakpoint Control
215+
#define DBGBCR13 (DEBUG_REGSITER_BASE + (93 * 4)) // Breakpoint Control
216+
#define DBGBCR14 (DEBUG_REGSITER_BASE + (94 * 4)) // Breakpoint Control
217+
#define DBGBCR15 (DEBUG_REGSITER_BASE + (95 * 4)) // Breakpoint Control
218+
#define DBGWVR0 (DEBUG_REGSITER_BASE + (96 * 4)) // Watchpoint Value
219+
#define DBGWVR1 (DEBUG_REGSITER_BASE + (97 * 4)) // Watchpoint Value
220+
#define DBGWVR2 (DEBUG_REGSITER_BASE + (98 * 4)) // Watchpoint Value
221+
#define DBGWVR3 (DEBUG_REGSITER_BASE + (99 * 4)) // Watchpoint Value
222+
#define DBGWVR4 (DEBUG_REGSITER_BASE + (100 * 4)) // Watchpoint Value
223+
#define DBGWVR5 (DEBUG_REGSITER_BASE + (101 * 4)) // Watchpoint Value
224+
#define DBGWVR6 (DEBUG_REGSITER_BASE + (102 * 4)) // Watchpoint Value
225+
#define DBGWVR7 (DEBUG_REGSITER_BASE + (103 * 4)) // Watchpoint Value
226+
#define DBGWVR8 (DEBUG_REGSITER_BASE + (104 * 4)) // Watchpoint Value
227+
#define DBGWVR9 (DEBUG_REGSITER_BASE + (105 * 4)) // Watchpoint Value
228+
#define DBGWVR10 (DEBUG_REGSITER_BASE + (106 * 4)) // Watchpoint Value
229+
#define DBGWVR11 (DEBUG_REGSITER_BASE + (107 * 4)) // Watchpoint Value
230+
#define DBGWVR12 (DEBUG_REGSITER_BASE + (108 * 4)) // Watchpoint Value
231+
#define DBGWVR13 (DEBUG_REGSITER_BASE + (109 * 4)) // Watchpoint Value
232+
#define DBGWVR14 (DEBUG_REGSITER_BASE + (110 * 4)) // Watchpoint Value
233+
#define DBGWVR15 (DEBUG_REGSITER_BASE + (111 * 4)) // Watchpoint Value
234+
#define DBGWCR0 (DEBUG_REGSITER_BASE + (112 * 4)) // Watchpoint Control
235+
#define DBGWCR1 (DEBUG_REGSITER_BASE + (113 * 4)) // Watchpoint Control
236+
#define DBGWCR2 (DEBUG_REGSITER_BASE + (114 * 4)) // Watchpoint Control
237+
#define DBGWCR3 (DEBUG_REGSITER_BASE + (115 * 4)) // Watchpoint Control
238+
#define DBGWCR4 (DEBUG_REGSITER_BASE + (116 * 4)) // Watchpoint Control
239+
#define DBGWCR5 (DEBUG_REGSITER_BASE + (117 * 4)) // Watchpoint Control
240+
#define DBGWCR6 (DEBUG_REGSITER_BASE + (118 * 4)) // Watchpoint Control
241+
#define DBGWCR7 (DEBUG_REGSITER_BASE + (119 * 4)) // Watchpoint Control
242+
#define DBGWCR8 (DEBUG_REGSITER_BASE + (120 * 4)) // Watchpoint Control
243+
#define DBGWCR9 (DEBUG_REGSITER_BASE + (121 * 4)) // Watchpoint Control
244+
#define DBGWCR10 (DEBUG_REGSITER_BASE + (122 * 4)) // Watchpoint Control
245+
#define DBGWCR11 (DEBUG_REGSITER_BASE + (123 * 4)) // Watchpoint Control
246+
#define DBGWCR12 (DEBUG_REGSITER_BASE + (124 * 4)) // Watchpoint Control
247+
#define DBGWCR13 (DEBUG_REGSITER_BASE + (125 * 4)) // Watchpoint Control
248+
#define DBGWCR14 (DEBUG_REGSITER_BASE + (126 * 4)) // Watchpoint Control
249+
#define DBGWCR15 (DEBUG_REGSITER_BASE + (127 * 4)) // Watchpoint Control
250+
#define DBGBXVR0 (DEBUG_REGSITER_BASE + (144 * 4)) // Breakpoint Extended Valueb
251+
#define DBGBXVR1 (DEBUG_REGSITER_BASE + (145 * 4)) // Breakpoint Extended Valueb
252+
#define DBGBXVR2 (DEBUG_REGSITER_BASE + (146 * 4)) // Breakpoint Extended Valueb
253+
#define DBGBXVR3 (DEBUG_REGSITER_BASE + (147 * 4)) // Breakpoint Extended Valueb
254+
#define DBGBXVR4 (DEBUG_REGSITER_BASE + (148 * 4)) // Breakpoint Extended Valueb
255+
#define DBGBXVR5 (DEBUG_REGSITER_BASE + (149 * 4)) // Breakpoint Extended Valueb
256+
#define DBGBXVR6 (DEBUG_REGSITER_BASE + (150 * 4)) // Breakpoint Extended Valueb
257+
#define DBGBXVR7 (DEBUG_REGSITER_BASE + (151 * 4)) // Breakpoint Extended Valueb
258+
#define DBGBXVR8 (DEBUG_REGSITER_BASE + (152 * 4)) // Breakpoint Extended Valueb
259+
#define DBGBXVR9 (DEBUG_REGSITER_BASE + (153 * 4)) // Breakpoint Extended Valueb
260+
#define DBGBXVR10 (DEBUG_REGSITER_BASE + (154 * 4)) // Breakpoint Extended Valueb
261+
#define DBGBXVR11 (DEBUG_REGSITER_BASE + (155 * 4)) // Breakpoint Extended Valueb
262+
#define DBGBXVR12 (DEBUG_REGSITER_BASE + (156 * 4)) // Breakpoint Extended Valueb
263+
#define DBGBXVR13 (DEBUG_REGSITER_BASE + (157 * 4)) // Breakpoint Extended Valueb
264+
#define DBGBXVR14 (DEBUG_REGSITER_BASE + (158 * 4)) // Breakpoint Extended Valueb
265+
#define DBGBXVR15 (DEBUG_REGSITER_BASE + (159 * 4)) // Breakpoint Extended Valueb
266+
#define DBGOSLAR (DEBUG_REGSITER_BASE + (192 * 4)) // OS Lock Access
267+
#define DBGOSLSR (DEBUG_REGSITER_BASE + (193 * 4)) // OS Lock Status
268+
#define DBGPRCR (DEBUG_REGSITER_BASE + (196 * 4)) // Powerdown and Reset Control
269+
#define DBGPRSR (DEBUG_REGSITER_BASE + (197 * 4)) // Powerdown and Reset Status
270+
#define DBGITCTRL (DEBUG_REGSITER_BASE + (960 * 4)) // Integration Mode Control
271+
#define DBGCLAIMSET (DEBUG_REGSITER_BASE + (1000 * 4)) // Claim Tag Set
272+
#define DBGCLAIMCLR (DEBUG_REGSITER_BASE + (1001 * 4)) // Claim Tag Clear
273+
#define DBGLAR (DEBUG_REGSITER_BASE + (1004 * 4)) // Lock Access
274+
#define DBGLSR (DEBUG_REGSITER_BASE + (1005 * 4)) // Lock Status
275+
#define DBGAUTHSTATUS (DEBUG_REGSITER_BASE + (1006 * 4)) // Authentication Status
276+
#define DBGDEVID2 (DEBUG_REGSITER_BASE + (1008 * 4)) // Debug Device ID 2
277+
#define DBGDEVID1 (DEBUG_REGSITER_BASE + (1009 * 4)) // Debug Device ID 1
278+
#define DBGDEVID (DEBUG_REGSITER_BASE + (1010 * 4)) // Debug Device ID
279+
#define DBGDEVTYPE (DEBUG_REGSITER_BASE + (1011 * 4)) // Device Type
280+
#define DBGPID0 (DEBUG_REGSITER_BASE + (1012 * 4)) // Debug Peripheral ID
281+
#define DBGPID1 (DEBUG_REGSITER_BASE + (1013 * 4)) // Debug Peripheral ID
282+
#define DBGPID2 (DEBUG_REGSITER_BASE + (1014 * 4)) // Debug Peripheral ID
283+
#define DBGPID3 (DEBUG_REGSITER_BASE + (1015 * 4)) // Debug Peripheral ID
284+
#define DBGPID4 (DEBUG_REGSITER_BASE + (1016 * 4)) // Debug Peripheral ID
285+
#define DBGCID0 (DEBUG_REGSITER_BASE + (1020 * 4)) // Debug Component ID
286+
#define DBGCID1 (DEBUG_REGSITER_BASE + (1021 * 4)) // Debug Component ID
287+
#define DBGCID2 (DEBUG_REGSITER_BASE + (1022 * 4)) // Debug Component ID
288+
#define DBGCID3 (DEBUG_REGSITER_BASE + (1023 * 4)) // Debug Component ID
289+
290+
#ifdef __cplusplus
291+
}
292+
#endif
293+
294+
#endif

source/daplink/interface/swd_host.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
* limitations under the License.
2020
*/
2121

22+
#ifndef TARGET_MCU_CORTEX_A
2223
#include "RTL.h"
2324
#include "target_reset.h"
2425
#include "target_config.h"
@@ -1050,3 +1051,4 @@ uint8_t swd_set_target_state_sw(TARGET_RESET_STATE state)
10501051

10511052
return 1;
10521053
}
1054+
#endif

source/daplink/interface/swd_host.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@
2424

2525
#include "flash_blob.h"
2626
#include "target_reset.h"
27+
#ifdef TARGET_MCU_CORTEX_A
28+
#include "debug_ca.h"
29+
#else
2730
#include "debug_cm.h"
31+
#endif
2832

2933
#ifdef __cplusplus
3034
extern "C" {

0 commit comments

Comments
 (0)