logo       


CVS: python/msp430 jtag.py,1.11,1.12: msg#00006

Subject: CVS: python/msp430 jtag.py,1.11,1.12
Update of /cvsroot/mspgcc/python/msp430
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4068/msp430

Modified Files:
        jtag.py 
Log Message:
add some docs, better error messages


Index: jtag.py
===================================================================
RCS file: /cvsroot/mspgcc/python/msp430/jtag.py,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -w -d -r1.11 -r1.12
--- jtag.py     5 Oct 2005 15:25:23 -0000       1.11
+++ jtag.py     13 Oct 2005 01:02:37 -0000      1.12
@@ -41,10 +41,19 @@
     try:
         import _parjtag
     except ImportError:
-        raise ImportError("Can not find neither _parjtag nor ctypes. No JTAG 
backend available.")
+        raise ImportError(
+            "Can not find neither _parjtag nor ctypes. No JTAG backend 
available.\n"
+            "\n"
+            "The ctypes backend is prefered. Make sure that the ctypes 
python\n"
+            "extension is available on this system.\n"
+            "\n"
+            "Alternatively, the older _parjtag backend is a python extension 
that\n"
+            "can be built from sources from http://mspgcc.sf.net\n";
+        )
     else:
         backend = "_parjtag so/dll"
 else:
+    #create a wrapper class with ctypes, that has the same API as _parjtag
     backend = "ctypes"
     
     STATUS_OK   = 0
@@ -53,10 +62,16 @@
     WRITE       = 0
     READ        = 1
     if sys.platform == 'win32':
+        #the library uis found on the PATH, respectively in the executables 
directory
         MSP430mspgcc = ctypes.windll.MSP430mspgcc
     else:
+        #an absolute path to the library has to be given.
+        #LIBMSPGCC_PATH is used to pass its location
         import os
+        try:
         MSP430mspgcc = 
ctypes.cdll.LoadLibrary(os.path.join(os.environ['LIBMSPGCC_PATH'], 
'libMSP430mspgcc.so'))
+        except KeyError:
+            raise KeyError('The environment variable "LIBMSPGCC_PATH" must 
point to the folder that contains "libMSP430mspgcc.so"')
     
     MSP430_Initialize               = MSP430mspgcc.MSP430_Initialize
     MSP430_Initialize.argtypes      = [ctypes.c_char_p, 
ctypes.POINTER(ctypes.c_long)]



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl


Ruby Jobs
Java Jobs
Jobs in California
more...
what
job title, keywords
where
city, state, zip
jobs by job search
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
encryption.gpg....    ietf.rfc822/199...    freebsd.devel.i...    lang.haskell.li...    mail.squirrelma...    web.zope.plone....    yellowdog.gener...    text.xml.xalan....    recreation.phot...    kde.devel.educa...    hardware.bus.ca...    printing.ghosts...    voip.peering/20...    assembly/2006-0...    org.user-groups...    culture.interne...    network.i2p/200...    boot-loaders.ya...    xfree86.render/...    qnx.openqnx.dev...    jakarta.velocit...    user-groups.pal...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe