In this article of ChipWhisperer tutorial we will go step-by-step through the setup process on Windows 10 machine. We work with CW1173 ChipWhisperer-Lite with CW308 UFO Board with XMEGA Target Board.
Firstly, we install WinPython on our machine – a distribution of Python for Windows for scientific and educational usage. The main page of the project is linked below:
In the moment of writing of this tutorial version 4 of ChipWhisperer software is the most recent stable one. In order for ChipWhisperer software v4 to work we need a release of WinPython with Python 2.7. Here you can get the latest available version of WinPython version Zero with Python 2.7:
We need to download the installation file and install it in a localization of our choice (we recommend D:\ChipWhisperer as we will refer to this localization in this tutorial). Zero version is the only available version at the time of writing this tutorial. You will also need to install PyQt version 4. You can install it using hints from issue tracker for WinPython:
You may also want to register this distribution to your system using WinPython Control Panel which you can find in
Registering your WinPython installation will (from https://winpython.github.io/):
- associate file extensions .py, .pyc and .pyo to Python interpreter
- register Python icons in Windows explorer
- add context menu entries Edit with IDLE and Edit with Spyder for .py files
- register WinPython as a standard Python distribution (standard Python Windows installers will see WinPython in Windows registry)
You can also add this python distribution to your PATH environmental variable, but we will use Powershell Command Prompt instead (so we are not limited to this specific distribution on our machine).
After installing WinPython the next thing you need is a ChipWhisperer source code. We will install it manually. You can get the latest release of ChipWhisperer software from:
In this tutorial we use version 4.0.4 (the most recent stable version at the date of writing). Get .zip file, save it in D:\ChipWhisperer and unzip it, then go to D:\ChipWhisperer\WinPython-64bit-18.104.22.168Zero and launch WinPython Powershell Prompt.exe. Nawigate to
python setup.py develop
You will probably get an output similar to this below:
In case there are some missing packages during the installation you should install them using pip install. It is possible that there will be some missing packages later in the process. In such a case you should do the same.
We are using 64bit version of WinPython, so in order to display axes correctly in the CWAnalyzer, we need to install the official QT Pyside package. Open WinPython Powershell Prompt and type:
pip install https://download.qt.io/official_releases/pyside/PySide-1.2.2-cp27-none-win_amd64.whl
If you have another version of PySide installed before on your machine, make sure you uninstall it before installing the recommended package.
To confirm that everything went well, try to open CWAnalyzer either by double-clicking the icon in the software folder or by typing
in the command prompt. You should see the window like the one below.
On Windows, you just need to go to Device Manager, find ChipWhisper Lite and install drivers from
You will need to unpack cwlite_usb_driver.zip and point hardware wizard to that location. In the picture below we present how to connect the capture board to the target board. Make sure you mount the cable to “measure”, not to “glitch” on the capture board.
To build programs for the target board, you will need AVR compiler, e.g. from
After installation, open PowerShell command prompt in
(you can do it by pressing Shift + left mouse button and choosing “Open Windows PowerShell here”) and type
The end of your output should look similar to the one below. If it does, it means your compilation was successful.
If there is a problem with your compilation, you should check https://www.avrfreaks.net/forum/windows-81-compilation-error.
Collecting your first power trace
Finally, we can check if ChipWhisperer is connected correctly. You need to open CWCapturer as we did above to check the installation. Perform the following steps:
1. Find connect_cwlite_simpleserial script in Python Console and double-click it or hit the button Run in Script Preview Window. Master, Scope and Target icons should change to indicate that our board is connected.
2. Next, choose script setup_cwlite_xmega_aes.py and run it.
3. Go to Tools → CW-Lite XMEGA Programmer.
4. First, you should click Check Signature button to ensure that XMEGA is connected. Then, click Find to choose .hex file we compiled earlier using AVR compiler and program XMEGA.
5. Finally, hit the Run 1 button.
Congratulations, you’ve gotten your first power trace!