Skip to content

Instructions on how to setup the Windows environment to program the TI TM4C123G LaunchPad microcontroller.

License

Notifications You must be signed in to change notification settings

lairdrt/tm4c123g-keil

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Programming the TI Tiva C TM4C123G LaunchPad

This repository supports programming the Texas Instruments Tiva C Series TM4C123GH6PMI LaunchPad microcontroller using the Keil uVision (micro-vision) IDE running under Windows 10.

Adapted from:

Introduction to TM4C123 Tiva C Series LaunchPad

How to download and install Keil uVision for ARM and 8051

Getting started with Keil uVision: Write your first Program for Tiva LaunchPad

How to use GPIO pins of TM4C123G Tiva launchPad

Versions

Microsoft Windows 10 Pro version 10.0.19045 Build 19045

Keil uVision V5.38.0.0

Texas Instruments Interface DLL (lmidk-agdi.dll) build 211.0.0.0

Stellaris USB ICDI DFU Device version 2.0.7922.0 (12/31/2015)

Stellaris ICDI JTAG/SWD Interface version 2.0.7922.0 (12/31/2015)

Install Keil uVision IDE

The Keil uVision IDE allows you to create a project that targets your microcontroller, and configure support packages that provide startup and application-specific functionality to your system. Keil uVision is part of the Keil Microcontroller Development Kit (MDK). To install the product under Windows 10, follow the steps below.

You basically have to register to download the ARM MDK, but it's free. When you go to submit the registration form, enter TM4C123G for the device that you are using. The registration screen looks like this:

Screenshot 2023-05-20 at 17-52-46 MDK-ARM Version 4 74 Evaluation Software Request

Installation process:

  1. Register to download the MDK-ARM.
  2. After you've registered, click on the file MDKxxx.exe to download it.
  3. Find the downloaded file.
  4. Install by double clicking the downloaded file.
  5. Follow the installation instructions (accept the default installation directory).

mdkarm

You should now have a desktop icon for the Keil uVision IDE, and the Keil Pack Installer should launch.

image

Customize Keil Installation with the Pack Installer

After the initial installation of the Keil software, you should be presented with Keil Pack Installer. It takes a bit of time for the installer to populate all the devices that it supports, so wait until that process finishes.

Then, you'll want to verify that the packages for the TM4C123GH6PM are installed. See below for where to look for them:

packcheck

If the highlighted packages above do not display Up to date adjacent to them on the right hand panel, then select the button for each component and install it.

Close the Pack Installer.

Install MDK Stellaris ICDI Debug Adapter Fix

From the Keil website:

In MDK v5.29 as well as newer versions of MDK the support for the Stellaris ICDI debug adapter has been removed, which will cause such a debugger DLL error. There is an add-on Stellaris ICDI installer that supports MDK v5.29. Just download and install the MDK_Stellaris_ICDI_AddOn.exe file attached in this article.

So, please follow these instructions to install the fix:

  1. Navigate to this page: UVISION: Stellaris ICDI Debug Adapter Support
  2. Download the MDK_Stellaris_ICDI_AddOn.exe attachment at the bottom of the page by clicking on it.
  3. Navigate to where the file was downloaded.
  4. Double click on the file to install the fix.
  5. Follow the installation instructions (accept the default installation directory).

This makes it so that the USB drivers installed below will work.

Install Windows 10 USB Drivers

You'll need the correct Windows 10 USB drivers to download your compiled binary code to the LaunchPad. The LaunchPad does not support plug-and-play device driver installation under Windows 10.

First:

  1. Download the TI Stellaris ICDI Drivers (click the Download button on that page).
  2. Find the downloaded file.
  3. Extract the drivers to a location you can remember by double clicking the downloaded file.

Second:

  1. Plug in your LaunchPad to an available USB port on your development system.
  2. Open up the Windows Device Manager (type Device Manager in the Windows search bar).
  3. Scroll down in the device list and find the Other devices category.
  4. You're looking for two devices that have been added when you plugged in the Launchpad:

