Example-application - Example out-of-tree application that is also a module

Overview

Zephyr Example Application

This repository contains a Zephyr example application. The main purpose of this repository is to serve as a reference on how to structure Zephyr based applications. Some of the features demonstrated in this example are:

This repository is versioned together with the Zephyr main tree. This means that every time that Zephyr is tagged, this repository is tagged as well with the same version number, and the manifest entry for zephyr will point to the corresponding Zephyr tag. For example, example-application v2.6.0 will point to Zephyr v2.6.0. Note that the main branch will always point to the development branch of Zephyr, also main.

Getting Started

Before getting started, make sure you have a proper Zephyr development environment. You can follow the official Zephyr Getting Started Guide.

Initialization

The first step is to initialize the workspace folder (my-workspace) where the example-application and all Zephyr modules will be cloned. You can do that by running:

# initialize my-workspace for the example-application (main branch)
west init -m https://github.com/zephyrproject-rtos/example-application --mr main my-workspace
# update Zephyr modules
cd my-workspace
west update

Build & Run

The application can be built by running:

west build -b $BOARD -s app

where $BOARD is the target board. The custom_plank board found in this repository can be used. Note that Zephyr sample boards may be used if an appropriate overlay is provided (see app/boards).

A sample debug configuration is also provided. You can apply it by running:

west build -b $BOARD -s app -- -DOVERLAY_CONFIG=debug.conf

Note that you may also use it together with rtt.conf if using Segger RTT. Once you have built the application you can flash it by running:

