Get from Ico-github-logo

Highlights from
Simulink (Embedded Coder) Target for TI LaunchPad

  • AddExecutionProfileToData...
    if Simulink.sdi.getRunCount == 0
  • cordic_fxp
    see also web([docroot '/fixedpoint/ug/creating-lookup-tables-for-a-sine-function.html'])
  • fix_sine(errmax,nptsmax)
    Define the range over which to optimize breakpoints
  • launchpadAfterMakeHook( m...
    Check the model if a target_paths.mk should be created
  • launchpadBeforeMakeHook( ...
    Check the model if a target_paths.mk should be created
  • launchpad_callback_handle...
    Setup the hardware configuration
  • launchpad_download(modelN...
    assignin('base','makertwObj',makertwObj);
  • launchpad_make_rtw_hook(h...
  • launchpad_setup()
    Choose COM port
  • launchpad_tmf(varargin)
    Possibly will separate in future...
  • sl_customization(cm)
    SL_CUSTOMIZATION for TI LaunchPad PIL connectivity config
  • slblocks
  • launchpad.Communicator
  • launchpad.ConnectivityConfig
    CONNECTIVITYCONFIG is TI LaunchPad PIL configuration class
  • launchpad.Launcher
    LAUNCHER is TI LaunchPad class for launching a PIL application
  • launchpad.TargetApplicati...
    TARGETAPPLICATIONFRAMEWORK is TI LaunchPad application framework for PIL
  • launchpad.Timer
  • lct_genblocks.m
    Serial Write
  • test_rtiostreamserial.m
    Rebuild library
  • launchpad
  • launchpad_R2012a
  • launchpad_R2012b
  • launchpad_R2013b
  • launchpad_lib
  • test_multirate
  • test_multirate_system
  • tilp_fxp
  • tilp_pil
  • tilp_pil_fxp
  • tilp_pil_system
  • View all files

5.0

5.0 | 1 rating Rate this file 28 Downloads (last 30 days) File Size: 181 KB File ID: #37825
image thumbnail

Simulink (Embedded Coder) Target for TI LaunchPad

by

 

16 Aug 2012 (Updated )

Thsi target support package allows you to deploy your algorithms on TI LaunchPad.

| Watch this File

File Information
Description

Simulink (Embedded Coder) Target for TI LaunchPad
Summary:
TI LaunchPad (http://ti.com/launchpad) is an easy-to-use, affordable (< 5 USD),
and scalable introduction to the world of microcontrollers and the MSP430 family.
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.

Installation:

1) Windows/Linux: Have Code Composer Studio 5 installed (http://processors.wiki.ti.com/index.php/Download_CCS).
Note: Currently Code Composer Studio 5 for Linux doesn't support LaunchPad
connection/debugging. Therefore, you will also need mspdebug (http://mspdebug.sourceforge.net/) on Linux to
download/debug after compiling with CCSv5 toolchain.
On Linux, you can use mspgcc toolchain instead of CCSv5. This package supports
both mspgcc and CCSv5 on Linux.

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

2) a) Extract this package somewhere. Make sure there are no spaces/non-ascii characters in path (just in case).
   b) Make sure you have a working/supported host compiler (http://www.mathworks.com/support/compilers/R2012b/index.html) by running 'mex -setup' in MATLAB.
   c) Within MATLAB, 'cd' to the directory containing launchpad_setup.m and run this script.
   d) Swap TX/RX jumpers on TI LaunchPad (see the group of 5 jumpers on your board). This package uses HW UART (see inscription on the board). If you don't do this, Serial Read/Write blocks and PIL will not work.

3) You should be good to go.

What this package already has:
- Standalone execution on target (driven by ISR)
- Support for MSP430G2553 only
- Simulink library blocks for:
        * Serial read/write (hardware UART - you must swap TX/RX jumpers on your LaunchPad)
        * LED
        * Built-in temperature sensor
        * Push button
- Execution in PIL mode (hardware UART - you must swap TX/RX jumpers on your LaunchPad)
- PIL mode profiling

What this package would like to have:
- More Simulink blocks
- Support for other LaunchPad compatible MCUs
- More documentation

Required Products Embedded Coder
Simulink
MATLAB
MATLAB release MATLAB 8.0 (R2012b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (7)
08 Jul 2013 Mikhail

Use the shipped demo model called tilp_pil_system, which is already set for PIL mode.

Have a look at the video: https://www.youtube.com/watch?v=aivaV5RG-Ek

You wouldn't understand the words in the video, but the visual is good enough to get you started.

The video show Model reference PIL approach as opposed to Top model PIL approach that you are trying to do.

Please refer to documentation for information about how to setup the model for Top model PIL.

08 Jul 2013 Martin

Hello again,
The PIL mode doesn't work on my computer.
If I try it only via ccs -> i can debug the application. When I start "RUN" from Simulink (in PIL mode) I get an error: "Error evaluating 'InitFcn' callback of S-Function block (mask) 'launchpad_R2012b_wrapper/launchpad_R2012b'.

Caused by:
An error occurred while calling into the SIL or PIL target connectivity implementation.
Error(s) encountered while building model "launchpad_R2012b" ".

I startet Matlab2012b. Run "mex -setup", run launchpad_setup.m. Open demo "launchpad_R2012b.slx" mode PIL and press the run button.
Only download works fine -> but how I can debug the application on the target directly from Simulink?
thanks
martin

04 Jul 2013 Mikhail

Using PIL mode in Simulink or like you usually do with CCS debugger.

04 Jul 2013 Martin

Ok build and download works. But how can I obtain values from the MSP430 (debug)?

04 Jul 2013 Mikhail

By pressing the Build button, obviously. Please make yourself familiar with some basic concepts of Simulink and Embedded Coder before asking questions.

03 Jul 2013 Martin

Hello,
after opening the demo launchpad_R_2012b in matlab -> how can I download/debug the application on the launchpad target?

thanks
m.k.

21 Aug 2012 Denis Zhegalin  
Updates
24 Sep 2012

Add support for R2012b

09 Oct 2012

Implement PIL execution profiling

25 Oct 2012

Add demo models for PIL profiling

21 May 2014

Link to Github repo

Contact us