Commit graph

51 commits

Author SHA1 Message Date
Gerard Marull-Paretas c85e01e998 gitignore: add twister folders
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-05-03 19:06:23 +09:00
Gerard Marull-Paretas 1941a63998 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 <gerard.marull@nordicsemi.no>
2023-04-24 11:39:18 +00:00
Carles Cufi 51532b3016 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 <carles.cufi@nordicsemi.no>
2023-04-14 12:26:15 +02:00
Gerard Marull-Paretas 1a440a2182 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 <gerard.marull@nordicsemi.no>
2023-04-14 11:25:03 +02:00
Gerard Marull-Paretas 03849926ae 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 <gerard.marull@nordicsemi.no>
2023-04-14 11:25:03 +02:00
Stephanos Ioannidis 8a124d1ce9 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 <root@stephanos.io>
2023-02-19 20:34:48 +09:00
Stephanos Ioannidis d7e0616adb 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 <root@stephanos.io>
2023-02-19 20:34:48 +09:00
Marti Bolivar 7991d32487 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 <marti.bolivar@nordicsemi.no>
2023-01-07 16:25:02 -08:00
Pekka Niskanen acf2df5f64 doc: cleaning up the readme.md
Cleaning up the language and formatting in the
README.md document file.

Signed-off-by: Pekka Niskanen <pekka.niskanen@nordicsemi.no>
2022-12-29 15:51:03 +01:00
Gerard Marull-Paretas 96aff8a4ee 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 <gerard.marull@nordicsemi.no>
2022-11-19 17:41:07 +01:00
Gerard Marull-Paretas b79f9e35d1 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 <gerard.marull@nordicsemi.no>
2022-11-19 17:41:07 +01:00
Gerard Marull-Paretas f796cf4752 tests: lib: custom_lib: require CMake 3.20
Zephyr now requires CMake >= 3.20.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-11-19 17:41:07 +01:00
Carles Cufi 0bfce607ad lib: Fix running twister
Use integration_platforms and invoke twister properly.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-11-19 16:16:52 +01:00
Carles Cufi ede90a457c tests: custom_lib: port to the new ztest API
Align with the latest upstream API.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-11-19 16:16:52 +01:00
Carles Cufi c7a42920d8 tests: custom_lib: Fix include paths
Align to the new standard that prefixes zephyr/.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-11-19 16:16:52 +01:00
Carles Cufi 0fa90bc0e7 lib: Remove trailing whitespace
We need a compliance check.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-11-19 16:16:52 +01:00
Carles Cufi 605c65039f 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 <carles.cufi@nordicsemi.no>
2022-11-19 16:16:52 +01:00
Gerard Marull-Paretas 8b3555951d boards: custom_plank: migrate to pinctrl
The board still used deprecated nRF *-pin properties,
migrate it to pinctrl.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-11-19 16:08:49 +01:00
Gregory Shue 62957ec09f 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 <gregory.shue@legrand.us>
2022-11-17 15:09:34 +01:00
Gregory Shue 5a66095fa6 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 <gregory.shue@legrand.us>
2022-11-17 15:09:34 +01:00
Fabio Baltieri a061012215 west: Point back to main after release
After releasing v3.2.0, move back to main.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-09-30 12:20:03 -05:00
Fabio Baltieri 163fe47e75 west: Pin the Zephyr release to v3.2.0
Align with Zephyr relase v3.2.0.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-09-30 12:20:03 -05:00
Martí Bolívar 41767afebe 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 <marti.bolivar@nordicsemi.no>
2022-08-31 17:26:45 +02:00
Gerard Marull-Paretas 2f6038d799 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 <gerard@teslabs.com>
2022-08-25 23:55:10 -07:00
Gerard Marull-Paretas 29fbd1ede8 devicetree: remove usage of deprecated label property
Devicetree label property has been deprecated, so remove its usage.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2022-08-25 23:55:10 -07:00
Gerard Marull-Paretas f234a7ab3d 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 <gerard@teslabs.com>
2022-08-02 15:28:49 +02:00
Gerard Marull-Paretas 57a7702f1b 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 <gerard@teslabs.com>
2022-08-02 15:28:49 +02:00
Carles Cufi 4c9aef9d6e 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 <carles.cufi@nordicsemi.no>
2022-07-14 18:50:04 +02:00
Gerard Marull-Paretas ed8b4f4875 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.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2022-07-07 12:41:29 +02:00
Carles Cufi d9831e96f0 west: Point back to main after release
After releasing v3.1.0, move back to main.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-06-05 14:40:58 +02:00
Carles Cufi a7d1b1936f west: Pin the Zephyr release to v3.1.0
Align with Zephyr relase v3.1.0.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-06-05 14:30:04 +02:00
Gerard Marull-Paretas 11585b1765 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 <gerard@teslabs.com>
2022-05-11 12:04:50 +02:00
Gerard Marull-Paretas af7ec8a8ef 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 <gerard@teslabs.com>
2022-05-11 12:04:50 +02:00
Christopher Friedt dfc6b88d25 manifest: Switch back to main after release
Switch back to pointing to main after the v2.7.0 release.

Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
2021-10-25 12:07:41 -04:00
Christopher Friedt 35088bdf9e 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 <chrisfriedt@gmail.com>
2021-10-25 12:07:41 -04:00
Torsten Rasmussen 325bd84244 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 <Torsten.Rasmussen@nordicsemi.no>
2021-10-11 10:19:07 +02:00
Gerard Marull-Paretas e50d42c801 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 <gerard.marull@nordicsemi.no>
2021-07-29 12:36:13 +02:00
Gerard Marull-Paretas bf4392f1a1 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 <gerard.marull@nordicsemi.no>
2021-07-29 12:36:13 +02:00
Carles Cufi 4520f6a75e manifest: Switch back to main after release
Switch back to pointing to main after the v2.6.0 release.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2021-06-16 10:23:15 +02:00
Gerard Marull-Paretas 3743a1f974 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 <gerard.marull@nordicsemi.no>
2021-06-15 19:33:25 +02:00
Gerard Marull-Paretas 3bc738b51b readme: add versioning scheme information
Mention that example-application follow Zephyr version scheme.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-06-04 20:06:02 +02:00
Kumar Gala 301b6e0423 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 <kumar.gala@linaro.org>
2021-06-02 09:35:47 -05:00
Gerard Marull-Paretas af6b7128e5 manifest: use Zephyr main branch
Zephyr now uses main instead of master.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-20 17:38:06 +02:00
Gerard Marull-Paretas a8d668cb63 ci: run on pull_request
Run CI on push and pull_request.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-18 11:19:56 -04:00
Gerard Marull-Paretas 7835600c1e 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 <gerard.marull@nordicsemi.no>
2021-05-18 11:19:56 -04:00
Gerard Marull-Paretas 8ef9554f7e readme: remove doc from list of features
Documentation is not (yet) provided.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-18 11:19:56 -04:00
Gerard Marull-Paretas 992b90172b readme: add more details on board usage
Inform about the possibility of using Zephyr sample boards.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-07 10:04:22 -04:00
Gerard Marull-Paretas a5e84e0b98 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 <gerard.marull@nordicsemi.no>
2021-05-07 10:04:22 -04:00
Gerard Marull-Paretas 8689c36036 ci: initial CI example
CI example using Github Actions

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-07 10:04:22 -04:00
Gerard Marull-Paretas d1c935e55c app: initial application skeleton
initial application skeleton demonstrating:

- custom boards
- custom DT bindings
- Out-of-tree drivers

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-07 10:04:22 -04:00