The c!n tester is a dedicated hardware and software solution designed for automated functional testing of ProMicro-like microcontrollers (MCUs). Its primary goal is to provide a fast and reliable way to verify basic pin connectivity and functionality before deployment.
The core testing logic and fundamental functionality are fully operational. However, active development is focused on improving the GUI and enhancing the overall user experience.
The hardware consists of a custom Printed Circuit Board (PCB) housing two microcontrollers:
-
Master MCU: Controls the entire testing process, communicates with the host application, and manages test sequences.
-
Target MCU: This is the ProMicro-like microcontroller under test.
Essentially, the PCB represents a direct connection of the pins of the two microcontrollers; the same setup can be achieved using regular wires.
Technology Stack:
- Python 3.10+
- PySide6 β used to create the graphical user interface (GUI).
- Nuitka β used to compile Python code into standalone executable files.
- platformio β used to compile MCU firmware.
- adafruit-nrfutil β used for flashing firmware onto microcontrollers.
- pyserial β provides communication between the computer and microcontrollers via COM ports.
All communication between the host application (software) and the MCUs is conducted via serial ports (COM ports).
Currently, there is no fully developed CLI application, but since both the Target and Master microcontrollers are connected to the computer via COM ports, you can interact with them directly using standard terminal commands.
The system is designed for quick, repeatable functional checks. The Master MCU and the Target MCU communicate over dedicated lines to perform the tests.
The program waits for both the Master and Target MCUs to signal readiness. Once ready, the following sequence of basic electrical tests is performed:
-
All Pins HIGH: Verifies the ability of all pins on the Target MCU to be driven to a logic HIGH state.
-
All Pins LOW: Verifies the ability of all pins on the Target MCU to be driven to a logic LOW state.
-
Individual Pin Check: Each I/O pin is individually tested for its ability to transition between HIGH and LOW and to be correctly read by the Master MCU.
The dedicated LED indicator on the PCB is included in the hardware design but is not yet functional. For now, focus on the indicators in the application and the standard LEDs of the microcontrollers.
- Connect the Master MCU to the host computer.
- Open the c!n tester application.
- Connect the new Target MCU (the device to be tested).
- Click the "Flash & Run" button.
- Wait for the test completion and observe the indicator status.
- Insert a new Target MCU for the next test cycle.
For now, the Master MCU is flashed manually using a uf2 file. Put the MCU into bootloader mode and copy the file to it.
The recommended and simplest way to use the application is by using the pre-compiled binaries available in the project's Releases section.
-
Download the executable file for your operating system from the project's Releases page.
-
For Linux/macOS: You must grant execution permissions before launching the binary:
chmod +x cn_tester_app
-
For Linux: To allow the application to access /dev/ttyACM*, you need to add the current user to the dialout group:
sudo usermod -a -G dialout $USERΓ -
Flashing Feature Dependency: If you plan to use the target MCU flashing function, you must have the adafruit-nrfutil utility available on your system. You can ensure this in two ways:
- Install via Pip :
pip install adafruit-nrfutil. - Local Binary: Download a pre-compiled binary of adafruit-nrfutil from its project releases and place it alongside the C!N tester app executable.
- Install via Pip :
-
Launch the application:
- For Linux:
./cn_tester_app_linux_x64 - macOS:
./cn_tester_app_macos_aarch64 - Windows:
cn_tester_win_x64.exe
- For Linux:
You can view the logs by clicking on the image of the USB port.
This method is recommended only for development or if you wish to modify the source code.
Python 3.10 or newer.
git clone https://github.com/aroum/cn_tester.git
pip install -r requirements.txt
if you use conda:
conda install libpython-static
python main.py
To compile the application into a standalone executable that does not require a local Python 3.10+ environment, use the Nuitka compiler. For details, see the nuitka documentation.
git clone https://github.com/aroum/cn_tester.git
pip install -r requirements_build.txt
brew install python@3.10 nuitka
python3.10 -m venv /tmp/cleanenv
source /tmp/cleanenv/bin/activate
# source /tmp/cleanenv/bin/activate.fish #for fish
pip install -r requirements_build.txtnuitka \
--onefile \
--macos-create-app-bundle \
--macos-app-icon=ICON_PATH \
--macos-app-name=MACOS_APP_NAME \
--macos-app-icon=icon/icon.png=icon/icon.png
--enable-plugin=pyside6 \
--include-data-files=icon/icon.png=icon/icon.png \
--include-data-dir=mcu_firmware=mcu_firmware \
--include-data-files=mcu_firmware/firmware_target.hex=mcu_firmware/firmware_target.hex \
--output-dir=build \
--product-name="C!N Tester GUI" \
--clean-cache=all \
--output-filename=cn_tester_app.app \
main.py- Visual Studio C++ build tools
call "C:\Program Files\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat"
nuitka ^
--onefile ^
--windows-console-mode=disable ^
--enable-plugin=pyside6 ^
--windows-icon-from-ico=icon/icon.ico ^
--include-data-files=icon/icon.png=icon/icon.png ^
--include-data-dir=mcu_firmware=mcu_firmware ^
--include-data-files=mcu_firmware/firmware_target.hex=mcu_firmware/firmware_target.hex ^
--output-dir=build ^
--product-name="C!N Tester GUI" ^
--file-version=0.1.0 ^
--clean-cache=all ^
--output-filename=cn_tester_app.exe ^
main.py- python3-dev package
- GCC
- patchelf
nuitka \
--onefile \
--enable-plugin=pyside6 \
--include-data-files=icon/icon.png=icon/icon.png \
--include-data-dir=mcu_firmware=mcu_firmware \
--include-data-files=mcu_firmware/firmware_target.hex=mcu_firmware/firmware_target.hex \
--output-dir=build \
--product-name="C!N Tester GUI" \
--clean-cache=all \
--output-filename=cn_tester_app.bin \
main.pyWe have several improvements planned for the upcoming sprints:
- Bluetooth Functionality Testing: Planning and implementation of test sequences to verify the basic operation of the Target MCU's Bluetooth features.
- Setup CI/CD with GitHub Actions: Implement GitHub Actions workflows for automated cross-platform compilation of the application binaries and firmware flashing.
- Add some renders of the PCB and case, as well as screenshots of the app.
- Work on the documentation.
A special thank you to the following community members:
Compilation & Testing: @Rowb, @turtle-bazon
