Package Title Stellaris CPU Support Package
Package Version 1.5
CPU Texas Instruments Stellaris
Required Additional Packages None
Required CrossStudio Version 2.0.3 or later

This package contains project templates and system files for the Stellaris.

Package Installation Instructions

CrossWorks Version 2.x Installation Instructions

To install this support package using CrossStudio:

  1. Click the Tools > Package Manager menu option to open the package manager window.
  2. Right click on the Stellaris CPU Support Package entry and select Install Selected Packages.
  3. Click Next to take you to the summary page.
  4. Click Next to install the package.
  5. Click Finish to close the package manager window.

Alternatively, to manually install this support package:

  1. Download the file Stellaris.hzq using your web browser.
  2. Click the Tools > Manually Install Packages menu option.
  3. Select the file you have just downloaded to install the package.

Supported Targets

100 Series

LM3S101, LM3S102.

300 Series

LM3S300, LM3S301, LM3S308, LM3S310, LM3S315, LM3S316, LM3S317, LM3S328.

600 Series

LM3S600, LM3S601, LM3S608, LM3S610, LM3S611, LM3S612, LM3S613, LM3S615, LM3S617, LM3S618, LM3S628.

800 Series

LM3S800, LM3S801, LM3S808, LM3S811, LM3S812, LM3S815, LM3S817, LM3S818, LM3S828.

1000 Series

LM3S1110, LM3S1133, LM3S1138, LM3S1150, LM3S1162, LM3S1165, LM3S1332, LM3S1435, LM3S1439, LM3S1512, LM3S1538, LM3S1601, LM3S1607, LM3S1608, LM3S1620, LM3S1625, LM3S1626, LM3S1627, LM3S1635, LM3S1637, LM3S1751, LM3S1776, LM3S1811, LM3S1816, LM3S1850, LM3S1911, LM3S1918, LM3S1937, LM3S1958, LM3S1960, LM3S1968, LM3S1J11, LM3S1J16, LM3S1N11, LM3S1N16, LM3S1W16, LM3S1Z16.

2000 Series

LM3S2110, LM3S2139, LM3S2276, LM3S2410, LM3S2412, LM3S2432, LM3S2533, LM3S2601, LM3S2608, LM3S2616, LM3S2620, LM3S2637, LM3S2651, LM3S2671, LM3S2678, LM3S2730, LM3S2739, LM3S2776, LM3S2793, LM3S2911, LM3S2918, LM3S2939, LM3S2948, LM3S2950, LM3S2965, LM3S2B93.

3000 Series

LM3S3651, LM3S3739, LM3S3748, LM3S3749, LM3S3826, LM3S3J26, LM3S3N26, LM3S3W26, LM3S3Z26.

5000 Series

LM3S5632, LM3S5651, LM3S5652, LM3S5656, LM3S5662, LM3S5732, LM3S5737, LM3S5739, LM3S5747, LM3S5749, LM3S5752, LM3S5762, LM3S5791, LM3S5951, LM3S5956, LM3S5B91, LM3S5K31, LM3S5K36, LM3S5P31, LM3S5P36, LM3S5P51, LM3S5P56, LM3S5R31, LM3S5R36, LM3S5T36, LM3S5Y36.

6000 Series

LM3S6100, LM3S6110, LM3S6420, LM3S6422, LM3S6432, LM3S6537, LM3S6610, LM3S6611, LM3S6618, LM3S6633, LM3S6637, LM3S6730, LM3S6753, LM3S6911, LM3S6918, LM3S6938, LM3S6950, LM3S6952, LM3S6965.

8000 Series

LM3S8530, LM3S8538, LM3S8630, LM3S8730, LM3S8733, LM3S8738, LM3S8930, LM3S8933, LM3S8938, LM3S8962, LM3S8970, LM3S8971.

9000 Series

LM3S9790, LM3S9792, LM3S9997, LM3S9B90, LM3S9B92, LM3S9B95, LM3S9B96, LM3S9L97.

Package Version History

1.5

  • Fixed flash loader computation of available RAM.

1.4

  • Fixed flash loader to work on small RAM parts LMS3101/LM3S102.
  • Fixed clock setup for DK-LM3S9B96 and EK-LM3S9B0 samples to run at 80Mhz.
  • Added Flash Copy To RAM section placement property group.
  • Section placement property group now selects the loader to use as such there is no requirement for Flash/RAM configurations.
  • Added start macros to the first sections of the placement files which enables memory to be reserved at the start of the segment by defining the section placement macros.

1.3

  • The flash loader now maps flash to zero for devices that have internal ROM.
  • Updated device support.
  • New CTL executable project types now have the lm3s_ctl_board.c for the EK-LM3S1968 added. This file should be modified for the CPU/board you are using.
  • Updated CMSIS core files to V1.30.

1.2

  • The vector table offset register is now always configured to allow the start address of FLASH configuration programs to be moved away from 0x00000000 without modification of startup code.

