Simulating the XMEGA Target Code

Revision as of 05:13, 3 June 2016 by Coflynn (Talk | contribs)

Revision as of 05:13, 3 June 2016 by Coflynn (Talk | contribs)

This page describes how to simulate the XMEGA target code in order to determine the length of time AES takes. This was designed for the CHES CTF 2016, but may be valuable in other circumstances.

Required Tools

You will require the following tools:

  • Atmel Studio 7
  • avr-gcc (suggested to use WinAVR, but you can actually build with Atmel Studio)

Simulating

The following assumes you have an EXTERNAL build environment (such as WinAVR, or avr-gcc). If you'd like to use Atmel Studio to build the project, see instructions at the end of this page.

Opening Object File

To begin, we'll be opening the existing .elf file. This file contains all the debug information created during the build process.

From the File --> Open menu, select Open Object File For Debugging:

Sim1 openobject.png

Simulating

Sim2 selectelf.png

Sim3 saveproject.png

Sim4 selectxmega.png

Sim5 openfile.png

Sim6 setbreakpoint.png

Sim7 selecttoolA.png

Sim8 selecttoolB.png

Sim9 startdebug.png

Sim10 insertcall.png

Sim11 reload1.png

Sim11 reload2.png

Sim12 pstatus.png

Sim13 cyclecount.png

Sim14 resettozero.png

Sim15 bpnothit.png

Sim16 stepin.png


Timing

Building