EuroPython 2017

Testing microcontroller firmware with Python

Speaker(s) Alexander Steffen

Last year’s talk showed you how to use CFFI to write unit tests for C code in Python. This year we will take the concept one step further and create integration tests covering (almost) the whole firmware of a microcontroller, again leveraging the power of CFFI.

But instead of running the firmware on the controller, it will be executed on the development machine (that is, a standard x86 architecture), allowing for much faster test execution, without requiring the target hardware. For this to work, all the hardware-dependent parts of the firmware code need to be replaced by Python code simulating the hardware functionality, so that all the firmware above this hardware abstraction layer can be executed unmodified.

In addition, this allows to use advanced security testing tools like AddressSanitizer and american fuzzy lop that would not be able to run directly on the microcontroller.

in on Monday 10 July at 15:45 See schedule

Comments

  1. Gravatar
    Hi Alexander, your talk yesterday was fantastic. Are the slides available online?
    — Alex Allmont,
  2. Gravatar
    Thanks :) Slides are now available for download. Feel free to ask any questions that you might have.
    — Alexander Steffen,

New comment