V0.x to V1 Migration Guide

Practical steps for migrating a Koheron controller from V0.x firmware to V1 firmware.

Use this checklist when upgrading a controller from V0.x firmware to V1 firmware. The procedure is intended to protect the device configuration and to help update host scripts after the firmware change.

Before flashing

  1. Check that your exact product and hardware variant is supported by V1 firmware. Do not flash V1 firmware on an unsupported product.
  2. Record the current V0.x identification and configuration before upgrading. At minimum, save the outputs of the V0.x identification, status, and configuration commands used by your scripts.
  3. Keep a copy of the V0.x firmware file and the saved V0.x command outputs until the V1 upgrade has been verified.

Flash the V1 firmware

Flash only the V1 firmware file that matches the exact product and hardware variant printed on the device label or reported by the device. Do not use firmware built for a related product, a different output option, or a different hardware variant.

After flashing, reconnect to the serial interface and verify the device identity:

>> IDN?
Koheron,CTL200-X-X-XXX,12345,V1.x
>> version
V1.x
>> serial
12345
>> model
CTL200-X-X-XXX

The IDN?, version, serial, and model responses must match the expected product, serial number, and V1 firmware version before operating the device.

Restore and save the configuration

Reapply only the settings that are valid for the V1 product and your hardware setup. Do not blindly replay a complete V0.x script until each command and response has been checked against the V1 command API.

When the V1 configuration is correct, run save and record the returned CRC:

>> save
A1B2

In V1, save returns the saved configuration CRC. Update scripts that expected the old config saved text response.

Check ecrc after saving if your upgrade procedure records the saved configuration state:

>> ecrc
A1B2

The saved configuration is loaded at boot only when the saved configuration CRC is valid. If the CRC is invalid, erased, or missing, V1 does not load the saved configuration at boot and the device may start with default settings instead.

Host-software migration notes

  • Use errlist instead of hard-coding product-specific error positions. Common errors have stable bit positions in bits 0…17, and product-specific errors start at bit 18.
  • Treat errors as a 32-bit mask. Hexadecimal responses may omit leading zeros; for example, 4 is mask 00000004.
  • CMD_UNKNOWN is common error bit 2, mask 00000004. CMD_ACCESS_DENIED is common error bit 4, mask 00000010.
  • Distinguish CMD_INVALID_ARG from CMD_ACCESS_DENIED: invalid shape, invalid value, or invalid runtime request reports CMD_INVALID_ARG; a valid write shape with insufficient user mode reports CMD_ACCESS_DENIED.
  • save and reset are no-argument writes and require advanced mode.
  • Use fmtlist for the full supported binary status field list. fmtlist is also the layout to use for full unmasked logerr snapshots.
  • Use ecrc to inspect the saved configuration CRC after saving or during upgrade checks.

Update host scripts

Update scripts and test procedures for V1 command syntax and output formats before returning the device to service. Pay particular attention to commands that parse identification, status, errors, or saved-configuration responses. Use the V1 command API as the reference for command names, responses, and persistence behavior.