Class: OrigenARMDebug::DAPController
- Inherits:
-
Object
- Object
- OrigenARMDebug::DAPController
show all
- Includes:
- Origen::Controller, Helpers
- Defined in:
- lib/origen_arm_debug/dap_controller.rb
Instance Attribute Summary collapse
-
#dp ⇒ Object
Returns the currently enabled DP (or the only DP if only one of them).
Instance Method Summary
collapse
Methods included from Helpers
#extract_address, #extract_data, #log
Instance Attribute Details
#dp ⇒ Object
Returns the currently enabled DP (or the only DP if only one of them). If no dp is enabled before calling this, it will choose the SW_DP by default.
12
13
14
|
# File 'lib/origen_arm_debug/dap_controller.rb', line 12
def dp
@dp
end
|
Instance Method Details
#is_jtag? ⇒ Boolean
34
35
36
|
# File 'lib/origen_arm_debug/dap_controller.rb', line 34
def is_jtag?
dp.is_jtag?
end
|
#is_swd? ⇒ Boolean
Also known as:
is_sw?
38
39
40
|
# File 'lib/origen_arm_debug/dap_controller.rb', line 38
def is_swd?
dp.is_swd?
end
|
#reset_dp ⇒ Object
30
31
32
|
# File 'lib/origen_arm_debug/dap_controller.rb', line 30
def reset_dp
@dp = nil
end
|
#set_dp(dp) ⇒ Object
16
17
18
19
20
21
22
23
24
25
26
27
28
|
# File 'lib/origen_arm_debug/dap_controller.rb', line 16
def set_dp(dp)
if dps.size > 1
if dp == :swd || dp == :sw
@dp = dps.first
elsif dp == :jtag
@dp = dps.last
else
Origen.log.error 'origen_arm_debug: Only SWD and JTAG DP available'
end
else
Origen.log.warn 'origen_arm_debug: Ignoring set_dp call since only one DP is available'
end
end
|