west flash
Comments
  • Preliminary example manifest+module

    Preliminary example manifest+module

    Provides preliminary content for an example manifest+module repository. The zephyr repository is independent of this repository.

    This commit includes some the infrastructure files necessary for:

    • Managing a new, indepedent repository, with overview documentation
    • Example manifest file
    • structure for an example module
    • Richly connected trivial functionality to verify module extensions for
      • include directory
      • subsystems
      • tests
      • samples
      • projects (non-sample, non-test)

    Beneath the zephyr folder containing the required module.yml, this repository parallels the Zephyr repository top-level code structure to set and follow user expectations. Files required for repository management (e.g. ownership tracking, CI configuration) are left at the root of the repository.

    This commit assumes the range of examples will grow to cover all module.yml capabilities and include tool and process support to fully verify the example code. Since zephyr is independent of this repository, it is also assumed that this repository will eventually have its own versioning, releases, and release notes.

    Fixes #28438

    Signed-off-by: Gregory Shue [email protected]

    opened by gregshue 16
  • example-app: initial version

    example-app: initial version

    This is an attempt to provide a Zephyr example application that, based on my experience, covers what is commonly used in "real world applications":

    • Basic application skeleton
    • Custom boards
    • Custom devicetree bindings
    • Out-of-tree drivers
    • CI configuration (using Github Actions)

    I have tried to focus on simplicity, but it may be simplified further or even extended to cover other areas (e.g. testing).

    Closes https://github.com/zephyrproject-rtos/zephyr/issues/28438

    opened by gmarull 10
  • Minor fixes and enhancements

    Minor fixes and enhancements

    • readme: remove doc from list of features Documentation is not (yet) provided.
    • drivers: sensor: examplesensor: use GPIO_DT_SPEC_INST_GET Instance version of the GPIO_DT_SPEC_GET was recently introduced.
    • ci: run on pull_request Run CI on push and pull_request.
    opened by gmarull 2
  • west: add example west command

    west: add example west command

    Add a working example for how to implement a west command within the user's manifest repository. There is documentation for this, but we should have some working code in here just to make life easier for people.

    Signed-off-by: Martí Bolívar [email protected]

    opened by mbolivar-nordic 1
  • Some updates for the example application

    Some updates for the example application

    drivers: sensor: examplesensor: use gpio_pin_get_dt
    
    Use the recently introduced GPIO API that allows obtaining pin state
    using the gpio_dt_spec struct.
    
    app: delete foo sample code
    
    The initial idea behind this code was to showcase documentation. It does
    not add any special value to the sample, so remove it. A proper library
    can be added in the future.
    
    opened by gmarull 1
  • Feature/33962 subsys module hello

    Feature/33962 subsys module hello

    This commit includes tests and samples discoverable and runnable by twister -T example-application, and documentation content that is valid and included in Zephyr document generation when copied into the Zephyr tree.

    During this development I discovered the following:

    • the Zephyr document generation process FAILS when run with this module is included in the path <<<<<
    • twister does not automatically follow the list of modules to find tests.
    opened by gregshue 1
  • readme: Add links to app dev and west

    readme: Add links to app dev and west

    Link to the relevant sections in the Zephyr documentation, including application development and west topologies.

    Signed-off-by: Carles Cufi [email protected]

    opened by carlescufi 0
  • ci/readme: remove usage of -s legacy option

    ci/readme: remove usage of -s legacy option

    -s/--source is a legacy option. There's a proposal to actually use it for something else in Zephyr now:

    https://github.com/zephyrproject-rtos/zephyr/pull/40669

    Let's update README.

    opened by gmarull 0
  • app, drivers: migrate includes to <zephyr/...>

    app, drivers: migrate includes to

    Zephyr includes are now prefixed with <zephyr/...>. While the old path can still be used when CONFIG_LEGACY_INCLUDE_PATH=y, it's better to be prepared for the future.

    opened by gmarull 0
  • workflow: add /opt/toolchains to CMAKE_PREFIX_PATH in environment.

    workflow: add /opt/toolchains to CMAKE_PREFIX_PATH in environment.

    Fixes: #39270

    The latest zephyrprojectrtos/ci no longer sets ZEPHYR_SDK_INSTALL_DIR in the environment and doesn't register the Zephyr-SDK as a CMake package in the CMake package registry.

    To ensure the the Zephyr SDK can be correctly discovered by find_package(Zephyr-sdk) we add /opt/toolchains to the CMAKE_PREFIX_PATH environment variable which is a list containing additional search prefixes for the find_package() function.

    Signed-off-by: Torsten Rasmussen [email protected]

    bug 
    opened by tejlmand 0
  • manifest: pin to Zephyr v2.6.0

    manifest: pin to Zephyr v2.6.0

    Pin to Zephyr v2.6.0 for the v2.6.0 release of the example-application. The current v2.6.0 tag should be deleted and re-created pointing to this commit once merged. Manifest has to be updated to point to main afterwards.

    opened by gmarull 0
  • modules: Set module name

    modules: Set module name

    Follow the Zephyr recommendation to explicitly set the module name in module.yml. Add a build check in the module-level CMakeLists.txt to verify the value of the build variable ${module_name} is the expected value so that other modules may reference this one without needing to know the path to this module.

    Verified by:

    1. Successfully building west build -p always -b custom_plank example-application/app with the name check and the defaulted name.
    2. Unsuccessfully buildng west build -p always -b custom_plank example-application/app with the name check and an unexpected name set in module.yml
    3. Unsuccessfully buildng west build -p always -b custom_plank example-application/app with the name check and the expected name set in module.yml

    Fix #50866

    Signed-off-by: Gregory SHUE [email protected]

    enhancement 
    opened by gregshue 3
Releases(v3.2.0)
Owner
Zephyr Project
Zephyr Project
A sketch that not only parses NMEA sentences, but also allows sending UBX commands and decrypt answers from the ublox module

RAK4631-ublox-Commander This is a tokenizer and parser for raw NMEA sentences. This is not intended (yet anyway) for production, but as an exercice in

Kongduino 2 May 29, 2022
An USB Rubberducky example for ESP32-S2 module with SD Card 🦆

ESP32-S2 WUD-Ducky This project is an attempt to add USB HID to the default example provided with @AprilBrother's WUD (*), however it also supports an

tobozo 64 Dec 25, 2022
Library of useful C++ snippets and reusable classes I've created as I build out Arduino Uno and ESP32 projects.

Arduino Snippets Library of useful C++ snippets and reusable classes I've created as I build out Arduino Uno and ESP32 projects. Button A simple butto

Max Lynch 7 Feb 5, 2022
A simple take-out delivery system written by C

Take-out delivery system ?? BUPT Course: Introduction to Computing and Foundation of Programming A simple take-out delivery system written in C. ?? In

T_Y_H 2 Oct 3, 2021
I made this programming language at 2 AM out of boredom. This is the repository for its interpreter.

