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

Changes

Jump to: navigation, search

CW5

4,678 bytes added, 14:21, 12 July 2019
no edit summary
The release of ChipWhisperer v5.0 has brought major changes to the front end of the ChipWhisperer software as well as a switch to Python3Python 3: the GUI and the wiki tutorials have been replaced with Jupyter Notebooks, which allow users to run interactive Python blocks in their browser. Most of the The API remains unchanged from v4 is being updated anddocumented, with the exception of Python2a push towards a stable and consistent interface.7 specific code, most GUI-less Most GUIless scripts for v4 should run as isbe compatible with the final release of v5, though users will be warned via the logging library about deprecated parts of the code base. Additional features, such as ChipWhipserer Analyzer support, are now available outside of any GUI.  == What are Jupyter Notebooks? ==Jupyter notebooks are documents that combine Python code, rich text, and additional code (such as Bash), organized into executable blocks. Notebooks allow users to run blocks out of order and multiple times, giving greater control over what's being run than a Python script. To run these notebooks, you'll need to install the Jupyter Notebook application (installation is covered in a later section), which also includes file browser and text editor capabilities. Starting with ChipWhisperer 5, the GUI and Wiki tutorials have been replaced by notebooks. For users, this means that instead of clicking buttons and modifying values in a GUI, users now run and edit Python blocks that use ChipWhisperer's Python API. This has a number of advantages, including less complexity than a full GUI (hopefully fewer bugs), less separation between tutorials and running the software, and teaching users how to use ChipWhisperer's Python API. == Getting Started ===== Installing ChipWhisperer 5 and Jupyter ===For instructions on how to install ChipWhisperer 5 and Jupyter, please see our page [[V5:Installing_ChipWhisperer]].
=== Running Jupyter ===
Once you have ChipWhisperer/Jupyter installed and have the associated hardware, you should be all set to run ChipWhisperer 5! To run Jupyter natively (aka outside ChipWhisperer 5 via a Virtual Machine, open your VM)and start the ChipWhisperer Jupyter image. Once the Virtual Machine is booted, navigate open either Firefox or Chrome. Go to your address bar and type in <code>localhost:8888</code>. A page requesting a password should appear. Enter your password that you set for Jupyter during installation and you'll be taken to the ChipWhisperer directory Jupyter homescreen. For a native installation, open a Bash-like shell terminal (for Windows users, Git Bash will work fine) and navigate to where you installed ChipWhisperer. In Bash, run <code>$ jupyter notebook</code>. A new window You should be taken to the Jupyter homescreen. === Running Tutorials ===Starting with ChipWhisperer v5.0, tutorials have been moved from the wiki into Jupyter Notebooks. Use Jupyter's file browser to navigate to <code>software/Jupyter</code>, which contains all of the tutorial notebooks. If you'd like to see our suggested completion order, you can open <code>!!Suggested_Completion_Order!!.ipynb</code>. Once you've decided which tutorial to run, open the tutorial via Jupyter. Once you've got a notebook open, you'll find a combination of rich text and Python (and few special blocks, like the <code>%%bash</code> blocks. Near the top of the page, you'll find a special Python block with <code>#Parameters</code> in it. This block is used to select which scope (via <code>SCOPETYPE</code>) as well as which target (via <code>PLATFORM</code>) you'll be using for the tutorial. Make sure to edit these parameters for which hardware you're using. A list of common SCOPETYPE and PLATFORM values can be found [http://www.example.com here (not yet available)]. Now that this setup is complete, you can start actually running through the tutorials. To run a block, click on the block and make sure it's highlighted (the block should have either a green or blue outline around it), then click the <code>>| Run</code> button on the toolbar at the top of the screen. This will run the code inside of the block and move to the next one. Run the rest of the code block in the tutorial (all tutorials are designed to be able to be run with minimal modifications to the Python code). === Special Blocks ===While running tutorials, you will come across special blocks. For ChipWhisperer's notebooks, the two most common ones are <code>%%bash</code> and <code>%run</code>. The <code>%%bash</code> blocks run the following lines using the Bash-like shell you used to open Jupyter with and are typically used for building firmware. The <code>%run</code> blocks, on the other hand, are used to run other Jupyter notebooks. This avoids duplicating some common blocks across tutorials. To find these notebooks, follow the path specified after the <code>%run</code> command. For example, if you see a block with <code>%run "Helper_Scripts/Setup.ipynb"</code>, you can find that file at <code>software/Jupyter/Helper_Scripts/Setup.ipynb</code>. === Editing Blocks ===To edit code blocks, simple click on the text portion of the block and begin making your browserchanges. You'll know if you're in edit mode for a block because it will be highlighted in green.
If you== Documentation ==Documentation for ChipWhisperer're using a ChipWhisperer VM, ensure the VM is booted, open your browser and connect to 192s Python API can now be found on [http://chipwhisperer.168readthedocs.33.10:8888:io/ ReadTheDocs]!
[[File== New Features ==New features that are planned to be available in the final CW5 release include:Run-jupyter2.png|frameless|797x797px]]
==== Jupyter Tips ====* Analyzer and project support via the Python API* Tutorials are available in ''Software/Jupyter''Python 3 support (no longer supports Python 2)* Tutorials via Jupyter can be used to edit code by navigating Notebooks, which showcase how to use the proper directory and clicking on the file you want to editPython API* Normal browser functionality applies: you can have New tutorials, including one submitted by a user via Github* Support for multiple tabs ChipWhisperers via Python API* Simplified and windows open standardized API[[File:Run-jupyter.png|frameless|769x769px]]* Improved capture speed* API documentation generated by Sphinx, available via ReadTheDocs* Automated tests for every tutorial* Contribution guide* Completed tutorials on Wiki* Lite GUI for plotting traces
Approved_users, administrator
366
edits

Navigation menu