Get from Ico-github-logo

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Simulink (Embedded Coder) Target for TI Stellaris LaunchPad

  • sl_customization(cm)
    SL_CUSTOMIZATION for TI Stellaris LaunchPad PIL connectivity config
  • slblocks
  • stellarisAfterMakeHook( m...
    Check the model if a should be created
  • stellarisBeforeMakeHook( ...
    Check the model if a should be created
  • stellaris_adc_ssena(blk,S...
  • stellaris_adc_stepconfig(...
  • stellaris_callback_handle...
    Setup the hardware configuration
  • stellaris_customcode(buil...
    Add startup_ccs.c to list of source files
  • stellaris_download(modelN...
    CompilerRoot = getpref('stellaris','CompilerRoot');
  • stellaris_make_rtw_hook(h...
  • stellaris_setup()
    Generate blocks
  • stellaris_timer
  • stellaris_tmf(varargin)
    Possibly will separate in future...
  • stellaris.Communicator
  • stellaris.ConnectivityConfig
    CONNECTIVITYCONFIG is TI Stellaris LaunchPad PIL configuration class
  • stellaris.Launcher
    LAUNCHER is TI Stellaris LaunchPad class for launching a PIL application
  • stellaris.TargetApplicati...
    TARGETAPPLICATIONFRAMEWORK is TI LaunchPad application framework for PIL
  • stellaris.Timer
  • lct_genblocks.m
    GPIO Write
  • adc.m
    Analog to Digital Converter
  • blocks.m
    Simulink blocks provided by this target
  • buttons.m
    Push Buttons support
  • genhelp.m
    re-add help to path to refresh menu
  • gpio.m
    GPIO support
  • gs.m
    Getting started with TI Stellaris LaunchPad
  • index.m
    TI Stellaris LaunchPad
  • pil.m
    Processor-in-the-Loop (PIL) simulation with TI Stellaris LaunchPad
  • sa.m
    Standalone execution driven by ISR on TI Stellaris LaunchPad
  • tempsensor.m
    Built-in Temperature Sensor support
  • uart.m
    UART support
  • test_rtiostreamserial.m
    See "Test an rtiostream Driver":
  • stellaris_lib.slx
  • stellaris_fft.slx
  • stellaris_fft_system.slx
  • stellaris_pil_mdlref.slx
  • stellaris_pil_mdlref_mr.slx
  • stellaris_pil_topmodel.slx
  • stellaris_test_adc.slx
  • stellaris_test_adc_xpc.slx
  • stellaris_test_blink.slx
  • stellaris_test_buttons.slx
  • stellaris_test_gpio.slx
  • stellaris_test_gpio_xpc.slx
  • stellaris_test_pil.slx
  • stellaris_test_pilcov.slx
  • stellaris_test_pil_profil...
  • stellaris_test_tempsensor...
  • stellaris_test_uart.slx
  • stellaris_test_uart_nb.slx
  • View all files
5.0 | 4 ratings Rate this file 25 Downloads (last 30 days) File Size: 795 KB File ID: #40069 Version: 1.5
image thumbnail

Simulink (Embedded Coder) Target for TI Stellaris LaunchPad


Mikhail (view profile)


29 Jan 2013 (Updated )

Simulink (Embedded Coder) Target for TI Stellaris LaunchPad

| Watch this File

File Information

Simulink (Embedded Coder) Target for TI Stellaris LaunchPad
TI Stellaris LaunchPad ( is a low-cost development board based on ARM Cortex-M4F.
Simulink ( is a leading environment for multidomain simulation and Model-Based Design.

Embedded Coder ( allows you to generate C code and deploy your algorithms to target hardware.

Please refer to this repository: for the latest development version. Your input and feedback is highly appreciated!


1) Windows/Linux: Have Code Composer Studio 5.3 (or above) installed (

2) Windows/Linux: Have StellarisWare installed ( You don't have to download the complete StellarisWare package. "StellarisWare for the Stellaris LM4F120 LaunchPad Evaluation Board" is enough.

Make sure your toolchain is working (build and download some test project, check connection) before you proceed!

3) Make sure you have a working/supported host compiler ( by running

    mex -setup


4) Extract this package somewhere. Make sure there are no spaces/non-ASCII characters in path (just in case).

5) Within MATLAB, 'cd' to the directory containing stellaris_setup.m and run this script.

You should be good to go.

What this package already has:

    Standalone execution on target (driven by ISR)
    Execution in PIL mode
    PIL mode profiling

    Simulink library blocks for:

    * GPIO
    * Push Buttons
    * UART Read/Write
    * Built-in temperature sensor
    * Generic ADC

What this package would like to have:

    Simulink library blocks for:

    * PWM, Interrupts, uDMA...
    * Timers

    More documentation

    External Mode support

Required Products Embedded Coder
MATLAB release MATLAB 9.1 (R2016b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (11)
18 Jan 2017 Nick Hunn

Can someone who has done the porting to the Tiva-C Launchpads upload their files?

Comment only
04 Oct 2016 Alberto Prudhomme

For the TivaC Launchpad the Serial Transmit only works for the port 0, if you change the port for 1,2 or 3 the value will be ignored, and the transmission will be done by the port 0.

Comment only
07 Jun 2015 Mikhail

Mikhail (view profile)

This package doesn't support Tiva-C directly. You need to make modifications. Specifically, you should refer to porting guide for Stellaris->Tiva-C, that explains how data types handling has changed (hence your error about undefined data type indentifier).

Comment only
06 Jun 2015 santhakumar

I have encountered a problem while building. Diagnostic viewer shows "C:/ti/TivaWare_C_Series-", line 582: error: identifier "uint32_t" is undefined " in "main_stellaris_test_gpio.c".
and some other errors, help me iam using tiva c launchpad. thanks

Comment only
25 Mar 2015 Peng Xu

Peng Xu (view profile)


I think Stellaris and Tiva are mostly binary compatible, means you can download binary compiled for Stellaris on Tiva and it will work. The only thing is that Tiva has a bit more peripheral. The CCS version do matters. Use CCS 5.3 (not later version) or you will have to patch the compile part if I remember it right.

Comment only
25 Mar 2015 Mikhail

Mikhail (view profile)

It is possible to use it with TivaC, and i heard from users who successfully used it after just changing (renaming) according options/binary names etc. I don't have TivaC, so can't help you with that - but it should be pretty straightforward.

Comment only
24 Mar 2015 Klemens Springer

Thanks for your great contribution!

Is it possible to use this target with the new Tiva™ C Series TM4C123G LaunchPad that replaced the Stellaris® LM4F120 LaunchPad? Both are using the same ARM Cortex M4F chip.

Do you have any experience with the new board?


Comment only
28 Jul 2014 shiguang wen

that's great!

01 Jul 2014 cheng

cheng (view profile)

07 May 2014 sest sent

07 May 2014 sest sent

22 Mar 2013 1.1

Link to the source repository, so people would know where to find a bleeding edge version.

05 Apr 2013 1.2

Add ADC support
Update to R2013a
Add documentation

02 Apr 2014 1.3

Among various fixes, this release was tested to work with MATLAB R2014a

18 Oct 2016 1.4

Link to Github repo

18 Oct 2016 1.5

Validated with R2016b

Contact us