Hi Dominic,
Nice product and I successfully integrated it into an automatic test station, which downloads firmware to the UUT using the flash commands.
Because I needed to automatically interpret the response string, what I receive back through the Telnet protocol I made a change to the my OpenOCD sources like:
"
switch (retval)
{
case ERROR_TARGET_NOT_HALTED:
command_print(cmd_ctx, “error: can’t work with this flash while target is running”);
break;
case ERROR_INVALID_ARGUMENTS:
command_print(cmd_ctx, “usage: flash protect <on|off>”);
break;
case ERROR_FLASH_BANK_INVALID:
command_print(cmd_ctx, “error: no ‘%s’ flash found at 0x%8.8x”, p->driver->name, p->base);
break;
case ERROR_FLASH_OPERATION_FAILED:
command_print(cmd_ctx, “error: flash program error”);
break;
case ERROR_FLASH_SECTOR_INVALID:
command_print(cmd_ctx, “error: sector number(s) invalid”);
break;
case ERROR_OK:
command_print(cmd_ctx, “error: protection of flash sectors %i to %i turned %s”, first, last, args[3]);
break;
default:
command_print(cmd_ctx, “error: unknown error”);
}
"
May I recommend you to include in the branch the “error” or “error:” text in every error message in the telnet response? (So that the automatic script can find out easier that the operation was a success or error).
Regards,
Albert