To connect a Tiva ([TM4C](https://www.ampheo.com/search/TM4C)) LaunchPad to Ubuntu via USB, you usually want two things: 1. A USB serial port (for printf / console) 2. A way to flash firmware over USB I’ll assume you have a Tiva LaunchPad ([TM4C123](https://www.ampheo.com/search/TM4C123) / [TM4C129](https://www.ampheo.com/search/TM4C129)) with the on-board ICDI (In-Circuit Debug Interface). ![20180504_135724](https://hackmd.io/_uploads/HysofDhlWl.jpg) **1. Plug it in and check that Linux sees it** 1. Connect a micro-USB cable to the [connector](https://www.onzuu.com/category/connector-interconnects) labeled DEBUG / ICDI (not the “DEVICE” USB if your board has two). 2. In Ubuntu, run: `dmesg | tail` You should see something like a CDC ACM device being created (TTY over USB). On Tiva/ICDI this normally appears as /dev/ttyACM0. You can also check: `ls /dev/ttyACM*` If you see /dev/ttyACM0, the USB connection works. **2. Fix permissions (dialout group)** By default, only users in the dialout group can open /dev/ttyACM0 without sudo on Ubuntu. Add yourself: `sudo usermod -a -G dialout $USER` Then log out and log back in (or reboot) so the group change takes effect. **3. Use the USB serial port** On the Tiva side, use UART0 through the ICDI (lots of TI examples already do this). On Ubuntu: With screen: ``` sudo apt install screen screen /dev/ttyACM0 115200 ``` To exit screen: press Ctrl+A, then K, then Y. With minicom: ``` sudo apt install minicom minicom -D /dev/ttyACM0 -b 115200 ``` Now anything you printf over UART0 shows up in your terminal. **4. Flashing code over USB (ICDI)** **Option A – lm4flash (simple, community tool)** lm4flash (from lm4tools) is a small CLI flasher that talks to the ICDI USB using libusb and works well on Linux. On Ubuntu, there is usually a package: ``` sudo apt update sudo apt install lm4flash ``` Then you can flash a binary: `lm4flash your_firmware.bin` (For many GCC example projects the .bin is in gcc/ or build/.) If your distro doesn’t have lm4flash, build it from source: ``` sudo apt install git build-essential libusb-1.0-0-dev git clone https://github.com/utzig/lm4tools.git cd lm4tools/lm4flash make sudo ./lm4flash your_firmware.bin ``` **Option B – TI UniFlash on Linux (official)** TI’s official cross-platform flasher is UniFlash, which also supports TM4C devices on Linux via ICDI. * Download UniFlash for Linux from TI’s site. * Install it, then create a TM4C device configuration and use the ICDI USB interface to program your board. **5. Optional: Udev rule (avoid sudo for lm4flash)** If lm4flash complains about USB permissions, you can create a simple udev rule so the device is owned by plugdev/dialout instead of root. Similar examples exist for Stellaris/Tiva LaunchPads. Create /etc/udev/rules.d/99-tiva-icdi.rules: `sudo nano /etc/udev/rules.d/99-tiva-icdi.rules` Put something like (example VID/PID, adjust if needed): `SUBSYSTEM=="usb", ATTR{idVendor}=="1cbe", ATTR{idProduct}=="00fd", MODE="0666"` Then: ``` sudo udevadm control --reload-rules sudo udevadm trigger ``` Unplug/replug the board; now lm4flash should work without sudo. (Use lsusb to see the actual idVendor / idProduct for your board.) **6. Using the “DEVICE” USB connector (optional)** Many [TM4C](https://www.ampheoelec.de/search/TM4C) LaunchPads (e.g. [TM4C1294](https://www.ampheo.com/search/TM4C1294)) also have a second USB connector labeled DEVICE that connects directly to the [microcontroller](https://www.ampheo.com/c/microcontrollers) USB peripheral. To use that: 1. Flash a USB example from TivaWare (like usb_dev_serial or usb_dev_cdc). 2. After reset, Ubuntu will see another USB device (often also a CDC ACM port like /dev/ttyACM1) that your own firmware controls. **TL;DR** 1. Plug Tiva LaunchPad into Ubuntu via the DEBUG/ICDI USB port. 2. Confirm /dev/ttyACM0 exists, add your user to dialout. 3. Use screen /dev/ttyACM0 115200 for serial. 4. Install lm4flash (or TI UniFlash) and run lm4flash firmware.bin to program it over USB.