This is the code for both the new and old hydrofoil jetski at UWA.
-
shared_components: Components shared across firmware projects. Each firmware's top-levelCMakeLists.txtadds this path withlist(APPEND EXTRA_COMPONENT_DIRS ".../shared_components")somain's transitiveREQUIRES(withMINIMAL_BUILD) pulls only what's needed — no symlink farm underprojects/*/components. -
projects: ESP-IDF projects, each targeting a specific ESP32 with a specific purpose. See each project's README for details. -
scripts: Utility scripts for development. Run directly or via the aliases provided byactivate_scripts.sh:build.py: Wrapper foridf.py build.save_defconfig.py: Wrapper foridf.py save-defconfig.clean.py: Removes build artifacts.flash.py: Wrapper foridf.py flash, using the serial port defined in.serial_port.monitor.py: PTY wrapper foridf.py monitor, using the serial port defined in.serial_port.choose_port.py: Interactive serial port selector that saves the choice to a project's.serial_port(also supports non-interactive use).setup_clangd.py: Sets up clangd (LSP) support. Runsidf.py reconfigurewith the clang toolchain intobuild.clangfor each project, then merges allcompile_commands.jsonfiles into the repo root. No compilation is performed — purely for IDE language-server support.activate_scripts.sh: Source this script (do not run it directly) to add thescriptsdirectory to yourPATHand create convenient aliases. Usesource ./activate_scripts.shfrom the repo root. After sourcing, you can usebuild,save_defconfig,clean,flash,monitor,choose_port, andsetup_clangddirectly without the.pyextension.- Shell tab-completion is installed by
activate_scripts.shfor all script commands/aliases, including dynamic completion for-p/--projectvalues. - All scripts support
-p/--projectwith a project name. Scripts that support multiple projects (build,save_defconfig,clean,flash,setup_clangd) accept repeated flags or comma-separated values. - Script target selection rules:
- From repo root: multi-project scripts run for all projects when
-p/--projectis omitted. - From a project root (
projects/<name>): scripts run for that project when-p/--projectis omitted. - Otherwise: scripts error unless
-p/--projectis provided. monitorandchoose_portare limited to one project at a time.
- From repo root: multi-project scripts run for all projects when
choose_port.pyuses-P/--portto specify a serial port (-pis reserved for project selection).- Scripts discover project names dynamically from directories under
projectsthat containCMakeLists.txt. - In
monitor.py,Ctrl+Cexits immediately; all other key input is passed through normally.
These are more requirements than guidelines but 🤷♂️.
- Use scripts from the
scriptsdirectory instead ofidf.pywhere possible.- Run from repo root to target all projects, or from a project root to target just that project.
- Use
-p/--projectwhen running from other directories or to select specific projects.
- Always modify
sdkconfig, notsdkconfig.defaults. Runsave_defconfigbefore committing —sdkconfigis gitignored. - Do not modify any components in
managed_components; it is autogenerated. - If a component is used in more than one project, it should be in
shared_components. - For editor/IDE support (clangd LSP), run
setup_clangdafter initial setup and again after adding/removing components or runningclean. This reconfigures all projects with the clang toolchain and mergescompile_commands.jsonfiles into the repo root — no compilation involved. - No legacy code or backwards-compatibility shims. When implementing new functionality no need to leave anything "just in case".