1.1

  • Loader supports software breakpoints in flash memory.

1.0

  • Initial release.

1) Creating Stellaris LM3Sxxx Projects

To create a new Stellaris LM3Sxxx project
  • Select the File > New > New Project menu item.
  • Select the appropriate Generic Stellaris LM3Sxxx from the Categories list.
  • Select the required project template type from the Templates list.
  • Set the required project name and location directory.
  • Click OK.
To build and debug an application the runs in Flash memory
  • Select the project to work on by using the Project > Set Active Project menu option.
  • Select the configuration you require by using the Build > Set Active Build Configuration menu option.
  • Right click on the project node in the project explorer and select the Flash placement.
  • Build the project by using the Build > Build Project menu option.
  • Connect to the appropriate target in the target window.
  • Download and start debugging the current project by using Debug > Start Debugging.
To make the application startup from reset
  • Right click on the project node in the project explorer and select Properties...
  • In the properties window scroll down to the Preprocessor Options section.
  • Type STARTUP_FROM_RESET into the Preprocessor Definitions property editor.

2) Stellaris LM3Sxxx Project Specifics

Target Processor

Once a project has been created you can select different target processors by right clicking on the project node in the project explorer and selecting the Target Processor entry.

Selecting the target processor will specify the memory map that is used for the build and debug. You can view the selected memory map by right clicking on the project node in the project explorer and selecting View Memory Map or View Memory Map (as text).

Selecting the target processor will cause the preprocessor definition __TARGET_PROCESSOR to be set to the specified processor name when you compile the project.

Section Placement

CrossStudio for ARM supports Stellaris LM3Sxxx projects running applications in a number of different memory configurations. You can select the memory configuration you require by right clicking on the project node in the project explorer and selecting the Placement entry.

For Stellaris LM3Sxxx projects the set of placements are:

  • Flash application runs in internal Flash memory.
  • Flash Copy To RAM application starts in internal flash and copies itself to run internal RAM memory.
  • RAM application runs internal RAM memory.
Stack and Heap Sizes

The stack and heap sizes are set to be 128 bytes by default when a project is created. This enables projects to run on the smallest of the Stellaris processors. It is likely that you will need to change these values when developing applications to run on the larger of the Stellaris processors.

Target Startup Code

The startup code LM3S_Startup.s is common to all Stellaris processors. There are a set of preprocessor defines that configure the startup code and are documented in the startup file itself. The startup code calls out to a weak symbol SystemInit with the stack pointer set to the top of RAM. The SystemInit function can be used to set the CPU clock or configure any external memories prior to the C initialisation code as such it cannot access initialised static data.

The startup code declares weak symbols for each interrupt service routine for example the PWM_Fault_ISR function will be called when this interrupt occurs. If you are porting code that has application specific interrupt service routine names then you can use the preprocessor definitions to rename the symbol for example PWM_Fault_ISR=MyPWMFaultISR.

Target Reset Script

The reset script LM3S_Target.js is used by the debugger to reset the target board. This script will use the SRST signal so in order to reset the target properly and therefore debug your application reliably from a defined state the SRST signal should be connected.

Stellaris LM3Sxxx Internal Flash Loader

The flash loader (click to load solution) for the internal Flash of Stellaris LM3Sxxx is provided.

Memory Simulator

An Stellaris LM3Sxxx memory simulator is provided that simulates the memories of the various Stellaris devices. The memory simulation parameter (which is set by the Target Processor selection) specifies the size of the Flash and the RAM memories.

Header Files

Header files are generated from the memory map files and can be included using the file LM3S.h. The Stellaris LM3Sxxx project setup adds the directory $(TargetsDir)/LM3S to the User Include Directories project property so that you can just include targets/LM3S.h into your source code.

CMSIS support

CMSIS header files and library are included as part of the new project setup.

CTL support

The file lm3s_ctl.c implements the CTL system timer using the Cortex-M3 SysTick timer. The timer is configured to interrupt at a 10 millisecond rate and increment the CTL system timer by 10 to give a millisecond timer. The implementation uses the CMSIS SystemFrequency global variable to determine the CPU clock frequency. The CTL samples that are provided in this package have board specific files that implement this variable.

The CTL interrupt support functions ctl_global_interrupts_set, ctl_set_priority, ctl_unmask_isr and ctl_mask_isr are implemented in this file. The implementation uses the lowest half of the available NVIC priorities (top bit set in the priority) for CTL interrupts and disables global interrupts by raising the NVIC basepriority above the highest CTL priority. This enables you to use the upper half of the NVIC priorities for interrupts that do not use CTL and should not be disabled by a CTL interrupt.

When you create a new CTL executable project the file lm3s_ctl_board.c is copied to the project - you will need to modify this file to work on the CPU/board you are using.

3) CrossWorks Shared Sample Projects

The following project files are supplied that can be used to run the standard CrossWorks shared samples.

4) CTL Sample Projects

The following project files are supplied that can be used to run the standard CrossWorks CTL samples.