# TerraHawk charge node An ArduPilot AP_Periph DroneCAN node for the hangar charge path. The design, the circuit, the parts and the test plan are in `docs/charge-node.md`. This directory holds the firmware inputs: | Path | What | | --- | --- | | `hwdef/TerraHawkChargeNode/hwdef.dat` | Board definition: pins, ADC channels, features | | `hwdef/TerraHawkChargeNode/hwdef-bl.dat` | Bootloader definition (USB for the first flash, CAN after) | | `hwdef/TerraHawkChargeNode/defaults.parm` | Parameters embedded in the firmware | | `../../tools/charge_interlock.lua` | The interlock script that runs on the flight controller | ## Build The build runs in ArduPilot's own Docker image against an ArduPilot checkout. Do not point it at a checkout another tool is using (the SITL tree beside this repo): waf keeps one configuration per tree, and configuring this board there breaks the SITL build until it is configured back. Use a copy. ```bash make firmware ARDUPILOT=/path/to/a/private/ardupilot/copy ``` The target copies `hwdef/TerraHawkChargeNode` into the tree, builds the bootloader, then the firmware, and copies the outputs to `build/`: | File | Use | | --- | --- | | `AP_Periph_with_bl.hex` | First flash, over USB DFU (hold BOOT0 at power-up) or SWD | | `AP_Periph.bin` | Later updates over CAN, from Mission Planner's DroneCAN tab | | `TerraHawkChargeNode_bl.bin` | Bootloader alone, if it ever needs replacing | The `build/` directory is not tracked.