2.1 KiB
2.1 KiB
Repository Guidelines
Project Structure & Module Organization
main/holds the application entry point (main.c) and its build file (main/CMakeLists.txt).components/stepper_motor/contains the reusable stepper motor component. Public headers live incomponents/stepper_motor/include/and source incomponents/stepper_motor/stepper_motor.c.build/is generated by ESP-IDF/CMake; do not edit or commit build artifacts.sdkconfigis the project configuration used by ESP-IDF;sdkconfig.oldis a backup after config changes.
Build, Test, and Development Commands
Run these from an ESP-IDF environment with IDF_PATH set:
idf.py build— configure and compile the firmware intobuild/.idf.py flash -p <PORT>— flash to the connected device.idf.py monitor— open the serial monitor.idf.py flash monitor -p <PORT>— common flash + monitor workflow.idf.py menuconfig— editsdkconfiginteractively.idf.py fullclean— remove build output and cached configuration.
Coding Style & Naming Conventions
- C code uses 4-space indentation with braces on the same line.
- Use
lower_snake_casefor functions/variables,UPPER_SNAKE_CASEfor macros, and*_tsuffixes for typedefs. - Prefer
staticfor file-local helpers and useESP_LOGxfor logging. - Keep component APIs in
components/<name>/include/and include with quotes (e.g.,"stepper_motor.h").
Testing Guidelines
- No automated test framework is configured in this repo.
- Validate behavior on hardware after changes; include manual test steps and results in PR descriptions.
Commit & Pull Request Guidelines
- Git history shows short, imperative summaries without scopes (e.g., "Initial commit").
- PRs should include: a short description, hardware/board tested, and any notable serial output or behavior changes. Attach photos/videos when motion behavior changes.
Configuration & Hardware Notes
- GPIO assignments and motion parameters are defined in
components/stepper_motor/include/stepper_motor.h. - Update pin mappings and timing constants there if wiring or motor characteristics change.