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.
Tool/software: Code Composer Studio
Hello!
To get straight to the point, I cannot load firmware on my target device using CCSv7 or UniFlash on Linux; I've tried on both Ubuntu 16.04.3 LTS and CentOS 7.4. However, I am able to load the same firmware files to the same target using CCSv7 and UniFlash on a Windows 10 machine running the same versions of CCSv7 and UniFlash. In all cases, I've tested with both an XDS100v3 and USB560v2.
Setup:
Host OS: CentOS Linux 7.4.1708.x86_64 running kernel 4.14.14-1.el7.elrepo.x86_64
Code Composer Studio Version: 7.4.0.00015
UniFlash Version: 4.2.1.1562
Debugger: XDS100v3 and USB560v2
Target: F28M35H52
Steps and logs:
[15211.852945] usb 3-2.1.1: new high-speed USB device number 8 using xhci_hcd [15211.953637] usb 3-2.1.1: New USB device found, idVendor=0403, idProduct=a6d1 [15211.953641] usb 3-2.1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [15211.953643] usb 3-2.1.1: Product: Texas Instruments XDS100 Ver 3.0 [15211.953644] usb 3-2.1.1: Manufacturer: TI [15211.953646] usb 3-2.1.1: SerialNumber: FTWQ56MD [15211.957698] ftdi_sio 3-2.1.1:1.0: FTDI USB Serial Device converter detected [15211.957748] usb 3-2.1.1: Detected FT2232H [15211.958632] usb 3-2.1.1: FTDI USB Serial Device converter now attached to ttyUSB0 [15211.962069] ftdi_sio 3-2.1.1:1.1: FTDI USB Serial Device converter detected [15211.962129] usb 3-2.1.1: Detected FT2232H [15211.962706] usb 3-2.1.1: FTDI USB Serial Device converter now attached to ttyUSB1
[1/24/2018, 12:21:55 PM] [INFO] Cortex_M3_0: GEL Output: Memory Map Initialization Complete [1/24/2018, 12:21:56 PM] [INFO] Cortex_M3_0: GEL Output: Watchdog Timers Enabled [1/24/2018, 12:21:56 PM] [INFO] Cortex_M3_0: GEL Output: UARTs Enabled [1/24/2018, 12:21:59 PM] [INFO] Cortex_M3_0: Writing Flash @ Address 0x00200000 of Length 0x00000034 [1/24/2018, 12:22:01 PM] [INFO] Cortex_M3_0: PLL configuration status = 1. PLL configured successfully. [1/24/2018, 12:22:01 PM] [INFO] Cortex_M3_0: Erasing Flash Bank 0, Sector N [1/24/2018, 12:22:01 PM] [ERROR] Cortex_M3_0: Flash Programmer: Error erasing Sector N. FMSTAT value = 0. Operation Cancelled (0). [1/24/2018, 12:22:01 PM] [ERROR] Cortex_M3_0: File Loader: Memory write failed: Unknown error
[15260.321047] ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from ttyUSB0
Here is the UniFlash gui debug log:
12:21:36:829 error - {} 12:21:36:976 log - NWAgentAPI: dinfraConfigue resolved successfully. 12:21:49:286 debug - Target Configuration. Device: f28m35h52c1, Connection: TIXDS100v3_Dot7_Connection, LP: false 12:21:49:549 debug - ufDS, session.configured, partnum of current session = f28m35h52c1 12:21:49:597 debug - addTargetStateListener on Cortex_M3_0 12:21:49:597 debug - addTargetStateListener on C28xx_0 12:21:55:173 debug - returning new configure 12:21:55:874 debug - configured 12:21:58:378 debug - connect to core Cortex_M3_0 12:22:01:996 error - File: /home/tpierson/Development/fw_ifp_gate_drive/ifp_gate_drive_m3/ccs/Release/ifp_gate_drive_m3.out: Load failed.
What strikes me as odd is in the USB message logs. Why is it that the FTDI USB Serial Device converter is getting disconnected after attempting to load the firmware image?! Is this normal behavior? At this point I cannot tell if this is a problem with my system or the development tools.
Thanks,
Tristen
Hi Ki. Yes I was able to connect. I can even read the target memory. The problem occurs only when I attempt to flash.
Tristen
Ki,
I was unable to get CCSv7 to just connect without flashing. However I was able to enable the debug server logging with UniFlash and capture the logs at the point of failure.
First of all, here is the UniFlash screenshot at the point of failure.
The ds log file is attached here: 8750.ds.log
Something else interesting is that this morning I was able to occasionally load the firmware to the target with CCS. The steps were to unplug the debugger, wait, plug in the debugger, and load the firmware as soon as the driver enumerates. This works half the time or so, but only with CCS, not UniFlash. When it does fail, the failure looks to be the same as the UniFlash failure.
Tristen
Ki,
Yes, the settings between both environments are the same. I attempted to erase other sectors on both C28 and M3 cores with no success.
Thanks,
Tristen
Tristen Pierson13 said:All these tests have been on the same machine.
Does this include the Win 10 environment also? Are you using VMs?
Ki,
I started with a Windows 10 environment and replaced it with Ubuntu and then CentOS in order to support other design software I'm currently using. No VM's have been used. The original Windows 10 environment was able to flash.
Tristen
Sorry guys for the delay, was on vacation.
My OS is Arch linux 64bit (with last updates of course).
UniFlash seems to work for me now. Can live with it now but I used to use loadti.sh which was perfect (unlike UniFlash), but now it shows next:
***** DSS Generic Loader *****
START: 13:41:16 GMT+0300 (MSK)
Configuring Debug Server for specified target...
Done
TARGET: Texas Instruments XDS100v2 USB Debug Probe_0
Connecting to target...
Cortex_M3_0: GEL Output: Watchdog Timers Enabled
Cortex_M3_0: GEL Output: UARTs Enabled
Resetting target...
testEnv.outFiles: ../thermcam/m3/out/m3.out
Loading ../thermcam/m3/out/m3.out
SEVERE: Cortex_M3_0: Flash Programmer: Error erasing Sector N. FMSTAT value = 0. Operation Cancelled (0).
SEVERE: Cortex_M3_0: File Loader: Memory write failed: Unknown error
SEVERE: Cortex_M3_0: GEL: File: /home/anatoly/agp/thermcam/m3/out/m3.out: Load failed.
SEVERE: File: /home/anatoly/agp/thermcam/m3/out/m3.out: Load failed.
SEVERE: Error loading "../thermcam/m3/out/m3.out": File: /home/anatoly/agp/thermcam/m3/out/m3.out: Load failed.
Error code #4011, ../thermcam/m3/out/m3.out load failed!
Aborting!
And for C2800:
***** DSS Generic Loader *****
START: 13:46:11 GMT+0300 (MSK)
Configuring Debug Server for specified target...
Done
TARGET: Texas Instruments XDS100v2 USB Debug Probe_0
Connecting to target...
C28xx_0: GEL Output:
Memory Map Initialization Complete
C28xx_0: GEL Output:
RAM Initialization Complete
Resetting target...
testEnv.outFiles: ../thermcam/c28/out/c28.out
Loading ../thermcam/c28/out/c28.out
SEVERE: C28xx_0: Flash Programmer: Error erasing Sector N. FMSTAT value = 0. Operation Cancelled (0).
SEVERE: C28xx_0: File Loader: Memory write failed: Unknown error
SEVERE: C28xx_0: GEL: File: /home/anatoly/agp/thermcam/c28/out/c28.out: Load failed.
SEVERE: File: /home/anatoly/agp/thermcam/c28/out/c28.out: Load failed.
SEVERE: Error loading "../thermcam/c28/out/c28.out": File: /home/anatoly/agp/thermcam/c28/out/c28.out: Load failed.
Error code #4011, ../thermcam/c28/out/c28.out load failed!
Aborting!
Since loadti.sh is part of CCS, CCS behaves exactly the same. But on Win7_64 loadti.sh works well.
Debug Server log is attached just in case.
For standalone command line I can't figure out how to pack two images (for both of cores).