Running Hardware Tests
Warning
This is a work in progress version of the Arduino Core for PSOC™ 6 documentation. While this warning notice is present, the documentation is NOT ready for public usage.
This document provides instructions on running tests on hardware using the Unity framework. These tests call the Arduino APIs to execute and verify functionality.
Test Environment Setup
Note
Board Setup
Connect your PSOC™ 6 board (e.g., CY8CKIT-062S2-AI) to your computer 💻 via USB.
Make the board-to-board pin connections as described below:
CY8CKIT-062S2-AI:
Pin Connections for HIL Test Setup Between 2 Boards
Test Name
Board 1 Pin
Board 2 Pin
Description
UART
P10.1
P10.0
UART TX to RX
P10.0
P10.1
UART RX to TX
Wire 1
P0.2
P0.2
I2C SCL to SCL (with pullup)
P0.3
P0.3
I2C SDA to SDA (with pullup)
GND
GND
Common Ground
Pin Connections for HIL Test Setup on Single Board
Test Name
Board 1 Pin
Board 1 Pin
Description
Digital IO
P9.6
P9.7
IO6 to IO7
Wire 2
P0.2
P9.0
I2C SCL to SCL (with pullup)
P0.3
P9.1
I2C SDA TO SDA (with pullup)
Executing Test Cases Using make
Makefile relies on arduino-cli for compiling, uploading, and monitoring. Unity is included as a library.
Change directories
cd tests/arduino-core-tests
Use the make command to run a specific test. For example, to run a digital I/O test:
` make FQBN= `FQBN` PORT= `PORT` test_digitalio_single monitor `FQBN: select the connected board (e.g., infineon:psoc6:cy8ckit_062s2_a).
PORT: set the appropriate serial port (e.g., /dev/ttyUSB0).
monitor : opens the serial monitor to view the test results.
Display usage information about the available make targets:
` make help `Start testing other features 🛠️ !