This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/MSP430F5635: Python Firmware Upgrader failing with HID_1 not found on OSX

Part Number: MSP430F5635

Tool/software: Linux

This seems like it should be a simple thing, but I've tried multiple ways to install the Python Firmware Upgrader on OSX and running either the PythonGUI tool, or the commandline, and always fails with something similar to: 

- ImportError: cannot import name hid_1

- python: can't open file 'msp430.bsl5.hid_1': [Errno 2] No such file or directory

I followed the directions in 'release_Notes_Example_Python_Firmware_Upgrader.html'. I also installed 'hid' via pip.  I also compiled and installed pyhidapi and shared library.

I had someone else with a Mac on OSX also try it, and has the same results.

I am able to run 'python -m msp430.gdb.target', and get a Connection Refused, because I don't have a device hooked up, so that seems correct.

My setup:

MacBook Pro, v10.12.6

Python 2.7.10

Any help appreciated, thanks.

  • Hello Cory,

    Are you installing tools into the python directory? Perhaps you are trying to install the python-msp430-tools into the python site packages folder, which is not required. You may need to re-install Python. Refer to the thread below.

    Regards,

    James

    MSP Customer Applications

  • James,

    Can you expand on what you mean by "...installing tools into the python directory?"  Are you saying that "python setup.py install" should not be run from within the python-msp430-tools folder? That it shouldn't be installed at all?  I have not manually copied anything into the python site-packages folder.  I did run 'python setup.py install' from within the python-msp430-tools folder.

    Could you provide a little clearer directions for installing for Mac OSX? The statement about setting Class Path in the releaes_Notes file, can you specify which Class Path for Mac OSX? PATH, or LD_LIBRARY_PATH, or PYTHONPATH, or ???

    Thanks,

    Cory

  • Hi Cory,

    Yes, you should not be running the command:  'python setup.py install'  from python-msp430-tools folder.  In order to bring up and run the Python Firmware Upgrader tool here is what you need to do in the order listed:

    1) Install Python(2.7.9+)

    2) Install Cython-0.22.  Once installed, naviage to Cython direcotry and run the command:  'python setup.py install'

    Install Cython-hidapi.  Once this is installed, navigate to Cython-hidapi directory and run the commands: 'python setup-mac.py build' and 'sudo python setup-map.py install'

    Once you have the above packages installed, CD to the Python Firmware Upgrader directory and type the command:

    sudo PYTHONPATH=./python-msp430-tools python TargetGUI.py

    Once the above command is run, the Python Firmware Upgrader GUI should pop up. 

    The above instructions are also in the release_Notes_Example_Python_Firmware_Upgrader.html file in case you need to reference it further

    To start from a clean state, I suggest you un-install all the packages as well as the Python Firmware Upgrader directory and start over.

    Regards,

    Arthi

  • Hello Cory,

    Did Arthi's reply answer your question? If so, please click the green "This Resolved My Issue" button.

    Regards,

    James

    MSP Customer Applications

**Attention** This is a public forum