Skip to content

Commit 9f9486c

Browse files
svyat-innowisecarlescufigmarullgalaktejlmand
authored
Setup2 (#1)
* Initial commit * app: initial application skeleton initial application skeleton demonstrating: - custom boards - custom DT bindings - Out-of-tree drivers Signed-off-by: Gerard Marull-Paretas <[email protected]> * ci: initial CI example CI example using Github Actions Signed-off-by: Gerard Marull-Paretas <[email protected]> * app: provide in-tree board overlay Provide an overlay to shows how to run the example-application on boards that are part of the Zephyr tree. Sometimes initial development is performed on dev-kits, so it can be useful. A different vendor than the one used for the custom board (Nordic) has been chosen to show application portability. Signed-off-by: Gerard Marull-Paretas <[email protected]> * readme: add more details on board usage Inform about the possibility of using Zephyr sample boards. Signed-off-by: Gerard Marull-Paretas <[email protected]> * readme: remove doc from list of features Documentation is not (yet) provided. Signed-off-by: Gerard Marull-Paretas <[email protected]> * drivers: sensor: examplesensor: use GPIO_DT_SPEC_INST_GET Instance version of the GPIO_DT_SPEC_GET was recently introduced. Signed-off-by: Gerard Marull-Paretas <[email protected]> * ci: run on pull_request Run CI on push and pull_request. Signed-off-by: Gerard Marull-Paretas <[email protected]> * manifest: use Zephyr main branch Zephyr now uses main instead of master. Signed-off-by: Gerard Marull-Paretas <[email protected]> * ci: Remove cache CI is failing and it seems related to cache. Remove for now to get CI passing again. Signed-off-by: Kumar Gala <[email protected]> * readme: add versioning scheme information Mention that example-application follow Zephyr version scheme. Signed-off-by: Gerard Marull-Paretas <[email protected]> * manifest: pin to Zephyr v2.6.0 Pin to Zephyr v2.6.0 for the v2.6.0 release of the example-application. Signed-off-by: Gerard Marull-Paretas <[email protected]> * manifest: Switch back to main after release Switch back to pointing to main after the v2.6.0 release. Signed-off-by: Carles Cufi <[email protected]> * 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. Signed-off-by: Gerard Marull-Paretas <[email protected]> * 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. Signed-off-by: Gerard Marull-Paretas <[email protected]> * 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]> * manifest: pin to Zephyr v2.7.0 Pin to Zephyr v2.7.0 for the v2.7.0 release of the example-application. Signed-off-by: Christopher Friedt <[email protected]> * manifest: Switch back to main after release Switch back to pointing to main after the v2.7.0 release. Signed-off-by: Christopher Friedt <[email protected]> * app: use <kernel.h> include <zephyr.h> is a proxy to <kernel.h> in practice, so let's use <kernel.h> instead. Signed-off-by: Gerard Marull-Paretas <[email protected]> * app, drivers: migrate includes to <zephyr/...> 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. Signed-off-by: Gerard Marull-Paretas <[email protected]> * west: Pin the Zephyr release to v3.1.0 Align with Zephyr relase v3.1.0. Signed-off-by: Carles Cufi <[email protected]> * west: Point back to main after release After releasing v3.1.0, move back to main. Signed-off-by: Carles Cufi <[email protected]> * 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: zephyrproject-rtos/zephyr#40669 Let's update README. Signed-off-by: Gerard Marull-Paretas <[email protected]> * 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]> * drivers: sensor: examplesensor: use DT_HAS_* helper Make zephyr,examplesensor driver option dependent on it being defined in Kconfig and set its default based on DT status as well. Signed-off-by: Gerard Marull-Paretas <[email protected]> * app: remove redundant CONFIG_EXAMPLESENSOR in prj.conf The option is no longer needed, zephyr,examplesensor driver will automatically be selected based on DT (and because we enable all of its dependencies, including CONFIG_SENSOR). Signed-off-by: Gerard Marull-Paretas <[email protected]> * devicetree: remove usage of deprecated label property Devicetree label property has been deprecated, so remove its usage. Signed-off-by: Gerard Marull-Paretas <[email protected]> * drivers: sensor: examplesensor: use select in Kconfig With the recent changes in how Kconfig options are enabled using DT helpers, using select leads to a better/more scalable pattern. Each driver Kconfig option is expected to select its dependencies now. Signed-off-by: Gerard Marull-Paretas <[email protected]> * 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]> * west: Pin the Zephyr release to v3.2.0 Align with Zephyr relase v3.2.0. Signed-off-by: Fabio Baltieri <[email protected]> * west: Point back to main after release After releasing v3.2.0, move back to main. Signed-off-by: Fabio Baltieri <[email protected]> * lib: create empty lib subsystem Create lib subsystem with empty Kconfig menu, subsystem build file. Updated top-level build and documentation to include subsystem. This was created to provide an example of how the `lib/` directory can be connected to the Zephyr build system through `module.yml`, and so that CI can verify that the extension settings used here work with these sub-trees. . The approach follows the pattern of paralleling the Zephyr tree. An empty subsystem was implemented rather than a non-empty one in order to isolate the core changes from any specific library. This provides a clean reference for users. . It was assumed that some users will want to strip out the `lib/` subsystem separate from existing subsystems, and vice versa. . This was verified by: - visually verifying a clean build of: `west build -b custom_plank -p always example-application/app/` - visually verifying the subsystem appeared in the correct location in a clean build of: `west build -b custom_plank -p always example-application/app/` Signed-off-by: Gregory Shue <[email protected]> * lib: add custom_lib Enhance the example-application repository with a configurable, trivial library example and associated test cases. . This implementation appears to make no assumptions. . This implementation was verified by running the following commands in an example-application workspace and verifying all tests passed. 1. `west build -b native_posix -p always example-application/tests/lib/custom_lib/` 2. `./build/zephyr/zephyr.exe` 3. `west build -b native_posix -p always example-application/tests/lib/custom_lib/ -- -DCONFIG_CUSTOM_LIB_GET_VALUE_DEFAULT=6` 4. `./build/zephyr/zephyr.exe` 5. `zephyr/scripts/twister -T example-application/tests/ \ -p qemu_cortex_m0` 6. `cd zephyr/doc && make clean && make` built cleanly. . Note that `twister` does not follow the `zephyr/module.yml:tests` setting to discover tests in modules, so the testcase-root must be explicitly provided. Fixes #35177 Signed-off-by: Gregory Shue <[email protected]> * boards: custom_plank: migrate to pinctrl The board still used deprecated nRF *-pin properties, migrate it to pinctrl. Signed-off-by: Gerard Marull-Paretas <[email protected]> * workflows: build: Do not install west and requirements This is not necessary since it's running in the zephyr docker image, that already contains them. Signed-off-by: Carles Cufi <[email protected]> * lib: Remove trailing whitespace We need a compliance check. Signed-off-by: Carles Cufi <[email protected]> * tests: custom_lib: Fix include paths Align to the new standard that prefixes zephyr/. Signed-off-by: Carles Cufi <[email protected]> * tests: custom_lib: port to the new ztest API Align with the latest upstream API. Signed-off-by: Carles Cufi <[email protected]> * lib: Fix running twister Use integration_platforms and invoke twister properly. Signed-off-by: Carles Cufi <[email protected]> * tests: lib: custom_lib: require CMake 3.20 Zephyr now requires CMake >= 3.20. Signed-off-by: Gerard Marull-Paretas <[email protected]> * tests: lib: custom_lib: use YAML empty dictionary syntax There is no need to use dummy properties when an empty dictionary can be used. Signed-off-by: Gerard Marull-Paretas <[email protected]> * tests: lib: custom_lib: fix includes Test was including Kernel for nothing, and missed limits.h (likely included by Kernel) Signed-off-by: Gerard Marull-Paretas <[email protected]> * doc: cleaning up the readme.md Cleaning up the language and formatting in the README.md document file. Signed-off-by: Pekka Niskanen <[email protected]> * west.yml: remove 'self: path:' This makes it easier to rename this repository and use it under its new name. For example, with this patch, if you push the repository to GitHub user 'foo' as repository 'bar', you can do: west init -m https://github.com/foo/bar my-workspace And you will get: - my-workspace/.west/config says manifest.path is 'bar' - my-workspace/bar exists as a git repository By contrast, with the current 'self: path:' setting, you will instead get: - my-workspace/.west/config says manifest.path is 'example-application' - my-workspace/example-application exists as a git repository Let's let people name this repository whatever they want, and get the expected results, instead of forcing the name example-application Signed-off-by: Marti Bolivar <[email protected]> * west: Pin the Zephyr release to v3.3.0 This commit pins the example-application to the Zephyr release v3.3.0. Signed-off-by: Stephanos Ioannidis <[email protected]> * west: Point back to main after 3.3.0 release This commit updates the example-application to point back to the Zephyr main branch after the Zephyr v3.3.0 release. Signed-off-by: Stephanos Ioannidis <[email protected]> * app: adjust main definition Zephyr now requires `int main(void)`. Main must return 0, all other values are reserved. Signed-off-by: Gerard Marull-Paretas <[email protected]> * ci: schedule a daily build Schedule a daily build, so that we can quickly spot regressions in the application due to changes in Zephyr. Signed-off-by: Gerard Marull-Paretas <[email protected]> * readme: Mention Zephyr modules This repo also demonstrates Zephyr modules, since it's a module itself. Add a link to the list of features. Signed-off-by: Carles Cufi <[email protected]> * ci: build: update checkout/upload-artifact actions These actions are triggering warnings about usage of deprecated features (e.g. NodeJS 12). Use latest version of the actions. Signed-off-by: Gerard Marull-Paretas <[email protected]> * gitignore: add twister folders Signed-off-by: Gerard Marull-Paretas <[email protected]> * ci: remove redundant --board-root Twister automatically adds module board root folders now. Signed-off-by: Gerard Marull-Paretas <[email protected]> * ci: use west twister Invoke Twister using west. Signed-off-by: Gerard Marull-Paretas <[email protected]> * ci: simplify twister args s/G/--integration (more clear) s/--testsuite-root/-T (shorter, still clear) Signed-off-by: Gerard Marull-Paretas <[email protected]> * manifest: only clone required modules Optimize setup/CI time by cloning only what is necessary. Signed-off-by: Gerard Marull-Paretas <[email protected]> * ci: pin runner and container versions Make sure we can safely go back in time by pinning runner and container versions. Signed-off-by: Gerard Marull-Paretas <[email protected]> * ci: do not archive firmware It's not useful, just wastes time/space for nothing. Signed-off-by: Gerard Marull-Paretas <[email protected]> * boards: custom_plank: add missing CONFIG_PINCTRL=y Signed-off-by: Gerard Marull-Paretas <[email protected]> * app: remove rtt config RTT is something proprietary, not all boards/programmers have. Let's make the application simpler. Signed-off-by: Gerard Marull-Paretas <[email protected]> * app: add sample.yaml Add a sample.yaml so that we can use twister to compile the application in CI. Signed-off-by: Gerard Marull-Paretas <[email protected]> * ci: build application using twister Twister is more useful in a CI context because we can easily test multiple combinations of the firmware using a single command. Signed-off-by: Gerard Marull-Paretas <[email protected]> * app: use extra_overlay_confs Using OVERLAY_CONFIG in extra_args is deprecated in favor of extra_overlay_confs. Signed-off-by: Gerard Marull-Paretas <[email protected]> * version: Replace bespoke application version with new version system Uses Zephyr's new version infrastruction system for configuring the version of the application and displaying it. Signed-off-by: Jamie McCrae <[email protected]> * ci: use shallow fetch and no tags Add a couple flags to west update to do shallow fetch for both the main repo and modules, and don't fetch any tags. Should speed things up a bit by only fetching the target version code for all modules. Signed-off-by: Fabio Baltieri <[email protected]> * Documentation: Add Twister Integration tests instructions Added Twister Integration tests instructions to the README.md file. Signed-off-by: Ivan Vnucec <[email protected]> * west: Pin the Zephyr release to v3.5.0 Align with Zephyr relase v3.5.0. Signed-off-by: Fabio Baltieri <[email protected]> * west: Point back to main after release After releasing v3.5.0, move back to main. Signed-off-by: Fabio Baltieri <[email protected]> * tests: drop CONFIG_ZTEST_NEW_API This is now gone from upstream and not needed anymore. Signed-off-by: Fabio Baltieri <[email protected]> * boards: custom_plank: use gpio-as-nreset instead of CONFIG_GPIO_AS_PINRESET CONFIG_GPIO_AS_PINRESET is deprecated, replace it with the new device tree property. Signed-off-by: Fabio Baltieri <[email protected]> * boards: custom_plank: enable gpiote The gpiote node has to be enabled for the board to build since the latest upstream nrfx hal update. Signed-off-by: Fabio Baltieri <[email protected]> * ci: use the zephyr-setup action Use the standard generic GitHub images for the run and the zephyr-setup action, run the build on both Linux, macOS and Windows. Signed-off-by: Fabio Baltieri <[email protected]> * ci: align the runner list with the main repository Use the same runner list as the main repository ones. Originally I meant to just add macos-14 so we cover macOS ARM, which is nice because it runs on qemu-m0 from the brew package, but at this point let's also use explicit version for the other runners too. Signed-off-by: Fabio Baltieri <[email protected]> * west: Pin the Zephyr revision to v3.6.0 Pins the Zephyr revision to the latest release, v3.6.0. Signed-off-by: Maureen Helm <[email protected]> * west: Point Zephyr back to main after v3.6.0 release Points the Zephyr revision back to the main branch after the latest release, v3.6.0. Signed-off-by: Maureen Helm <[email protected]> * boards: custom_plank: port to HWMv2 Port the custom_plank example out-of-tree board to HWMv2. Signed-off-by: Gerard Marull-Paretas <[email protected]> * readme: Added missing directory change in build instructions The current build instructions omit a necessary directory change after creating the workspace. Signed-off-by: Andy Sinclair <[email protected]> * include: namespace includes with app/ prefix All example-application level includes will have the 'app' prefix, making ownership obvious and reducing the chances of namespacing clashes. This aligns with how Zephyr works with the 'zephyr' prefix. Signed-off-by: Gerard Marull-Paretas <[email protected]> * lib: custom: simplify naming scheme Improve the naming scheme of the custom library. Signed-off-by: Gerard Marull-Paretas <[email protected]> * boards: custom_plank: tweak defconfig with UART console To improve the default user experience. However, explain this may not be the best choice on production boards. Signed-off-by: Gerard Marull-Paretas <[email protected]> * drivers: sensor: s/examplesensor/example-|_sensor/ Just a rename so things look a bit nicer. Signed-off-by: Gerard Marull-Paretas <[email protected]> * drivers: blink: add custom out-of-tree driver class Add a new out-of-tree custom driver class to demonstrate all aspects of custom driver class creation. Signed-off-by: Gerard Marull-Paretas <[email protected]> * drivers: blink: blink-gpio-led: add initial implementation Add a blink driver implementation for a GPIO-controlled LED. Signed-off-by: Gerard Marull-Paretas <[email protected]> * boards: custom_plank: instantiate blink-gpio-led Define an instance of a blink-gpio-led. Since custom_plank is in reality a nRF52840DK, this uses LED0 as the blink-gpio-led. Signed-off-by: Gerard Marull-Paretas <[email protected]> * app: boards: nucleo_f302r8: instantiate blink-gpio-led Instantiate blink-gpio-led (uses board Green LED). Signed-off-by: Gerard Marull-Paretas <[email protected]> * app: update application to use the custom blink API Update the application to use the new custom blink API. It changes the blink period if the sensor reports a proximity value that is 1. Signed-off-by: Gerard Marull-Paretas <[email protected]> * doc: add Doxygen configuration Add a simple Doxygen configuration that allows to build documentation for the application APIs found under include/. Signed-off-by: Gerard Marull-Paretas <[email protected]> * doc: add minimal Sphinx setup Add a minimal Sphinx-based setup, also configuring intersphinx for Zephyr. Signed-off-by: Gerard Marull-Paretas <[email protected]> * ci: add workflow to build and publish docs Add a workflow that, for now, builds Doxygen docs and published them on Github pages. Signed-off-by: Gerard Marull-Paretas <[email protected]> * readme: add documentation details Inform the users on how to quickly build the documentation. Signed-off-by: Gerard Marull-Paretas <[email protected]> * cmake: use zephyr_syscall_include_directories Instead of appending to SYSCALL_INCLUDE_DIRS. Signed-off-by: Gerard Marull-Paretas <[email protected]> * readme: swap doxygen/sphinx badges Prefer Sphinx as the first entry. Signed-off-by: Gerard Marull-Paretas <[email protected]> * doc: add breathe and import existing Doxygen groups In Zephyr, most APIs in Doxygen are also imported in Sphinx using the breathe exstension. While breathe is de-facto unmaintained, this comes handy to have an integrated documentation experience. User is warned to check the maintainership status of breathe, because Doxygen in standalone mode (also offered) may be enough. Signed-off-by: Gerard Marull-Paretas <[email protected]> * doc: move Zephyr references to standalone page So that home page is de-cluttered. Signed-off-by: Gerard Marull-Paretas <[email protected]> * doc: remove sphinx-quickstart redundant comments These are not useful. Signed-off-by: Gerard Marull-Paretas <[email protected]> * ci: deploy Sphinx content to the root folder Prefer Sphinx content as the landing page, specially now that it contains API docs as well. Signed-off-by: Gerard Marull-Paretas <[email protected]> * doc: Typo fix Typo fix in ReadMe file Signed-off-by: UMA PRASEEDA <[email protected]> * boards: custom_plank: remove redundant PINCTRL defconfig Drivers using pinctrl already select this option. Signed-off-by: Gerard Marull-Paretas <[email protected]> * ci: build: use the latest x86 macos image available Upgrade the macos-12 image to macos-13, this is apparently the last x86 osx image that will ever be available on github. Signed-off-by: Fabio Baltieri <[email protected]> * ci: use actions/checkout@v4 and actions/setup-python@v5 Use actions/checkout@v4 and actions/setup-python@v5 when checking out and setting up the example-application repository in CI. The new versions uses Node20 instead of the deprecated Node16. Signed-off-by: Henrik Brix Andersen <[email protected]> * README: add CI shields Add shields for indicating latest example-application CI status. Signed-off-by: Henrik Brix Andersen <[email protected]> * west: Pin the Zephyr revision to v3.7.0 Pins the Zephyr revision to the latest release, v3.7.0 Signed-off-by: Alberto Escolar Piedras <[email protected]> * west: Point back to main after release After releasing v3.7.0, move back to main Signed-off-by: Alberto Escolar Piedras <[email protected]> * doc: remove breathe Breathe is no longer used in Zephyr, mainly to its poor performance and lack of proper maintainership. Therefore, do not recommend it in our template application. Previous external C references do not work either, so let's remove them. We may polish doxybridge/runner in the future and make it a published extension on PyPI so that 3rd party repos like applications can use it. Signed-off-by: Gerard Marull-Paretas <[email protected]> * boards: custom_plank: use DT to enable DCDC custom_plank is a sample custom board template usable on nRF52840DK. The DCDC module on the nRF52840 SoC is now enabled using DT, the Kconfig options are deprecated, so let's keep up to date. Signed-off-by: Gerard Marull-Paretas <[email protected]> * boards: custom_plank: suppress some DT warnings Nordic boards have some overlapping DT addresses, silent dtc as this is a known issue. Signed-off-by: Gerard Marull-Paretas <[email protected]> * doc: Remove deprecated usage Starting with Zephyr 3.4, EXTRA_CONF_FILE replaces OVERLAY_CONFIG. Signed-off-by: Reto Schneider <[email protected]> * drivers: sensor: Use DEVICE_API Demonstrate DEVICE_API usage for sensor_driver_api. Signed-off-by: Pieter De Gendt <[email protected]> * drivers: blink: Use DEVICE_API Demonstrate DEVICE_API usage for blink_driver_api. Signed-off-by: Pieter De Gendt <[email protected]> * boards: custom_plank: Add demo out-of-tree runner Demonstrate how to use an out-of-tree runner with the custom_plank board. Signed-off-by: Pieter De Gendt <[email protected]> * readme: add external runner entry Add external runner entry to overview of the features demonstrated. Signed-off-by: Pieter De Gendt <[email protected]> * setup: setup enviroment for esp32c3_supermini Git clone repository for example application of the T2 topology. Configure that repository for the esp32c3_supermini helloworld example. Docker config file was added. test: 0 --------- Signed-off-by: Gerard Marull-Paretas <[email protected]> Signed-off-by: Kumar Gala <[email protected]> Signed-off-by: Carles Cufi <[email protected]> Signed-off-by: Torsten Rasmussen <[email protected]> Signed-off-by: Christopher Friedt <[email protected]> Signed-off-by: Gerard Marull-Paretas <[email protected]> Signed-off-by: Martí Bolívar <[email protected]> Signed-off-by: Fabio Baltieri <[email protected]> Signed-off-by: Gregory Shue <[email protected]> Signed-off-by: Pekka Niskanen <[email protected]> Signed-off-by: Marti Bolivar <[email protected]> Signed-off-by: Stephanos Ioannidis <[email protected]> Signed-off-by: Jamie McCrae <[email protected]> Signed-off-by: Ivan Vnucec <[email protected]> Signed-off-by: Maureen Helm <[email protected]> Signed-off-by: Andy Sinclair <[email protected]> Signed-off-by: UMA PRASEEDA <[email protected]> Signed-off-by: Henrik Brix Andersen <[email protected]> Signed-off-by: Alberto Escolar Piedras <[email protected]> Signed-off-by: Reto Schneider <[email protected]> Signed-off-by: Pieter De Gendt <[email protected]> Signed-off-by: Pieter De Gendt <[email protected]> Co-authored-by: Carles Cufí <[email protected]> Co-authored-by: Gerard Marull-Paretas <[email protected]> Co-authored-by: Kumar Gala <[email protected]> Co-authored-by: Torsten Rasmussen <[email protected]> Co-authored-by: Christopher Friedt <[email protected]> Co-authored-by: Gerard Marull-Paretas <[email protected]> Co-authored-by: Martí Bolívar <[email protected]> Co-authored-by: Fabio Baltieri <[email protected]> Co-authored-by: Gregory Shue <[email protected]> Co-authored-by: Pekka Niskanen <[email protected]> Co-authored-by: Stephanos Ioannidis <[email protected]> Co-authored-by: Jamie McCrae <[email protected]> Co-authored-by: Ivan Vnučec <[email protected]> Co-authored-by: Maureen Helm <[email protected]> Co-authored-by: Andy Sinclair <[email protected]> Co-authored-by: UMA PRASEEDA <[email protected]> Co-authored-by: Henrik Brix Andersen <[email protected]> Co-authored-by: Alberto Escolar Piedras <[email protected]> Co-authored-by: Reto Schneider <[email protected]> Co-authored-by: Pieter De Gendt <[email protected]> Co-authored-by: Pieter De Gendt <[email protected]> Co-authored-by: svyatinnowise <[email protected]>
1 parent 749b647 commit 9f9486c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+4055
-1
lines changed

