startup.tcl (former commands.tcl) is now embedded into OpenOCD executable.

git-svn-id: svn://svn.berlios.de/openocd/trunk@787 b42882b7-edfa-0310-969c-e2dbd0fdcd60
This commit is contained in:
oharboe
2008-07-11 06:44:22 +00:00
parent 2b3f4fd293
commit efc6063df8
4 changed files with 203 additions and 67 deletions

View File

@@ -742,12 +742,15 @@ void initJim(void)
interp->cb_fgets = openocd_jim_fgets;
}
extern const unsigned char filedata_startup[];
/* after command line parsing */
void initJim2(void)
{
if (Jim_Eval(interp, "source [find tcl/commands.tcl]")==JIM_ERR)
if (Jim_Eval(interp, filedata_startup)==JIM_ERR)
{
LOG_ERROR("Can not find tcl/commands.tcl - check installation");
LOG_ERROR("Failed to run startup.tcl (embedded into OpenOCD compile time)");
Jim_PrintErrorMessage(interp);
exit(-1);
}
}