NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.

Stellaris support in CCS

From Texas Instruments Wiki
Jump to: navigation, search

The purpose of this page is to clarify the existing TI tools support for the Stellaris® Cortex M3 microcontrollers.

Introduction[edit]

The Stellaris® family of CortexM devices is supported by an extensive set of in-house hardware development tools and third-party software tools from several vendors. Stellaris development in Code Composer Studio is first supported in CCSv4.1.0. Cortex-M4 support starts in CCSv5.1.0, although some of the earlier development boards have a package that adds support to CCSv4.2.4.

Tool support[edit]

Compilers[edit]

A key item required to support Stellaris development was the addition of packed structure support. Compiler releases starting with 4.6.1 (included in CCSv4.1.0) and newer have this support. Packed structures are commonly used by many off-the-shelf libraries for Cortex M including some used in the Stellarisware software.

Support for Cortex-M4 devices started in compiler release 4.9.0.

Debugger[edit]

It is possible to connect to a Stellaris development board using an XDS510 or XDS560 class emulator using the instructions provided in the links below. CCSv4.1.0 has added support for the programming of Flash on Stellaris devices and debugging using the onboard emulation that comes with the Stellaris development kits.

Simulation[edit]

It contains Cortex M3 Cycle accurate and Functional simulators. For Stellaris you will want to select the little endian memory models. These Cortex M3 functional simulator model the Cortex-M3 core, Memory Protection Unit, NVIC, systick timer, memory interfaces and external memory. The cycle accurate simulator models the Cortex-M3 core in a highly accurate fashion and the memory interfaces in a protocol accurate fashion. These simulators support TI BIOS based applications development and benchmarking.

Simulators support the following rich set of debug and analysis features:

  1. Data Watchpoint
  2. Interrupt Latency Detector
  3. Function Profiling
  4. Code Coverage
  5. Pin Connect

Hardware Adapters[edit]

  • Several Stellaris Evaluation kits (LM3S9B90, LM3S9B92, etc.) come with a 10 pin ARM connector and an ICDI. To connect an external emulator (XDS100, XDS510 or XDS560) you will need the 10 pin ARM target to 20 pin ARM emulator adapter (available here).


  • If using the adapter above or a Stellaris board that has a 20-pin ARM connector, a TI 14 or 20-pin to ARM 20-pin adapter may be required (models here). The more featured emulators have these adapters already bundled, but if that is not the case you can either get one directly from TI estore or from your 3rd party tools vendor.


  • Depending on the emulator, a modification to the adapter may be required due to the routing of JTAG signals. Check the emulation connection page here.


What is not supported[edit]

  • Serial Wire Output for TPIU trace output
  • Standard Console I/O operations (fread, fwrite, fopen, etc.) are not yet supported on the current release of CCS when using the on-board emulator

What CCS License types support Stellaris?[edit]

Stellaris is supported by both Platinum and Microcontroller licenses starting with CCSv4.1. There will not be a code size limited version (MCU Core) for Stellaris. You can use the Stellaris development kits with the free bundle license. With the free license you are restricted to using the development board that comes with the Stellaris development kits, there will be no code size limit.

Getting started with CCS and Stellaris[edit]

Known Issues[edit]

Clocking Features[edit]

The Profile Clock is disabled due to Hardware limitations of the Cortex M core. However, CCS can still profile by reading the SCTM registers.

To enable this feature:

  • From the Main Menu in the Debug View, Select View->Breakpoints
View breakpoints.JPG
  • The Breakpoints window will be added to the View. A Count Event can be selected from the drop-down menu, next to the three breakpoints icon, as shown below.
Count event.JPG
  • This gives you the option to select an event to count Clock Cycles.
Clock cycles.JPG
  • Enable a breakpoint in your code by double-clicking on the source file. Select the Run icon. When the breakpoint is reached the Count Event will display the number of Clock Cycles.
Number Cycles.JPG

