Recent Changes - Search:

edit SideBar

SettingUpACGModelForMbed

Back to mbed

Set up Ptolemy II

First, follow one of these guides to install Ptolemy II:

Loading an Existing mbed model

To see many of the various tests and examples we have done, open one of the files in the folder (from the PTII install) $PTII/cg/adapter/generic/program/procedural/c/mbed/adapters/ptolemy/vergil/actor/lib/demo/mbed/ from vergil.

Creating a new Model

In order to create a new model, open vergil and select a new graphical model. Drag in the SDF director, and the CCodeGenerator actor, then save the actor. Build your model, to access to interfaces to the mbed K64F that we have made over the course of the project, navigate to MoreLibraries->Mbed on the left navigation. To configure the CCodeGenerator, double click it. Change the GeneratorPackageList to generic.program.procedural.c.mbed.K64F, or KL25Z if you are using that actor (although this may not work with all the custom actors). You can also change where the generated file will be placed.

In order to generate the code, from the CCodgenerator actor, press the generate button. The code will be generator and compiled. If the offline compiler is not set up, the code can be copied into the online mbed compile, and the appropriate libraries added from there. Otherwise, follow the next guide to set up the offline libraries.

Offline mbed Library Setup

Edit - History - Print - Recent Changes - Search
Page last modified on May 15, 2015, at 01:09 am