This guide covers how to obtain and integrate the HF-TMC9660 driver into your project.
Prerequisites
C++20 compatible compiler (GCC 10+, Clang 11+, or MSVC 2019+)
Git (for cloning)
CMake (optional, for building examples)
Obtaining the Source
Option 1: Git Clone
1
2
git clone https://github.com/n3b3x/hf-tmc9660-driver.git
cd hf-tmc9660-driver
Option 2: Git Submodule (Recommended)
1
2
3
4
# From your project root
git submodule add https://github.com/n3b3x/hf-tmc9660-driver.git external/hf-tmc9660
cd external/hf-tmc9660
git submodule update --init--recursive
Option 3: Download ZIP
Download the ZIP file from GitHub and extract it to your project.
Integration Methods
Manual Integration
Copy the driver files to your project:
inc/ directory (header files)
src/ directory (source files, if any)
Add include path to your build system:
1
#include"inc/tmc9660.hpp"
Enable C++20 in your compiler:
GCC/Clang: -std=c++20
MSVC: /std:c++20
CMake Integration
If your project uses CMake:
1
2
3
4
5
6
7
8
9
10
11
# Add the driver as a subdirectoryadd_subdirectory(external/hf-tmc9660-driver)# Link to your targettarget_link_libraries(your_target PRIVATE hf_tmc9660_driver)# Enable C++20set_target_properties(your_target PROPERTIES
CXX_STANDARD 20
CXX_STANDARD_REQUIRED ON
)
ESP-IDF Component
For ESP-IDF projects:
Add as component:
1
2
# In your project's components directory
git submodule add https://github.com/n3b3x/hf-tmc9660-driver.git hf-tmc9660