no-OS
Loading...
Searching...
No Matches
basic_example.c File Reference

Hello World example for no-OS. More...

#include <inttypes.h>
#include "parameters.h"
#include "no_os_uart.h"
#include "no_os_delay.h"
#include "no_os_error.h"
#include "no_os_print_log.h"
#include "basic_example.h"
Include dependency graph for basic_example.c:

Functions

int basic_example_main (void)
 Hello World application entry point.
 

Detailed Description

Hello World example for no-OS.

    This project is a minimal starting point for learning how to build
    and run a bare-metal no-OS application.  It demonstrates:

      1. Initialising a UART peripheral using the no-OS HAL
      2. Printing messages with the no-OS logging macros
      3. Using the no-OS delay API
      4. Proper error handling and resource cleanup

    BUILD
    -----
    Place your board's .xsa file (exported from Vivado) in the project
    directory, then run:

      make

    The build system auto-detects the target architecture from the XSA
    and selects the right cross-compiler automatically.

    EXPECTED OUTPUT (115200 8N1 on the USB-UART port)
    --------------------------------------------------
      *** no-OS Hello World ***
      Hello World #1
      Hello World #2
      ...
Author
Analog Devices, Inc.

Copyright 2026(c) Analog Devices, Inc.

SPDX-License-Identifier: BSD-3-Clause

Function Documentation

◆ basic_example_main()

int basic_example_main ( void )

Hello World application entry point.

basic example main execution.

Initialises the UART peripheral, prints a banner, then loops forever printing a counter message once per second.

Returns
0 on success, negative error code on failure.