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.

MSP430 USB Python

Other Parts Discussed in Thread: MSP430USBDEVPACK

I'm currently using the MSP430 USB Python scripts to program my customer's device over the USB port.

it says that the GUI is open source and can be changed with Visual C++ Express.  Where do I find the source code to start with?

Thanks

  • Brian,

    Source for the python script is lcoated in the zip file containing the python script. It should be also included in the main USB Dev Package download. Both can be located here: software-dl.ti.com/.../index_FDS.html
  • Thanks, I have downloaded that package. not sure which project is for the GUI? I tried loading and compiling testgui.vcproj. I get an error right away, can't find file fx.h. should this file be in the zip or part of python? either way, I can't seem to find it on my pc. Thanks
  • Hi Brian,

    If you downloaded the Python_Firmware_Upgrader_5_10_00_17.zip file to update BSL then you will need Python installed on your system.  There is a 'release_notes_example_Python_firmware_upgrader.html' file included in the directory that will tell you what is required to run the GUI from the command line or if you are on Windows you can click on the .exe file.   

    If you downloaded the MSP430_USB_Firmware_Upgrade_Example_Setup.exe file (we no longer support this tool) then you can use Visual Studio to update the code if required.  Else you can click on the exe file to bring up the GUI. 

    The GUI code is included for both tools in their respective directories.

    Regards,

    Arthi

  • Thanks. I 'll take a look.
    I'm trying to make some minor modifications to the BSL executable (i.e. edit in Visual Studio C++ Express) when I try the compile, It gives me an error that fx.h is missing.

    Yes, I have python loaded on my system, but I don't think this is a python issue. as it occurs in VS C++ Express.

    Thanks

    Brian
  • The TI website says the GUI for this is opensource and can be editted in Visual Studio C++ Express. This is what I'm trying to do, to make minor changes for my customer.
    I do not plan to change any of the python scripts, just the GUI interface. I'm not having any luck.
  • Hi Brian,

    Can  you post the link where it says that the Python Firmware Upgrader tool can be edited using visual Studio C++ Express?  The folder with the Python Firmware Upgrader tool does not have a .vcproj since it was not created or updated in Visual Studio.  Command line debugging was used to update and debug code. 

    Anyway, the GUI application code is in TargetGUI.py and it refers to .py files in python-msp430-tools/msp430/bsl5.   I am not sure what the fx.h refers to.

    Regards,

    Arthi 

  • Hello, I've been trying to find the page with no luck.. when I find it I'll post it.
    Brian
  • I think the page has been changed or moved. I had a link to it, but it no longer is available.
  • here is the page I was referring too.

    www.ti.com/.../litabsmultiplefilelist.tsp

    here is an excerpt about the issue:
    TI provides a Windows source project for downloading firmware that can be quickly customized. This source can be built with Visual C++ 2008 Express, available from Microsoft at no cost.

    here is the whole paragraph from the page.

    Technical Documents
    Development Tools & S/W
    Code Examples
    Developer Network
    TI E2E Community
    Silicon Errata
    Training and Events
    2,298 views
    The USB solution for MSP430™ microcontrollers has been designed to make this process simple and straightforward. The device contains a USB-based on-chip bootstrap loader, and TI provides a Windows source project for downloading firmware that can be quickly customized. This source can be built with Visual C++ 2008 Express, available from Microsoft at no cost. For the USB support software for MSP430 MCUs, see the MSP430 USB Developers Package (MSP430USBDEVPACK). This guide is intended for developers creating a basic USB firmware upgrade system. Those wishing to customize the update process or wanting a deeper look at the underlying bootstrap loader can consult Creating a Custom Flash-Based BSL (SLAA450) and MSP430 Programming Via the Bootstrap Loader (SLAU319).
  • in the package I downloaded. MSP430USBDevelopersPackage_5_10_00_17 there are three versions of testgui.vcproj. look like one for Windows, Mac, and Linux.

    I'm trying the one for Windows. When I load the project in Visual Studio Express, there is a file, test.cpp that is included.
    here is excerpt from beginning of that file

    /*******************************************************
    Demo Program for HIDAPI

    Alan Ott
    Signal 11 Software

    2010-07-20

    Copyright 2010, All Rights Reserved

    This contents of this file may be used by anyone
    for any reason without any conditions and may be
    used as a starting point for your own applications
    which use HIDAPI.
    ********************************************************/


    #include <fx.h>

    #include "hidapi.h"

    When I try to compile, I get error that fx.h is missing!
    pp(17) : fatal error C1083: Cannot open include file: 'fx.h': No such file or directory
  • Hi Brian,

    The link you pointed me to is incorrect and will be updated.  Thanks for posting the link! 

    Currently the MSP430USBDEVPAK only supports Python_Firmware_Upgrader tool as we no longer support or package the MSP430_USB_Firmware_Upgrade_Example_Setup.exe tool.   The link was referring to the MSP430_USB_Firmware_Upgrade_Example tool which was built using C source code using Visual Studio.   If you want to use Visual Studio for debugging and coding then you should download and use the MSP430_USB_Firmware_Upgrade_Example_Setup.exe file from the site that Jace referred you to. 

    The testgui.vcproj that you are running is part of the hidapi folder that is 3rd-party open source software.  We use the Java APIs in the hidapi folder to build our HidDemo tool.  The HidDemo tool does not download BSL and it is used by the host to talk to a HID device.  

    As far as using Visual Studio to debug and update Python code, it can be done I suppose since visual studio provides Python tools but this is not part of the MSP430USBDevelopersPackage.

    Regards,

    Arthi

  • I dont' want to change the python code. (I dont' think)

    I want to modify the gui slightly to help my customer's customers. how do I do that?

    modify a python? I understood that python is not suited to GUI development?

    Please advise how I should move forward, if I can.
  • Hi Brian,

    The Python GUI can be brought up in one of two ways:  double click on the Python_Firmware_UpgraderGUI.exe file if you have a Windows machine or via the command line by typing the following command in the Python_Firmware_Upgrarder folder:

    set PYTHONPATH=.\python-msp430-tools& python TargetGUI.py 

    Before you type that command in though you need to install some packages if you don't have them.  Please look through the document labeled 'release_Notes_Example_Python_Firmware_Upgrader.html' that is included in the Python_Firmware_Upgrader folder for software dependencies.  This file also lists the commands you can run to bring up the GUI to download BSL or to download BSL via the command line. 

    There are Python IDEs that you can probably use for debugging and code developement.  Or you can use command line to compile and run the GUI.  Once you insert the code you want and some print statements in the .py files, you can run the command I listed above to compile, run and debug your code.

    Regards,

    Arthi

  • can't someone share the fx.h file with me?

**Attention** This is a public forum