While running the TestPanel example which included in the USBXpress 4 SDK v4.0.3 on C8051F340 MCU, the device can be enumerated as a USBXpress Device viewing from the Windows Device Manager, however, it failed to start the Host application TestPanel.exe, what would cause the issue as below?
This is caused by incorrect USBXpress driver version installed on your machine if you are not using the USBXpress driver that is included in the same SDK version.
To solve the issue, uninstall the existing driver of the USBXpress Device, and then re-install the corresponding driver included in the USBXpress SDK where you are running the USBXpress example.
For the USBXpress SDK v4.0.3 mentioned above, the driver version is 220.127.116.11 with driver date of 4/8/2013.
EFM8 Factory Bootloader AN945SW contains all EFM8 bootloader images with UART, USB or SMBus interface. The source of the efm8load tool, a python script efm8load.py is also included under /Tools/Source folder. Since Python is a cross-platform language, and therefore the script can run on a Linux system.
However, if run the efm8load.py on Linux directly, it will throw some errors because the current program in hidport.py or smbport.py does not support Linux. It is necessary to make slight modification by loading associated libraries for Linux as below on both scripts
# Load HID shared library using ctypes if sys.platform == 'win32': _DLL = ct.windll.LoadLibrary('SLABHIDDevice.dll') elif sys.platform == 'darwin': _DLL = ct.cdll.LoadLibrary('libSLABHIDDevice.dylib') elif sys.platform.startswith('linux'): _DLL = ct.cdll.LoadLibrary('./libslabhiddevice.so.1.0') else: raise RuntimeError('HidPort: Unsupported OS')
# Load HID shared library using ctypes if sys.platform == 'win32': _DLL = ct.windll.LoadLibrary("SLABHIDtoSMBus.dll") elif sys.platform == 'darwin': _DLL = ct.cdll.LoadLibrary("libSLABHIDtoSMBus.dylib") elif sys.platform.startswith('linux'): _DLL_prev = ct.CDLL("./libslabhiddevice.so.1.0", mode=ct.RTLD_GLOBAL) _DLL = ct.cdll.LoadLibrary('./libslabhidtosmbus.so.1.0') else: raise RuntimeError("HidSmbus: Unsupported OS")
These Linux libraries .so.1.0 files can be found in USBXpressHostSDK for Linux, if you have download and installed it, then you can copy-and-paste them into the same folder of the python scripts in AN945SW.
I have also updated the scripts and provided the Linux libraries in the attachment at the end of this article. With the modification above, you can run the efm8load.py on Linux successfully now. Here take EFM8LB1 STK UART bootloader as an example, the STK JLink CDC serial port appears as /dev/ttyACM0 on Linux. If using with CP210x USB-to-UART bridges, the serial port shows as /dev/ttyUSB0 instead.
To load the application image into the MCU, firstly let the EFM8 device enter UART bootloader mode, then try the following command with specified serial port:
sudo python efm8load.py -p /dev/ttyACM0 filename.efm8