Let's build our own On Chip Debugger application - STEP 0

 After having explained the basics of JTAG and DAS, it's time to go in deep and try to create our own tool that connect AURIX™ via DAS server.

The starting point is the public software of MCDS, as available at DAS Tool Interface, in fact on the left side, a demo project is available. Let's have a look to what is and what we can do with it!.

So, let's download and place into our PC drive... the ZIP file contains a msvc2010 project:

I use Microsoft Visual Studio 2012, thus I open the downloaded project example:


I have to admit that is not so straightforward to get it working. Few changes are needed, most likely related to the change of compiler. In my case, I had to comment several assert statements.. Anyhow, this is what you can get (and soon I will commit my code in some GitHub):

At the beginning, let's acknowledge that the demo software starts with several queries to the user (via command line interface) to select what library, IP address, etc. After that, the demo tool offers a short menu for interactive behavior, such as:

Control core:         run, stop, step <steps>
Reset (and Halt):     rst, rsthlt
Read 32 bit word:     read <addr>
Read N bytes:         read <addr> <n_bytes>
Read 8 bit word:      r8 <addr>
Write 32 bit word:    write <addr> <value>
Set IP breakpoint:    bpt <addr> 
Clear IP breakpoint:  bpt
Query state:          s
Access HW frequency:  frequ <f_hz>
Exit:                 exit

That is already quite a lot and set the basis to develop our own On Chip Debug toolchain on top.

For the moment, let's play a bit with this tool, as for example:

Note: to make it easy, just remember to enter '0' at each question the tool is asking for..

And here an example to run step by step the first few execution steps after boot:


Note: please note that the left address is the Instruction Pointer (IP), such give us a simple indication of what address the code is fetched from. In details: code execution starts from 0xA0000020, but after 3 instructions it continues from the cached enabled address: 0x800007E6. Really interesting... isn't it?!

And here another exaction example:

Now, it's your time!











Commenti