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/EK-TM4C123GXL: Remote firmware update tool

Part Number: EK-TM4C123GXL
Other Parts Discussed in Thread: UNIFLASH,

Tool/software: Linux

We are designing a device starting from the TM4C123 Launchpad. I have no issues connecting to the launchpad through code composer and flashing a binary through the ICDI. The TM4C123 MCU will be eventually integrated into it's own PCB which will interface with a Linux host computer that will all be accessed remotely (it lives on a robot). I am having a hard time finding a solution that would enable me to make remote (via ssh ideally) updates to the TM4C123 device firmware. It seems that TI doesn't do a great job at supporting a lot of the tools in Linux that would make this easy in Windows. Uniflash doesn't support DFU, LM Flash Programmer isn't for windows. On top of that I can get the demo USB bootloader to flash using the ICDI(with some slight modification, i think i'm doing this right) but then it doesn't show up in Linux as a device so I'm not sure how to connect with it even if I did find a tool. I thought sflash would help me out here.

We are talking about using another TM4C device like on the launchpad to use as an ICDI because remote updates are a design requirement. would this work even if it's a kind of ugly workaround?

i'm on Ubuntu 16.04, CCS version: 6.2.0.00050.

I am very new to this and I would appreciate any help. Thanks.

  • That would work, but seems excessive. Why not use UniFlash running under Linux with a USB JTAG scan controller?

  • Thanks Bob,

    Isn't the ICDI MCU just an oversized JTAG controller? After selecting the TM4C device in Uniflash the only options were the ICDI and the XDS JTAG probes (and MSP430?).

    -Ben

  • I don't know about "oversized" but yes, the Stellaris ICDI is a JTAG controller. It is very similar to JTAG part of the XDS110. In fact, you can use the outputs of the Stellaris ICDI on the EK-TM4C123G to program other devices. See this post: e2e.ti.com/.../1221798

    I am going to try and pass this thread to the Code Composer group and see if they will comment on support for Uniflash on Linux with an XDS110, XDS100v2 or some other stand alone emulator for the TM4C.
  • Through Uniflash, i can load a firmware update to the dev TM4C through the CLI and the onboard ICDI. I am not concerned about needing a solution to debug through JTAG, CCS should work with the debug probes. I need a solution that can be integrated into the final product. Using an XDS110 debug probe on every robot is several times more expensive than adding a second TM4C to act as an ICDI programmer. Adding an additional microcontroller just to handle firmware updates seems excessive when USB DFU should be a viable option. Am i thinking about this correctly?
  • Hi Ben,
    I am sorry, I misunderstood. Certainly I do not suggest adding an XDS110 to each robot. You want to use the TM4C USB boot loader connected to a Linux host computer that resides on the robot, but the TM4C USB device is not being recognized as a DFU device on the Linux host, right? Is it recognized as a DFU device when connected to a Windows machine?
  • No, I can't get it to be recognized as a DFU device on Linux or Windows. I used the DK-TM4C123 boot_usb example and modified it for the EK-TM4C123 (144 pin vs 64 pin packages right?), I changed the bl_config.h file to match the datasheet for the *GH6PM. comments removed below for readability. I also updated the target_config.ccxml. Is there something i missed in this modification.

    Thanks for your help.

    #ifndef __BL_CONFIG_H__
    #define __BL_CONFIG_H__
    
    
    #define CRYSTAL_FREQ            8000000
    
    #define APP_START_ADDRESS       0x2800
    
    #define VTABLE_START_ADDRESS    0x2800
    
    #define FLASH_PAGE_SIZE         0x00000400
    
    #define STACK_SIZE              128
    
    #define BUFFER_SIZE             20
    
    #define USB_ENABLE_UPDATE
    
    #define USB_VENDOR_ID           0x1cbe
    
    #define USB_PRODUCT_ID          0x00FF
    
    #define USB_DEVICE_ID           0x0001
    
    #define USB_MAX_POWER           150
    
    #define USB_BUS_POWERED         1
    
    #define USB_VBUS_CONFIG
    
    #define USB_VBUS_PERIPH          SYSCTL_RCGCGPIO_R1
    
    #define USB_VBUS_PORT            GPIO_PORTB_BASE
    
    #define USB_VBUS_PIN             1
    
    #define USB_ID_CONFIG
    
    #define USB_ID_PERIPH          SYSCTL_RCGCGPIO_R1
    
    #define USB_ID_PORT            GPIO_PORTB_BASE
    
    #define USB_ID_PIN             0
    
    #define USB_DP_CONFIG
    
    #define USB_DP_PERIPH          SYSCTL_RCGCGPIO_R8
    
    #define USB_DP_PORT            GPIO_PORTJ_BASE
    
    #define USB_DP_PIN             1
    
    #define USB_DM_CONFIG
    
    #define USB_DM_PERIPH          SYSCTL_RCGCGPIO_R8
    
    #define USB_DM_PORT            GPIO_PORTJ_BASE
    
    #define USB_DM_PIN             0
    
    
    #endif // __BL_CONFIG_H__

  • When the flash is erased, do you see "Stellaris Device Firmware Upgrade" on a Windows PC Device Manager?

  • no, after i load the boot_usb i don't see anything recognized on the dev MCU usb port. should i erase the flash after i install the boot_usb?

    i just erased the flash after i installed the boot_usb and it now comes up as a DFU. that's fantastic. Erasing the flash after loading wasn't intuitive.

    ok, my next goal is to try and get a DFU loader that works in linux. This might be a new topic though. Do you have any documentation for sflash?

    Thanks a lot Bob.
  • I am suggesting that you erase the entire flash (including boot_usb). There is boot loader firmware in the ROM. If you can then see the Stellaris DFU, then we know the hardware and the driver on the PC are all working correctly. Are you using an EK-TM4C123GXL Launchpad? You simply erase the flash using CCS and then physically disconnect the USB cable. Flip the power switch to device and then connect he USB cable to the device connector (on the side).
  • ok, wow, i feel silly. I have been going nuts trying to find workarounds for this and it's on the ROM all along.

    I'd appreciate any info about any Linux tool that can load over the DFU loader.

    Off to solve the next problem. Thanks again.