Back up and flash
Result: each motor’s settings are saved, a compatible image is installed, and application startup and settings preservation are checked. Tools and communication must already work.
1. Prepare the mechanism
Secure the arm, support its links and release torque. Close other serial programs. The flasher requires torqueEnable = 0, persistent writes locked with lock = 1, and no active alarm. If these conditions fail, resolve them with the appropriate settings tool. Do not bypass checks or clear an unexplained alarm blindly.
You can release torque using the installed pose recorder. Run the command, confirm release only after supporting the mechanism, wait for Torque off verified, then type done without capturing poses:
macOS / Linux
npm run record-poses -- --port "$SERVO_PORT" --ids 1,2,3,4,5,6
Windows PowerShell
npm.cmd run record-poses -- --port "$env:SERVO_PORT" --ids 1,2,3,4,5,6
Replace the selected IDs with yours. This creates an empty pose file which is not needed for replay. It is a controlled torque-release procedure, not an emergency stop.
2. Back up every motor
Two backup purposes use different, noninterchangeable formats:
| File | Created by | Purpose |
|---|---|---|
tools/settings/backups/servo-1-before-flash.json |
Node.js settings backup |
Ordinary restoration of persistent Legacy settings to the same motor |
backups/servo-1-factory-recovery.json |
Python settings.py backup |
Repair of saved settings and the reset template after returning to factory firmware |
Both commands read the motor without changing its settings:
macOS / Linux
npm run settings -- backup --port "$SERVO_PORT" --id 1 --file tools/settings/backups/servo-1-before-flash.json
Windows PowerShell
npm.cmd run settings -- backup --port "$env:SERVO_PORT" --id 1 --file tools/settings/backups/servo-1-before-flash.json
macOS / Linux
tools/flash/.venv/bin/python tools/flash/settings.py backup --port "$SERVO_PORT" --id 1 --file backups/servo-1-factory-recovery.json
Windows PowerShell
.\tools\flash\.venv\Scripts\python.exe tools/flash/settings.py backup --port "$env:SERVO_PORT" --id 1 --file backups/servo-1-factory-recovery.json
Repeat for every ID, changing both --id and the filename. Keep another copy outside the project and label each backup with its physical motor. Existing files are not overwritten; use a new name for another snapshot. Legacy backups do not include Extension profiles or the gravity model: save those JSON files separately.
Check: both commands succeed and both files exist. Do not restore another motor’s backup; its offsets can change the physical meaning of encoder counts.
3. Check the image offline
Download custom-v9-e44c0e6.zip from v0.1-preview Assets. Extract both firmware.enc and release.json into tools/flash/releases/custom/. Do not use a Source code archive, release.example.json or a raw build output.
macOS / Linux
tools/flash/.venv/bin/python tools/flash/flash.py inspect --manifest tools/flash/releases/custom/release.json
Windows PowerShell
.\tools\flash\.venv\Scripts\python.exe tools/flash/flash.py inspect --manifest tools/flash/releases/custom/release.json
inspect does not open a serial port. It checks manifest structure, image size and SHA-256. For this archive, expect extension.major: 9, extension.minor: 0, model_bytes: [[9, 3]] and encoded_bytes_verified: 25744. If validation fails, obtain the original matching pair; do not manually adjust its hash or size.
4. Flash one ID
The following command writes firmware and restarts the selected motor:
macOS / Linux
tools/flash/.venv/bin/python tools/flash/flash.py flash --manifest tools/flash/releases/custom/release.json --port "$SERVO_PORT" --id 1
Windows PowerShell
.\tools\flash\.venv\Scripts\python.exe tools/flash/flash.py flash --manifest tools/flash/releases/custom/release.json --port "$env:SERVO_PORT" --id 1
Type FLASH when asked. Keep power connected and do not run another uploader until completion. Normal addressed flashing can leave other uniquely addressed motors connected; flash them sequentially. Do not manually power-cycle the bus during a normal flash.
The tool saves a settings snapshot, transfers the image, verifies application startup and compares settings. Successful completion leaves torque off. Reports are saved in backups/flash/; keep them with the backups. This checks the application and settings rather than reading back every firmware byte.
5. Check the installed interface
After flashing, read capabilities and feedback without starting movement:
macOS / Linux
node host/servo-driver/examples/v9-feedback.js "$SERVO_PORT" 1
Windows PowerShell
node host/servo-driver/examples/v9-feedback.js "$env:SERVO_PORT" 1
This example uses 1,000,000 baud and ID 1. Change the last argument for another ID. A different baud rate requires changing this example’s code. Expect Extension version 9.0; an inactive session with torque off is normal.
If transfer finishes but application verification fails, preserve the report and check ID, baud and settings before attempting another flash. Use recovery for an unresponsive device or a deliberate return to factory firmware.
Next: check or establish calibration.
Documentation home · Source revision: a995f77. Extension 9.0.