NOTICE: The Processors Wiki will End-of-Life in December of 2020. It is recommended to download any files or other content you may need that are hosted on The site is now set to read only.

LAUNCHXL2 570LC43: Project 1

From Texas Instruments Wiki
Jump to: navigation, search

Running the Demo (PROJECT 1)

1. (Optional) Installing Code Composer Studio (CCS)

The virtual COM port drivers that are required to see the console output of the out of box demo are bundled with CCS. If you wish to see this part of the demo, install CCS v6.1 - which is available on this page:

After installing CCS make that your versions of these components are at least:

  • TI Emulators 5.1.641.00 or Later
  • Hercules Emulation 6.0.7 or Later

You can list the versions of installed components by launching CCS, and from Help->About Code Composer Studio press the 'Installation Details' button. If you have an older version of either package, then do Help->Check for Updates from within CCS to update your versions.

2. Connecting to a Computer and Powering the LaunchPad

The LaunchPad is configured by default to be USB powered (JP6 must be shorted), which can be done by connecting the LaunchPad to a computer using the included USB cable. If you skipped the optional step 1, ignore any error/warning messages about missing drivers during this step.

3. (Optional) Opening a Terminal Program

If you completed step 1 and wish to see the console output of the demo, this is the time to configure the terminal program of your choice:

  • Select COM port identified as "XDS Class Application/User UART" from your computer's device manager.
  • Configure Baud Rate: 19200, Data Bits: 8, Stop Bits: 2 and Parity: None.

4. Running the Out-of-box Demo

This LaunchPad comes pre-programmed with a demo set that highlights several of MCU's safety features. When powered the LaunchPad will start blinking USER LEDs.

Demo 1:

Potentiometer (U10) is connected to one of the MCU's Analog Inputs. USER LED B (LED3) blinks according to the potentiometer setting. Turning the potentiometer will increase/decrease the speed at which USER LED B blinks.

Demo 2:

Pressing S5 (labeled Kill OSC) will short the Oscillator and cause the MCU to detect an Oscillator Fault. The on chip clock monitor will detect this and trigger the ERROR\ pin. The ERR LED in the top right corner of the LaunchPad will light up. You must press the PORRST pushbutton to recover from this condition and run the remaining demos.

Demo 3:

The push-button USER SWITCH B will inject a core compare error (CPU mismatch). An on-chip monitor will detect the fault and trigger an error signal causing the ERR LED to light up.

Demo 4:

The push-button USER SWITCH A will inject a single bit error in the MCU's flash on every push. ECC logic corrects single bit errors in flash and counts them. The USER LED A blinks faster with every error detected.

NB: Unlike the other Hercules Launchpads - the RM57L843 and TMS570LC4357 devices contain a new Error Profiling (EPC) module that captures a history of the most recent single bit errors in a CAM. There is no longer a simple threshold after which a certain number of single bit (correctable) errors will trip the ERROR\ pin.

Building The Demo (Project 1)

Required Software

  1. CCS (Code Composer Studio) v6.1 or Later
  2. HALCoGen v. 4.0.4 or Later
  3. Hercules SafeTI™ Diagnostic Library 2.20

After installing CCS please confirm the version of the following CCS Components:

  • TI Emulators 5.1.641.00 or Later
  • Hercules Emulation 6.0.7 or Later

Download the Project 1 Files

File:Proj1 launchxl2 rm57l

Save this .zip file in a temporary folder. You don't need to extract the files as this will be done when importing the project into your CCS workspace.

Import the correct project into a CCS Workspace

  • Launch CCS.
  • From the Project Menu, select Import CCS Project.
  • The Import CCS Eclipse Projects wizard opens.
  • Check the 'Select Archive File' button and then press "Browse" to find the project .zip file.
  • You should see that the zip file contains 2 projects -

Update the Path Variable SAFETY_LIB

With the project imported, you can right click on the project from CCS's project explorer pane, and select "Properties" to examine the build properties.

Within the project properties, go to the Resource->Linked Resource node in the properties tree, and select the tab labeled "Path Variables". There should be a path variable with the name "SAFETY_LIB".

This path variable needs to point to the correct location on your build machine where you have installed the SafeTI Diagnostic Library. For example, it may point to C:\ti\Hercules\SafeTI Diagnostic Library\2.2.0 (make sure to include the version # in this path variable). This variable is used to include header files from the SafeTI Diagnostic Library - as well as to point to the '.lib' library object file.

You can see which folders from the safety library are included by navigating within the project properties to the Build->Arm Compiler->Include Options node of the tree and inspecting the "Add dir to #include search path" box. You should see these entries that are external to the project:

  • "${SAFETY_LIB}/hal/include"
  • "${SAFETY_LIB}/safety_library/include"

You can also check the Build->Arm Linker->File Search Path node of the properties and see that one of the pre-built library binaries is included in the link options. For example,

  • "${SAFETY_LIB}/libs/SafeTILib_TMS570LC43_BE.lib" is linked with Project1_LAUNCHXL2_570LC43
  • "${SAFETY_LIB}/libs/SafeTILib_RM57L_LE.lib" is linked with Project1_LAUNCHXL2_RM57L

There other paths within the project are project-relative and should not need to be adjusted.

With the path variable updated to match the location where you have installed the safety library - you should be able to rebuild the project successfully. Note that the project uses linker generated ECC, so you also need to adjust the Flash download settings in CCS or you may get errors when attempting to program. See this page for help if needed.

My Personal Favorite Tip

Within project properties, on the "Build" node and the "Behaviour" tab, check the box "Enable parallel build" if your build machine has a multicore CPU. Thank you gmake!