dmotherdev

Finally:

  1. Right click on the first unknown device, and select Update driver.
  2. In the dialog that appears, select Browse my computer for drivers.
  3. Browse to the folder where you extracted the downloaded drivers.
  4. Select the folder where the drivers were extracted.
  5. Make sure the Include subfolders checkbox is selected.
  6. Select Next to install the drivers.
  7. You should see that the Stellaris driver has been installed.
  8. Repeat this process for the second device that appeared in the Other devices list.

Successful driver installation looks like this:

dminstalled

You should now be able to select the Stellaris ICDI interface within Keil uVision under Options for Target dialog box on the Debug tab. Note that you must have the LaunchPad plugged into a USB port on your development system for the device drivers to become available. You don't need to verify this just yet, but toward the end of these instructions, take a look.

targetoptions

Alternate Method for Installing Windows USB Drivers

Note that prior to 5/21/2023, the link was broken for downloading the USB drivers supplied by TI for the LaunchPad board. That link appears to work as of 5/22/2023. If the link breaks again or doesn't work for you, then follow the process below to install the Windows 10 USB drivers:

How to install windows drivers for the LaunchPad on Windows 10

Programming the Device

We're assuming that you have experience with git so that you can clone this repository.

Programming the device for the purposes of testing your system involves:

  1. Cloning this repository into a directory of your choice.
  2. Plugging in the LaunchPad evaluation board to your development system.
  3. Launching the Keil uVision IDE.
  4. Opening the project that you cloned.
  5. Cleaning the target.
  6. Building the target.
  7. Downloading the binary file to the target.
  8. Running the software on the target.

In more detail...

Cloning the Repository

We're assuming that you've installed the Keil uVision software into: C:\Keil_v5

Within a command prompt on your development system:

cd c:\Keil_v5
mkdir Projects
cd Projects
git clone [email protected]:lairdrt/tm4c123G-keil.git

Should end up with the directory: C:\Keil_v5\Projects\tm4c123G-keil

Connect the LaunchPad Board

With the LaunchPad board:

  1. Make sure that the PWR SELECT switch is set to DEBUG.
  2. Plug in the board to an avalable USB port on your development system.
  3. The green PWR LED on the board should illuminate.
  4. You should see some indication on Windows that the board is plugged in (e.g., sound, system tray icon).
  5. You can double check under the Windows Device Manaager that the Stellaris devices are active.

Launch Keil uVision

You want a clean start, so launch the IDE software anew. The screen should look something like this:

uvblank

Open the Test Project

From within the uVision IDE:

  1. Select Project > Open Project...
  2. Navigate to the directory where you cloned the project (e.g., C:\Keil_v5\Projects\tm4c123G-keil).
  3. Double click on the name of the project (e.g., project.uvprojx).
  4. You should see something like this:

uvopen

Verify that the target is using the Stellaris ICDI USB driver for programming the device:

  1. Select Project > Options for Target 'TM4C123G'...
  2. Select the Debug tab.
  3. On the right hand side (top) of the tab, select the Use radio button.
  4. Scroll down in the list and make sure that Stellaris ICDI is selected.
  5. Select Ok to save the changes.

This will ensure that the correct USB driver is used when programming the target device.

Clean, Build, and Download

Follow these steps to perform a clean build of the software:

  1. Select Project > Clean Targets
  2. Select Project > Build Target

Should see something like this:

uvbuild

  1. Select Flash > Download
  2. If the USB drivers were installed correcly, then you should see something like this:

uvflash

Run the Software

If the build and download were successful:

  1. Press and release the RESET button on the LaunchPad board.
  2. You should see the RGB LEDs cycle = success.
blinkleds.mov

Now you can use this as a starting point for building out your application software.

About

Instructions on how to setup the Windows environment to program the TI TM4C123G LaunchPad microcontroller.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published