.github/workflows/build.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
pull_request:
6+
schedule:
7+
- cron: "0 0 * * *"
8+
9+
jobs:
10+
build:
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
os: [ubuntu-22.04, macos-13, macos-14, windows-2022]
15+
runs-on: ${{ matrix.os }}
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
with:
20+
path: example-application
21+
22+
- name: Set up Python
23+
uses: actions/setup-python@v5
24+
with:
25+
python-version: 3.11
26+
27+
- name: Setup Zephyr project
28+
uses: zephyrproject-rtos/action-zephyr-setup@v1
29+
with:
30+
app-path: example-application
31+
toolchains: arm-zephyr-eabi
32+
33+
- name: Build firmware
34+
working-directory: example-application
35+
shell: bash
36+
run: |
37+
if [ "${{ runner.os }}" = "Windows" ]; then
38+
EXTRA_TWISTER_FLAGS="--short-build-path -O/tmp/twister-out"
39+
fi
40+
west twister -T app -v --inline-logs --integration $EXTRA_TWISTER_FLAGS
41+
42+
- name: Twister Tests
43+
working-directory: example-application
44+
shell: bash
45+
run: |
46+
if [ "${{ runner.os }}" = "Windows" ]; then
47+
EXTRA_TWISTER_FLAGS="--short-build-path -O/tmp/twister-out"
48+
fi
49+
west twister -T tests -v --inline-logs --integration $EXTRA_TWISTER_FLAGS

