Setting Storyboard Options for MCU Platforms

Introduction

When using the Storyboard Engine on an MPU class processor with an OS like Linux or QNX, there is a way to launch the Engine with command line arguments. This is different from the way that the Engine gets invoked on an MCU class of hardware.

On an MCU class of hardware, the Engine is being launched as a task as part of the OS, which means the options are passed to the engine through parameters to a function call.

This document will outline how to set up those arguments and which function to pass them to.

Passing Options to the Engine

The Storyboard Engine is run as a task within the OS when it is being used on an MCU class of hardware. The name of the function that represents the engine task is called sbengine_main_task in the integration guide. It’s possible that this function is called something else. The area of code that needs to be looked for is the one that is making the call to:

run_storyboard_app(sb_model, GR_APP_LOAD_STRING, args, n);

The first parameter is the model to load. The second parameter describes how the model parameter should be interpreted. The last two parameters are the arguments that have been specified, and the number of arguments that have been specified. An example of how to do this is:

char *args[20];

int n = 0;

args[n++] = "screen_mgr";

args[n++] = "fps";

The above code is passing the fps option into the screen manager. This will turn on FPS reporting in the screen manager when the engine is run. The first string is the name of the manager or plugin that the option is for, and the second string is the option. If multiple managers or plugin options were to be specified it would be:

char *args[20];

int n = 0;

args[n++] = "screen_mgr";

args[n++] = "fps";

args[n++] = “trace”;

args[n++] = “perf=1,perf_buffer=1024”;

To pass multiple options to the same plugin or manager, the list is comma-separated. This is an example of how to pass multiple options to a plugin or a manager:

Conclusion

Using the arguments parameter to the run_storyboard_app function will allow any engine or plugin option to be set for when the engine is run. For a list of the options that can be passed into the Storyboard Engine, see the Storyboard Engine Plugin Options section in the Storyboard documentation.

Was this article helpful?
0 out of 0 found this helpful