Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: FreeMASTER_HelloWorld FreeMASTER_HelloWorld2 FreeMASTER_HelloWorld3
Fork of freemaster_lib by
You are viewing an older revision! See the latest version
Homepage
FreeMASTER driver V1.8¶
FreeMASTER is a user-friendly real-time debug monitor and data visualization tool that you can use for any application development and information management. You can display multiple variables changing over time on an oscilloscope-like display, or view the data in text form.
Library¶
Import libraryfreemaster_lib
FreeMASTER library, Realtime monitor - debugger, data visualisaton
Example of the driver initialization
#include "freemaster_class.h" //Initialize FreeMASTER driver Freemaster fm(USBTX, USBRX); //Registration of all variables to observe in the FreeMASTER tool FMSTR_TSA_TABLE_LIST_BEGIN() FMSTR_TSA_TABLE_LIST_END()
Hello World¶
[Repository '/users/JardaPajskr/code/FreeMASTER_demo/' not found]
Demo project for the FreeMASTER tool - The FreeMASTER tool is available on http://www.freescale.com/FREEMASTER page.
Configuration of communication interface:
Hello World 2¶
Embedded Project¶
The FreeMASTER serial driver expects an include of the freemaster_class.h file. The constructor of the class Freemaster expects name of pins, which will be used for communication with the PC.
The embedded code have to define, which variables will be available on PC to monitor. The list of varibales to monitor defines the TSA tables. The definition of the TSA table is described bellow.
Observe Variables on PC¶
See more details on http://mcuoneclipse.com/2013/08/24/tutorial-freemaster-visualization-and-run-time-debugging/
TSA Tables¶
The TSA tables registers information about the variables into embedded code. With this feature the embedded application can define, which variables are available on PC application. The FreeMASTER driver enables two ways, how to register variables for showing on PC
- Dynamic definition
- Static definition
Dynamic definition of the TSA¶
The TsaAddVar() method of the Freemaster class adds details of the variable into the TSA table. Call this method in the initialization routine of your application.
Example of the dynamic definition TSA table
volatile unsigned char example_var8; volatile unsigned short example_var16; //register global or static variables fm.TsaAddVar(FMSTR_TSA_RW_VAR_CFG(example_var8,FMSTR_TSA_UINT8)); //register read only variable fm.TsaAddVar(FMSTR_TSA_RO_VAR_CFG(example_var16,FMSTR_TSA_UINT16));
The variables example_var8 and example_var16 wil be available on FreeMASTER tool on PC. Note: The table is defined in RAM and has limited amount of variables to register
Static definition of the TSA¶
The static TSA table can be defined in each application source file and describes list of global variables, which could be showed on PC by the FreeMASTER tool application.
Example of the TSA table
//Definition of global variables volatile unsigned char var8; volatile unsigned short var16; volatile unsigned long var32; typedef struct { unsigned short a; } OUTER_STRUCT; OUTER_STRUCT so1; //register the global variables in the TSA table FMSTR_TSA_TABLE_BEGIN(Table_Name) FMSTR_TSA_RW_VAR(var8, FMSTR_TSA_UINT8) //Register 8 bit variable FMSTR_TSA_RO_VAR(var16, FMSTR_TSA_UINT16) //Register 16 bit read only variable FMSTR_TSA_RW_VAR(var32inc, FMSTR_TSA_UINT32) FMSTR_TSA_RW_VAR(so1, FMSTR_TSA_USERTYPE(OUTER_STRUCT)) //Register structure FMSTR_TSA_STRUCT(OUTER_STRUCT) //Register name of the structure FMSTR_TSA_MEMBER(OUTER_STRUCT, a, FMSTR_TSA_UINT16) // Register member of structure FMSTR_TSA_TABLE_END()
Each TSA table have to be registered in the list of the TSA tables
Example of the TSA table
FMSTR_TSA_TABLE_LIST_BEGIN() FMSTR_TSA_TABLE(Table_Name) //.. other TSA tables FMSTR_TSA_TABLE_LIST_END()
Support¶
This driver supports Freescale Klxx processors only.