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.

UBS Descriptor tool - No code generated

I installed MSP Descriptor Tool from MSPUSBDescriptorTool-5_00_00_19-windows-installer.exe. When I run the program and configure an HID device the generated code only includes MSP430USBDesc.xml. How do I generate the source code? Is there something else required?

Wayne

  • Hi Wayne,

    When you select the 'Generate' button, a dialog box asking you where to store the files should show up.  Once you specify the location, you should find the .xml file,  descriptors.c, descriptors.h and UsbIsr.c files in the specified folder

    Regards,

    Arthi Bhat

  • Only the .xml file is stored there. I even loaded one of the example .xml files and tried saving in different location. Again only the .xml file was saved. None of the descriptor files were generated. My alternate solution is to modify files from the examples.
  • PS. I have installed Oracle Java Version 8 Update 51
  • Hello Wayne,

    Are you running the tool on Windows 7 or Windows 8?   I don't think that using Java 8 (1.8) to run the tool should be an issue however the tool was tested using Java 1.6.  You can try installing Java 1.6 and see if the issue still exists.

    Couple of things you can try though:

    1) The tool stores a copy of the .xml file in the C:\Users|<username>\Texas_Instruments\MSP_USB_Descriptor_Tool folder and also the same .xml file in the folder you specified.  So maybe they are out of sync somehow.  YOu can delete the MSP_USB_Descriptor_Tool folder in C:\Users\<username>\Texas_Instruments and re-run your tool and see if the .c and .h files get stored.

    2) Also you can review the logFiles in the above stated folder to see if there is anything worthwhile mentioned in there that will help debug.

    3) Can you try running the tool from command line?  Before you run the tool from the command line,  first open the .xml file in the folder you stored it in and way at the bottom of the file, set the value of 'generate' to 1 (this means generate the .c and .h file; from GUI this value does not matter).  Then type the following command from the MSP403_USB_DescriptorTool folder:

    >java -jar MSP_USB_Descriptor_Tool.jar -l C:\<path_name to .xml file>\MSP430USBDesc.xml

    Regards,

    Arthi Bhat

  • C:\_ax\projects> java -jar MSP_USB_Descriptor_Tool.jar -l c:\_ax\projects\usb_config\MSP430USBDesc.xml
    09.02 12:54:20 Opening log file: C:\Users\wshumaker\Texas_Instruments\MSP_USB_Descriptor_Tool\logFile.log
    Exception in thread "main"
    java.lang.NullPointerException
    at com.ti.msp.descriptortool.Main.copyFileUsingFileStreams(Main.java:191)
    at com.ti.msp.descriptortool.Main.main(Main.java:58)
  • > java -version
    java version "1.8.0_60"
    Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
    Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)
  • OK, my mistake, I did not run from the \ti\msp430\... directory. trying again and running from the command line did generate the files.

    C:\ti\msp430\MSPUSBDescriptorTool-5_00_00_19> java -jar MSP_USB_Descriptor_Tool.jar -l C:\_ax\projects\usb_config\MSP430USBDesc.xml
    09.02 13:12:25 Opening log file: C:\Users\wshumaker\Texas_Instruments\MSP_USB_Descriptor_Tool\logFile.log
    Valid configuration file loaded
    09.02 13:13:30 Processing: C:\_ax\projects\usb_config\descriptors.c
    09.02 13:13:30 Processing: C:\_ax\projects\usb_config\descriptors.h
    09.02 13:13:30 Processing: C:\_ax\projects\usb_config\UsbIsr.c
  • Running from the desktop Icon fails with only the log message:
    Valid configuration file loaded
  • Good that you can at least generate the descriptors.c, .h files from the command line!  Are you running the tool on Windows 7 or Windows 8?

    Also were you having the problem when running the tool from the desktop icon, as well as from the start menu icon and also from the GUI that comes up when you double click on the .jar file?

    Regards,

    Arthi Bhat 

  • Windows 7. It fails with anything that is not run from the command line while in the directory of the .jar file.

    Wayne

  • Try setting JAVA_HOME, CLASSPATH and the other java related environment variables.
    You could put them inside a .bat (or .cmd ?) file.
    That way you could run it from everywhere.
    :)
  • Hi Wayne,

    Can you run the descriptor tool from the command line with the '--debug 5' option?  This way all the errors that are causing your issue might show up in the log that is located in

    <USERS_DIR>/Texas_Instruments/MSP_USB_Descriptor_Tool/logFile.log

    Here is the command:

    cd <DESCRIPTOR_TOOL_DIRECTORY>

    java –jar MSP_USB_Descritor_Tool.jar –debug 5

  • java -jar MSP_USB_Descriptor_Tool.jar --debug 5
    09.11 11:23:45 Opening log file: C:\Users\wshumaker\Texas_Instruments\MSP_USB_Descriptor_Tool\logFile.log
    Valid configuration file loaded
    09.11 11:23:58 File copied from configFiles\templates\codeGen\descriptorFiles\descriptors.c to C:\_ax\projects\test\descriptors.c
    09.11 11:23:58 File copied from configFiles\templates\codeGen\descriptorFiles\descriptors.h to C:\_ax\projects\test\descriptors.h
    09.11 11:23:58 File copied from configFiles\templates\codeGen\descriptorFiles\UsbIsr.c to C:\_ax\projects\test\UsbIsr.c
    09.11 11:23:58 Processing: C:\_ax\projects\test\descriptors.c
    09.11 11:23:58 Processing: C:\_ax\projects\test\descriptors.h
    09.11 11:23:58 Processing: C:\_ax\projects\test\UsbIsr.c
    09.11 11:23:58 File saved!
    09.11 11:23:58 File saved!

    So it works as long as I run the command from the \ti\msp430\MSPUSBDescriptorTool-5_00_00_19 directory, otherwise it does not find the initial config files.

    For example 

    java -jar .\MSPUSBDescriptorTool-5_00_00_19\MSP_USB_Descriptor_Tool.jar --debug 5

    Directory does not exist: C:\ti\msp430\configFiles\templates\codeGen\descriptorFiles

**Attention** This is a public forum