Merge pull request #73 from DanielO/msppath
Look for an env var to help find the MSP430 library
This commit is contained in:
commit
457c0c3f00
|
@ -16,7 +16,9 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include <limits.h>
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "util/output.h"
|
||||
#include "tilib_api.h"
|
||||
|
@ -759,8 +761,20 @@ static int init_old_api(void)
|
|||
int tilib_api_init(void)
|
||||
{
|
||||
int ret;
|
||||
char libpath[PATH_MAX], *path;
|
||||
|
||||
libpath[0] = '\0';
|
||||
if ((path = getenv("MSPDEBUG_TILIB_PATH")) != NULL) {
|
||||
if (strlen(path) + strlen(tilib_filename) + 2 < PATH_MAX) {
|
||||
strcat(libpath, path);
|
||||
strcat(libpath, "/");
|
||||
} else
|
||||
printc_err("Contents of MSP430_PATH variable are too long, ignoring\n");
|
||||
}
|
||||
strcat(libpath, tilib_filename);
|
||||
|
||||
lib_handle = dynload_open(libpath);
|
||||
|
||||
lib_handle = dynload_open(tilib_filename);
|
||||
if (!lib_handle) {
|
||||
printc_err("tilib_api: can't find %s: %s\n",
|
||||
tilib_filename, dynload_error());
|
||||
|
|
|
@ -178,7 +178,9 @@ option.
|
|||
.IP "\fBtilib\fR"
|
||||
Use the Texas Instruments MSP430.DLL to access the device. The library
|
||||
file (MSP430.DLL for Windows, libmsp430.so for Unix-like systems) must
|
||||
be present in the dynamic loader search path.
|
||||
be present in the dynamic loader search path, unless the
|
||||
\fBMSPDEBUG_TILIB_PATH\fR environment variable is present in which
|
||||
case it will look there.
|
||||
|
||||
USB connection is not supported for this driver. This driver supports
|
||||
watchpoints. Note that the \fB-d\fR option for this driver passes its
|
||||
|
@ -809,6 +811,8 @@ command-line option.
|
|||
Specifies the location of TI3410 firmware, for raw USB access to FET430UIF
|
||||
or eZ430 devices. This variable should contain the path to an Intel HEX
|
||||
file containing suitable firmware for the TI3410.
|
||||
.IP "\fBMSPDEBUG_TILIB_PATH\fI"
|
||||
Specifies the directory to find the Texas Instruments MSP430.DLL library.
|
||||
.SH FILES
|
||||
.IP "~/.mspdebug"
|
||||
File containing commands to be executed on startup.
|
||||
|
|
Loading…
Reference in New Issue