All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Create helloWorld

Here's how easy it is to create a Legato version of our old friend helloWorld.

Create a text file called hello.c containing the following text:

#include "legato.h"
COMPONENT_INIT
{
LE_INFO("Hello world.");
}

The COMPONENT_INIT macro defines a component initializer function that Legato automatically runs at process start-up. When Legato builds your code, it automatically defines COMPONENT_INIT to be a proper function declaration (this reduces build setup work).

The component initializer will run LE_INFO() at start-up. LE_INFO() logs a message at the INFO severity level.


Copyright (C) Sierra Wireless, Inc. 2014. Use of this work is subject to license.