Then, we need to create a dfe.conf file in our project's directory (src/hello_world/dfe.conf) to hold our application definition.For now it should be very simple, the example below targets the ioNode (simply adapt mmcu and freq variables if you're using a different platform):

You might notice the infinite for-loop at the end of the main function. Since our main function is the main entry point for our application, returning from it makes no sense. Actually, returning from it will produce unpredictable behavior as the flow of execution might end up anywhere within the program-space of our microcontroller...

For this reason it is important to keep in mind that your main function should never return.

We may now write whatever application code we want within this main function.

A library is provided as part of the Dooba SDK to simplify this: eloop.The eloop library actually implements the main function presented in the previous section. It assumes your code provides two functions:

void init() - your init function, called once during startup

void loop() - your update function, called repeatedly until power off

To use it, simply define eloop as a dependency in your application's dfe.conf file:

As explained in building with dbuild, any source file placed in our project's directory will automatically get picked up and built by dbuild.Therefore adding more files to your project is as simple as that - no need to declare them anywhere.