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.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. Neither the name of Analog Devices, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES, INC. "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANALOG DEVICES, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

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.

GPIO Pin Interrupt Controller

Switch to APG mode

Switch to AWG mode