return JIM_OK;
}
+static int
+Jim_Command_echo(Jim_Interp *interp,
+ int argc,
+ Jim_Obj *const *argv)
+{
+ if (argc!=2)
+ return JIM_ERR;
+ char *str = (char*)Jim_GetString(argv[1], NULL);
+ LOG_USER("%s", str);
+ return JIM_OK;
+}
void initJim(void)
{
Jim_CreateCommand(interp, "openocd", Jim_Command_openocd, NULL, NULL);
Jim_CreateCommand(interp, "openocd_throw", Jim_Command_openocd_throw, NULL, NULL);
Jim_CreateCommand(interp, "find", Jim_Command_find, NULL, NULL);
+ Jim_CreateCommand(interp, "echo", Jim_Command_echo, NULL, NULL);
}
int main(int argc, char *argv[])
# implements Tcl procedures/functions\r
proc peek {address} {\r
return [openocd mdw $address]
-}
\ No newline at end of file
+}\r
+\r
+# Production command\r
+proc board_produce {filename serialnumber} {\r
+ openocd "reset init"\r
+ openocd "flash write_image erase $filename [flash] bin"]]\r
+ openocd "verify_image $filename [flash] bin"]]\r
+ echo "Successfully ran production procedure"\r
+}\r
+\r
+proc board_test {} {\r
+ echo "Production test not implemented"
+}\r