Debugger-based On-Target Testing
|
By nature, the DOTT framework is open for the integration of arbitrary external test equipment as long as there are Python libraries available for interfacing the equipment. DOTT does not come with a pre-integrated set of such libraries. The section below about PIGPIO is just an example how to utilize a Raspberry Pi you might have anyway sitting on your desk as an USB to I2C (or SPI) bridge from within your tests. This setup is also shown and used in one of the examples shipped with DOTT.
The PIGPIO Python library together with the PIGPIO daemon installed on a Raspberry Pi enables users to use a Raspberry PI as an I2C or SPI master from within the DOTT test framework. The following figure gives an overview of that setup. The test host, with installed DOTT framework and pigpio library, connects to the Raspberry PI via TCP/IP. There, the pigpio daemon receives these incoming calls and translates them to I2C, SPI, UART of simple GPIO transactions on the I/O pins of the Raspberry.
Pigpio is a public domain, 3rd party package which is available here of can be downloaded form GitHub. The pigpio Python library for the host is installed with. The setup procedure for the pigpio daemon on the RaspberryPi is provided in the next section.
Below is a simple Python code snippet which uses the pigpio library to connect to a Raspberry PI which is running a pigpiod instance. Connected to it is an I2C slave of which a register is written and read back.
The full documentation for the Python pigpio library is available online.