% render "layouts/basic.html" do %# HTML tags can be embedded in mark down files if you want to do specific custom %# formatting like this, but in most cases that is not required.
.gemspec
~~~ruby
spec.add_development_dependency "origen_arm_debug", ">= <%= Origen.app.version %>"
~~~
__NOTE:__ You will also need to include require 'origen_arm_debug'
somewhere in your environment. This can be done in config/environment.rb
for example.
### How To Use
Include the OrigenARMDebug
module in your DUT class, this provides
read_register
and write_register
methods that will
be used automatically by any register read/write operations.
It also provides meathods using the ARM Debug protocol including:
accessing device memory, accessing core and floating point regesters (coretx M cores only),
entering/exiting debug mode (coretx M cores only), setting the PC (coretx M cores only)
and stepping through code (coretx M cores only).
You must also include a compatible physical driver depending on what debug
interface your DUT has, one of the following can be used:
* [JTAG](http://origen-sdk.org/jtag)
* [Single Wire Debug](http://origen-sdk.org/swd)
~~~ruby
class DUT
include OrigenARMDebug
include Origen::Registers
# Also include the required physical driver (not shown here)
def initialize
add_reg :test, 0x0012, 16, :upper_byte => {pos: 8, bits: 8},
:lower_byte => {pos: 0, bits: 8}
end
end
DUT.new.reg(:test).write!(0x55AA) # => Will generate the required vectors using the ARM debug protocol
~~~
### How To Setup a Development Environment
[Clone the repository from Github](https://github.com/Origen-SDK/origen_arm_debug).
An instance of the OrigenARMDebug driver is hooked up to a dummy DUT
object for use in the console:
~~~
origen i
> $dut.arm_debug
=> #