Cy Another programming language How to install the interpreter Install the dependencies (git, g++, make and sudo) For Debian and Ubuntu: sudo apt inst

cypress 3 Jan 23, 2022
A clone of the puzzle game Lights Out for the 68k Macintosh.

MacLO MacLO is a clone of the puzzle game Lights Out for the 68k Macintosh. It is a port of ArduLO for the Arduboy. MacLO is B&W and has been tested o

Jon Thysell 13 Oct 9, 2022
The Rumor is pure, nasty growling bass fuzz pedal, with bold out-front presence, and cutting articulation.

Rumor.lv2 The Rumor is pure, nasty growling bass fuzz pedal, with bold out-front presence, and cutting articulation. Features Nasty FUZZ simulation. D

Hermann 12 Feb 28, 2022
Crafter-C- - This might be a game, let's find out

Crafter Status update: This was a nightmare so I'm not going to finish it, but feel free to use the code This is Crafter, I'm not sure if I'll finish

null 2 Dec 23, 2021
PRINT++ is a simple, open source print library for C++, the main usage of PRINT++ is printing out "log" messages

note that for now, print++ is using std::cout. In future it will be using own print function. Windows version can be unstable That library is in alpha

Ksawery 3 Jan 23, 2022
Electrostatic Discharge (esd) is here to take the pain out of making static websites.

Electrostatic Discharge (esd) is here to take the pain out of making static websites. It's a minimal templating tool for html, css and javascript.

xoorath 12 Nov 27, 2022
`lv_lib_100ask` is a reference for various out of the box schemes based on lvgl library or an enhanced interface for various components of lvgl library.

Introduction lv_lib_100ask is a reference for various out of the box schemes based on lvgl library or an enhanced interface for various components of

100askTeam 34 Dec 15, 2022
Example application for Sparkfun-Himax workshop with CCS811 sensor

What's that smell workshop This repo contains the example applications for the workshop with Sparkfun Qwiic Environmental Combo breakout and Himax WE-

Edge Impulse 5 Apr 16, 2021
This FreeRTOS example builds a simple Timer application for Linux using the ESP-IDF

Supported Targets Linux This FreeRTOS example builds a simple Timer application for Linux using the ESP-IDF. Build Source the IDF environment as usual

null 13 Apr 4, 2022
CQC (Charmed Quark Controller) a commercial grade, full featured, software based automation system. CQC is built on our CIDLib C++ development system, which is also available here on GitHub.

The CQC Automation System What It Is CQC is a commercial quality, software based automation system, suitable for residential or commercial application

Dean Roddey 61 Dec 13, 2022
A C++11 large integer library with effective high performance, simplistic in nature and also clean in the eyes.

BigIntegerCPP BigIntegerCPP is a C++11 port of large integer library used in CryptoLib4Pascal. It allows mostly parsing of numbers as strings in diffe

Telepati 26 Dec 22, 2022
Allows for multiple SwitchBot buttons and curtains to be controlled via MQTT sent to ESP32. ESP32 will send BLE commands to switchbots and return MQTT responses to the broker. Also supports Meter/Temp Sensor

SwitchBot-MQTT-BLE-ESP32 Switchbot local control using ESP32. no switchbot hub used/required. works with any smarthub that supports MQTT https://githu

null 343 Dec 27, 2022
Some hypervisor research notes. There is also a useful exploit template that you can use to verify / falsify any assumptions you may make while auditing code, and for exploit development.

Introduction Over the past few weeks, I've been doing some hypervisor research here and there, with most of my focus being on PCI device emulation cod

Faith 130 Nov 18, 2022
A continuation of FSund's pteron-keyboard project. Feel free to contribute, or use these files to make your own! Kits and PCBs are also available through my facebook page.

pteron-pcb Intro This project is the evolution of the Pteron-Keyboard project, an incredible ergonomic keyboard that was handwired only. I aimed to in

null 17 Oct 11, 2022
A self made HWID Spoofer for Fortnite and Valorant. May also work in Warzone, Apex etc.

HWID-Spoofer A HWID-Spoofer made by me. Tested for Fortnite and Valorant. Really undetected in the moment How to use the Valorant Internal [+] - Downl

gupr0x4 14 Dec 26, 2022