File Exchange

image thumbnail

Simulink (Embedded Coder) Target for TI Stellaris LaunchPad

version 1.6.0.0 (559 KB) by Mikhail
Simulink (Embedded Coder) Target for TI Stellaris LaunchPad

24 Downloads

Updated 25 Oct 2017

GitHub view license on GitHub

Simulink (Embedded Coder) Target for TI Stellaris LaunchPad
Summary:
TI Stellaris LaunchPad (http://www.ti.com/stellaris-launchpad-b) is a low-cost development board based on ARM Cortex-M4F.
Simulink (http://www.mathworks.com/products/simulink) is a leading environment for multidomain simulation and Model-Based Design.
Embedded Coder (http://www.mathworks.com/products/embedded-coder) allows you to generate C code and deploy your algorithms to target hardware.

Please refer to this repository: https://github.com/kyak/stellaris_ert for the latest development version. Your input and feedback is highly appreciated!

Installation:

1) Windows/Linux: Have Code Composer Studio 5.3 (or above) installed (http://processors.wiki.ti.com/index.php/Download_CCS).

2) Windows/Linux: Have StellarisWare installed (http://www.ti.com/tool/SW-EK-LM4F120XL). 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 (http://www.mathworks.com/support/compilers/R2014a/index.html) by running

mex -setup

in MATLAB.

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

Comments and Ratings (16)

Mikhail

@Minh Vu

The board is now EOL and I'm not really interested in implementing additional peripherals support.
You are welcome to create pull requests on Github. I'll be willing to review and merge new blocks.

Minh Vu

Thanks for your great contribution!
But how about I2C and SPI?

husam

on running test PIL, I get the error : The configuration parameters for this model do not support the following connectivity configurations: Texas Instruments Code Composer Studio (IDE), Texas Instruments Code Composer Studio (TCP/IP), Texas Instruments Code Composer Studio (Serial), TI Stellaris LaunchPad connectivity using UART
Any Help?

any help?

Anyone has done PIL for tiva c ?

Nick Hunn

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

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.

Mikhail

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).

santhakumar

I have encountered a problem while building. Diagnostic viewer shows "C:/ti/TivaWare_C_Series-2.1.0.12573/driverlib/sysctl.h", 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

Peng Xu

@Klemens

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.

Mikhail

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.

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?

Best,
Klemens

that's great!

cheng

sest sent

sest sent

Updates

1.6.0.0

Validated with R2017b

1.5.0.0

Validated with R2016b

1.4.0.0

Link to Github repo

1.3.0.0

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

1.2.0.0

Add ADC support
Update to R2013a
Add documentation

1.1.0.0

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

MATLAB Release Compatibility
Created with R2017b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Communities

Discover Live Editor

Create scripts with code, output, and formatted text in a single executable document.


Learn About Live Editor