1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-18 02:53:52 +01:00
AnnsAnn 55fa531e02 examples: restructure to use subfolders based on README structure
examples: Fix incorrect category heading

examples: shorten coap folder name

static-tests/examples: check subfolders for entries

ci/test_native: Adjust to new examples structure

examples: adjust makefiles to new structure

ci/tests: Fix symlinks to point towards proper examples
2025-02-13 11:54:09 +01:00

1.1 KiB

Hello World!

This is a basic example how to use RIOT in your embedded application. It prints out the famous text Hello World!.

This example should foremost give you an overview how to use the Makefile system:

  • First you must give your application a name, which is commonly the same as the name of the directory it resides in. Then you can define a default BOARD for which the application was written. By using e.g. make BOARD=msba2 you can override the default board. With make buildtest the application gets compiled for all supported boards.

  • The variable RIOTBASE contains an absolute or relative path to the directory where you have checked out RIOT. If your code resides in a subdirectory of RIOT, then you can use $(CURDIR) as it's done in here.

  • The variable QUIET, which is either 1 or 0, defines whether to print verbose compile information, or hide them, respectively.

  • The last line of your Makefile must be include $(RIOTBASE)/Makefile.include.

The code itself may look like your usual C beginners hello-world example.