Commit 3b5690ad authored by oharboe's avatar oharboe
Browse files

- Fix target library path problem w/Windows

git-svn-id: svn:// b42882b7-edfa-0310-969c-e2dbd0fdcd60
parent 687a9553
......@@ -123,10 +123,31 @@ int parse_cmdline_args(struct command_context_s *cmd_ctx, int argc, char *argv[]
#ifdef _WIN32
/* Add the parent of the directory where openocd.exe resides to the
* config script search path.
* Directory layout:
* bin\openocd.exe
* lib\openocd
* event\at91eb40a_reset.cfg
* target\at91eb40a.cfg
char strExePath [MAX_PATH];
GetModuleFileName (NULL, strExePath, MAX_PATH);
/* Either this code will *always* work or it will SEGFAULT giving
* excellent information on the culprit.
*strrchr(strExePath, '\\')=0;
strcat(strExePath, "\\..");
/* Add dir for openocd supplied scripts last so that user can over
ride those scripts if desired. */
return ERROR_OK;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment