This project is attempts to control printer cartridge H123 with STM32F411RE-Nucleo board.
- PrintSpider - PrintSpider implementation for Arduino.
- SMT32F411RE template with support CubeIDE and VS Code Cmake development.
- "HP printer cartridge control module" hackaday article
To initialize the project, you I have used the following tools:
- Cmake (3.20)
- Cube IDE (1.19)
- OpenOCD (0.12 from Cube IDE if you want use SWO debug)
- GNU ARM Toolchain (14.3)
- VS Code (1.99.3)
- Plink (0.81) (if SWO debug)
- LLVM (19.0)
There are two ways to Debug this project: with CubeIDE or with VSCode.
- Open the project in CubeIDE
- Download the package for STM32F411RE
- Build the project
- Flash/Debug the firmware on your board (STM32F411RE)
- Make sure that your have installed recommended extensions for this project
- Open the project in VS Code
- Set correct paths to .vscode/settings.json
- Choose correct preset in CMake extension tab
- Build or Debug the project
Note: - In case of start debug (F5) SWO task will starts with error - just continue debugging. - Debugging with SWD interface takes CPU time. To avoid this, it can be reworked to use UART via DMA
To build the project, call the following commands::
- cmake --preset PrintSpider_stm32
- cmake --build --preset build-fw
- Add stubs for driver dependencies to
test/mocksfolder. - Define the module to Core/{module name}.
- Add CMakeLists.txt to this folder.
- Use the next macroses and call
add_test_runnerfunction:- TARGET_INCLUDE_DIRECTORY for all test include directories,
- TARGET_SOURCES for all module sources,
- TEST_SOURCES for all unit test sources,
- TEST_MOCKS for all moct sources.
- Write tests.
- Open "CMake" tab on left side bar.
- Select "Host Test" configuration.
- Select "Debug" target if you want to debug tests.
- Build with "Build" button on bottom bar.
- Open "Testing" tab on left side bar.
- Click "Run Tests" button or "Run Test" for specific test.
To run tests, call the following commands:
- cmake --preset host-tests
- cmake --build --preset build-tests
- ctest --test-dir ./build/build-host/tests
PVS-Studio - static analyzer for C, C++, C#, and Java code.