As of August 2020 the site you are on (wiki.newae.com) is deprecated, and content is now at rtfm.newae.com.

Difference between revisions of "CW303 XMEGA Target/Compiling"

From ChipWhisperer Wiki
Jump to: navigation, search
(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...")
 
 
Line 10: Line 10:
 
   <p><code>cd</code> to the project directory with the firmware source (.c) and makefile, and run <code>make</code>:</p>
 
   <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>
 
   <pre>cd c:\chipwhisperer\hardware\victims\firmware\<project dir>
make PLATFORM=CW303 CRYPTO_TARGET=AVRCRYPTOLIB</pre>
+
make PLATFORM=CW303 CRYPTO_TARGET=AVRCRYPTOLIB</pre>
 +
  <p>where the <> part is changed to the project name.</p>
 
   <p>If this is successful, you'll see an output like the following:</p>
 
   <p>If this is successful, you'll see an output like the following:</p>
 
   <p>[[File:Avr-build-ok.png|image]]</p>
 
   <p>[[File:Avr-build-ok.png|image]]</p>

Latest revision as of 07:39, 19 April 2018

Building firmware

The XMEGA uses AVR architecture and needs an AVR compiler. The target firmware can be found under the chipwhisperer/hardware/victims/firmware/ directory in their project (e.g. simpleserial-aes, basic-passwdcheck) folder.

To build the code, follow these steps:

  1. cd to the project directory with the firmware source (.c) and makefile, and run make:

    cd c:\chipwhisperer\hardware\victims\firmware\<project dir>
    make PLATFORM=CW303 CRYPTO_TARGET=AVRCRYPTOLIB

    where the <> part is changed to the project name.

    If this is successful, you'll see an output like the following:

    image

    If instead you get an error something like make: *** No rule to make target `simpleserial.elf', needed by `elf'. Stop., this means a required file was missing.

  2. The compiled firmware file you will use to program the target will have the format <sourcefile name>-CW303.hex, where the <> part will change based on the project.