.github/workflows/docs.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Copyright (c) 2024, Nordic Semiconductor ASA
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
name: Documentation
5+
6+
on: [push, pull_request]
7+
8+
env:
9+
DOXYGEN_VERSION: 1.9.6
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-22.04
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- name: Install dependencies
19+
run: |
20+
wget --no-verbose "https://github.com/doxygen/doxygen/releases/download/Release_${DOXYGEN_VERSION//./_}/doxygen-${DOXYGEN_VERSION}.linux.bin.tar.gz"
21+
tar xf doxygen-${DOXYGEN_VERSION}.linux.bin.tar.gz
22+
echo "${PWD}/doxygen-${DOXYGEN_VERSION}/bin" >> $GITHUB_PATH
23+
pip install -r doc/requirements.txt
24+
25+
- name: Build
26+
run: |
27+
cd doc
28+
doxygen
29+
30+
SPHINXOPTS="-W" make html
31+
32+
mkdir deploy
33+
mv _build_doxygen/html deploy/doxygen
34+
mv _build_sphinx/html/* deploy
35+
36+
- name: Setup pages
37+
if: github.event_name != 'pull_request'
38+
uses: actions/configure-pages@v4
39+
40+
- name: Upload pages artifact
41+
if: github.event_name != 'pull_request'
42+
uses: actions/upload-pages-artifact@v3
43+
with:
44+
path: doc/deploy
45+
46+
- name: Upload artifacts
47+
if: github.event_name == 'pull_request'
48+
uses: actions/upload-artifact@v4
49+
with:
50+
path: doc/deploy
51+
52+
deploy:
53+
runs-on: ubuntu-22.04
54+
needs: build
55+
if: github.event_name != 'pull_request'
56+
permissions:
57+
pages: write
58+
id-token: write
59+
steps:
60+
- name: Deploy to GitHub Pages
61+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# editors
2+
# .vscode
3+
*.swp
4+
*~
5+
6+
# python
7+
.venv
8+
9+
# build
10+
/build*
11+
/twister-out*
12+
13+
__pycache__/
14+
15+
# docs
16+
/doc/_build*

CMakeLists.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Copyright (c) 2021 Nordic Semiconductor ASA
2+
# SPDX-License-Identifier: Apache-2.0
3+
#
4+
# This CMake file is picked by the Zephyr build system because it is defined
5+
# as the module CMake entry point (see zephyr/module.yml).
6+
7+
8+
# This is needed so that custom driver classes using system calls are taken into
9+
# account
10+
zephyr_syscall_include_directories(include)
11+
12+
zephyr_include_directories(include)
13+
14+
#add_subdirectory(drivers)
15+
add_subdirectory(lib)

Dockerfile

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
FROM ubuntu:22.04
2+
3+
ENV DEBIAN_FRONTEND=noninteractive
4+
5+
# Install necessary packages
6+
RUN apt-get update \
7+
&& apt install -y wget bzip2 make unzip cppcheck
8+
9+
RUN apt install -y git cmake ninja-build gperf \
10+
ccache dfu-util device-tree-compiler \
11+
python3-dev python3-pip python3-setuptools python3-tk python3-wheel xz-utils file \
12+
gcc gcc-multilib g++-multilib libsdl2-dev libmagic1 python3-venv
13+
14+
# Create a non-root user named "ubuntu"
15+
# But put in root group since GitHub actions needs permissions
16+
# to create tmp files.
17+
RUN useradd -rm -d /home/ubuntu -s /bin/bash -g root -G sudo \
18+
-u 1001 ubuntu
19+
20+
RUN mkdir /home/ubuntu/workspace \
21+
&& cd /home/ubuntu/workspace \
22+
&& mkdir temp_manifest_dir \
23+
&& python3 -m venv ./.venv \
24+
&& . ./.venv/bin/activate \
25+
&& pip install west \
26+
&& echo ". /home/ubuntu/workspace/.venv/bin/activate" >> /home/ubuntu/workspace/.bashrc
27+
28+
# Install Zephyr RTOS SDK
29+
RUN cd ~ \
30+
&& wget https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v0.17.0/zephyr-sdk-0.17.0_linux-x86_64.tar.xz \
31+
&& wget -O - https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v0.17.0/sha256.sum | shasum --check --ignore-missing \
32+
&& tar xvf zephyr-sdk-0.17.0_linux-x86_64.tar.xz \
33+
&& cd zephyr-sdk-0.17.0
34+
35+
RUN cd ~/zephyr-sdk-0.17.0 \
36+
&& yes | ./setup.sh
37+
38+
# Copy manifest file to the temp directory (Manifest file of the CURRENT project)
39+
# With all dependensys
40+
COPY west.yml /home/ubuntu/workspace/temp_manifest_dir/west.yml
41+
42+
RUN cd /home/ubuntu/workspace/ && . ./.venv/bin/activate \
43+
&& cd ./temp_manifest_dir && west init --local \
44+
&& west update
45+
46+
RUN cd /home/ubuntu/workspace && . ./.venv/bin/activate \
47+
&& west zephyr-export \
48+
&& west packages pip --install
49+
50+
RUN cd /home/ubuntu/workspace/ && rm -rf ./temp_manifest_dir || true
51+
52+
USER ubuntu
53+
WORKDIR /home/ubuntu/workspace

Kconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Copyright (c) 2021 Nordic Semiconductor ASA
2+
# SPDX-License-Identifier: Apache-2.0
3+
#
4+
# This Kconfig file is picked by the Zephyr build system because it is defined
5+
# as the module Kconfig entry point (see zephyr/module.yml). You can browse
6+
# module options by going to Zephyr -> Modules in Kconfig.
7+
8+
#rsource "drivers/Kconfig"
9+
rsource "lib/Kconfig"

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
# ztest
1+
<<<<<<< HEAD
2+
### Hello
3+
=======
4+
# ztest
5+
>>>>>>> my_origin/setup
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
3+
board_set_sim_runner_ifnset(example)
4+
board_finalize_runner_args(example) # No default arguments to provide.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Copyright (c) 2021 Nordic Semiconductor ASA
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config BOARD_CUSTOM_PLANK
5+
select SOC_NRF52840_QIAA
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Custom Plank Board
2+
3+
`custom_plank` board is used to demonstrate how to create custom boards. It is
4+
in fact a simplified version of the nRF52840-DK board, so the
5+
`example-application` can be run on that development kit when using
6+
`custom_plank`.

0 commit comments

Comments
 (0)