Hello,
I recently downloaded the tinyos 2.x XubunTOS live CD and installed it.
Which
uses the mspgcc tool chain. I got jtag from the stanford repository.
(msp430tools-jtag-lib-tinyos)
and (msp430tools-python-tools-tinyos).
It installed okay and I built Blink (one of the tinyOS demo programs). So
far
the only problem I've run into is when I try to run "msp430-jtag". I get
the
following error:
cire-laptop (45): msp430-jtag
Traceback (most recent call last):
File "/opt/msp430/bin/msp430-jtag", line 16, in <module>
from msp430 import memory, jtag
File "/opt/msp430/lib/python2.3/site-packages/msp430/jtag.py", line 58, in
<module>
MSP430mspgcc = ctypes.cdll.MSP430mspgcc
File "ctypes/__init__.py", line 415, in __getattr__
File "ctypes/__init__.py", line 340, in __init__
OSError: MSP430mspgcc: cannot open shared object file: No such file or
directory
cire-laptop (46):
The question is how does python find libraries? In particular how does the
line
"MSP430mspgcc = ctypes.cdll.MSP430mspgcc" into a shared object (library).
I've looked for any files in the /opt hierarchy and found the following:
/opt/msp430/lib/libMSP430mspgcc.a
/opt/msp430/lib/libMSP430mspgcc.so
I've set LD_LIBRARY_PATH to include /opt/msp430/lib and have run ldconfig.
But it still can't find the library.
The code from jtag.py is:
#1st try the ctypes implementation, if thats not available try to use the C
extension
try:
import ctypes
except ImportError:
try:
import _parjtag
except ImportError:
raise ImportError("Can't find neither _parjtag nor ctypes. No JTAG
backend available.")
else:
backend = "_parjtag so/dll"
else:
backend = "ctypes"
STATUS_OK = 0
TRUE = 1
FALSE = 0
WRITE = 0
READ = 1
if sys.platform == 'win32':
MSP430mspgcc = ctypes.windll.MSP430mspgcc
else:
MSP430mspgcc = ctypes.cdll.MSP430mspgcc
# MSP430mspgcc = ctypes.cdll.LoadLibrary("MSP430mspgcc")
MSP430_Initialize = MSP430mspgcc.MSP430_Initialize
MSP430_Initialize.argtypes = [ctypes.c_char_p, ctypes.POINTER(
ctypes.c_long)]
MSP430_Initialize.restype = ctypes.c_int
try:
MSP430_Open = MSP430mspgcc.MSP430_Open