You can also set two breakpoints to count the number of events between two places in your code (useful to profile functions):

  • Enable the count event as shown above, then right-click on its entry in the Breakpoints view, select Properties and check the box marked Reset Count on Run. This will make the Event counter reset every time the processor is put to run, therefore allowing counting events withing breakpoint boundaries.
Stellaris event counter properties.png
  • Set two breakpoints in your code:
Stellaris breakpoints.png
  • Run to the first breakpoint. The Event counter will count the number of cycles up to this point in your code. You can disregard this number.
  • Run to the second breakpoint. This time the Event count will show the number of cycles between the first and the second breakpoint.
Stellaris breakpoint end.png

Important! The number of CPU cycles greatly varies with the type of memory being used (Flash, RAM, external) and if the code needs to wait for a peripheral to respond, therefore keep this in mind when interpreting the results obtained.

Hardware Breakpoints Limitations[edit]

Warning! As with any debugging environment where the code is loaded to non-volatile memory (FLASH in this case), the number of Hardware Breakpoints is relatively small. The breakpoint manager lets you configure all the hardware resources in the system as you please, and if you happen to use them all up, there may not be enough to perform other activities as a result (more on this below).

The Breakpoint Manager for this device shows the message below when the maximum number of hardware breakpoints is reached:

"Breakpoint Manager: Error programming AET Job: There is no AET resource to support this job.".

I am respecting the number of hardware breakpoints available but I still get the error message above when stepping in my code. Why?

  • This happens if you select the maximum amount of Hardware Breakpoints allowed then attempt to step through the code. F6 is a step over which is implemented detecting if a function call is present, stepping into if not, or setting a temporary breakpoint after the call and running if there is one. As such, if all hw breakpoints are used up, and the code you are stepping is in ROM (so you can't use software breakpoints), then step over won't be possible if on a function call.

RTS Library Selection[edit]

  • Output Format - early CCSv4.1.x releases do not automatically update the RTS Library file when the output format is changed. If you change the output format from ELF to COFF you must also update the RTS library file.
This is fixed in CCSv4.2.4 and newer.


Device Endianness[edit]

Note: Not an Issue but a Warning The Stellaris devices use little endian, therefore the device endianess should be selected as “little” in the Project Settings. If you receive an error similar to the following you should verify the device endianess selected.

fatal error: object files have incompatible byte orderings ("C:/Program Files/Texas  Instruments3/ccsv4/tools/compiler/tms470/lib/rtsv7M3_T_le_eabi.lib<boot.obj>
  " = little endian, "./blinky.obj" = big endian)

Frequency out of range error[edit]

One of the causes that throw a "frequency out of range" error (while trying to connect to a Stellaris device using an ICDI) is the improper installation of USB device drivers.

To solve that, open the Device Manager: right-click on the icon My Computer --> select Properties --> (if using XP, select the tab Hardware --> click on Device Manager and see if the option Other devices shows any entries named Stellaris with an exclamation mark. If so, right click and select Update Driver Software... (Update Driver if using XP) and browse to the placement of Stellaris device drivers inside the CCS install directory.

  • CCSv4: <CCS_INSTALL_DIR>\ccsv4\emulation\drivers\stellaris
  • CCSv5: <CCS_INSTALL_DIR>\ccsv5\ccs_base\emulation\drivers\stellaris



References[edit]

Demonstrating CCS

Creating custom targets

More about TI support for ARM cores

General information about Simulators: Category:Simulation

E2e.jpg {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article Stellaris support in CCS here.

Keystone=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article Stellaris support in CCS here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article Stellaris support in CCS here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article Stellaris support in CCS here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article Stellaris support in CCS here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article Stellaris support in CCS here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article Stellaris support in CCS here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article Stellaris support in CCS here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article Stellaris support in CCS here.

}}

Hyperlink blue.png Links

Amplifiers & Linear
Audio
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity