458
edits
Changes
Created page with "== Building firmware == The XMEGA uses AVR architecture and needs an AVR compiler. The target firmware can be found under the <code>chipwhisperer/hardware/victims/firmware/</c..."
== Building firmware ==
The XMEGA uses AVR architecture and needs an AVR compiler. The target firmware can be found under the <code>chipwhisperer/hardware/victims/firmware/</code> directory in their project (e.g. simpleserial-aes, basic-passwdcheck) folder.
* Atmel AVR-GCC standalone - see [http://www.atmel.com/tools/atmelavrtoolchainforwindows.aspx Atmel avr-gcc standalone] (registration required)
* WinAVR. Last release - 2010, see [https://sourceforge.net/projects/winavr/files/latest/download?source=typ_redirect WinAVR Page] (no registration required)
To build the code, follow these steps:
<ol>
<li>
<p><code>cd</code> to the project directory with the firmware source (.c) and makefile, and run <code>make</code>:</p>
<pre>cd c:\chipwhisperer\hardware\victims\firmware\<project dir>
make PLATFORM=CW303 CRYPTO_TARGET=AVRCRYPTOLIB</pre>
<p>If this is successful, you'll see an output like the following:</p>
<p>[[File:Avr-build-ok.png|image]]</p>
<p>If instead you get an error something like <code>make: *** No rule to make target `simpleserial.elf', needed by `elf'. Stop.</code>, this means a required file was missing.</p>
</li>
<li>
The compiled firmware file you will use to program the target will have the format <code><sourcefile name>-CW303.hex</code>, where the <> part will change based on the project.
</li>
</ol>
The XMEGA uses AVR architecture and needs an AVR compiler. The target firmware can be found under the <code>chipwhisperer/hardware/victims/firmware/</code> directory in their project (e.g. simpleserial-aes, basic-passwdcheck) folder.
* Atmel AVR-GCC standalone - see [http://www.atmel.com/tools/atmelavrtoolchainforwindows.aspx Atmel avr-gcc standalone] (registration required)
* WinAVR. Last release - 2010, see [https://sourceforge.net/projects/winavr/files/latest/download?source=typ_redirect WinAVR Page] (no registration required)
To build the code, follow these steps:
<ol>
<li>
<p><code>cd</code> to the project directory with the firmware source (.c) and makefile, and run <code>make</code>:</p>
<pre>cd c:\chipwhisperer\hardware\victims\firmware\<project dir>
make PLATFORM=CW303 CRYPTO_TARGET=AVRCRYPTOLIB</pre>
<p>If this is successful, you'll see an output like the following:</p>
<p>[[File:Avr-build-ok.png|image]]</p>
<p>If instead you get an error something like <code>make: *** No rule to make target `simpleserial.elf', needed by `elf'. Stop.</code>, this means a required file was missing.</p>
</li>
<li>
The compiled firmware file you will use to program the target will have the format <code><sourcefile name>-CW303.hex</code>, where the <> part will change based on the project.
</li>
</ol>