Commit graph

68 commits

Author SHA1 Message Date
Fabio Baltieri b13052c497 tests: drop CONFIG_ZTEST_NEW_API
This is now gone from upstream and not needed anymore.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-10-23 14:20:53 +01:00
Fabio Baltieri e5d17032e9 west: Point back to main after release
After releasing v3.5.0, move back to main.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-10-23 14:20:53 +01:00
Fabio Baltieri 8a8d5fca68 west: Pin the Zephyr release to v3.5.0
Align with Zephyr relase v3.5.0.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-10-23 14:20:53 +01:00
Ivan Vnučec dfae1a4e30 Documentation: Add Twister Integration tests instructions
Added Twister Integration tests instructions to the README.md file.

Signed-off-by: Ivan Vnucec <vnucec.ivan@gmail.com>
2023-08-23 10:02:11 +01:00
Fabio Baltieri 2143dd9c0b 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 <fabiobaltieri@google.com>
2023-08-14 18:58:07 +00:00
Jamie McCrae 2c85d9224f 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 <jamie.mccrae@nordicsemi.no>
2023-05-23 13:39:41 +02:00
Gerard Marull-Paretas be3bfb0ec3 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 <gerard@teslabs.com>
2023-05-08 16:34:12 +02:00
Gerard Marull-Paretas 27bc3ea258 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 <gerard.marull@nordicsemi.no>
2023-05-04 23:13:19 +09:00
Gerard Marull-Paretas aff3056ed5 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 <gerard.marull@nordicsemi.no>
2023-05-04 23:13:19 +09:00
Gerard Marull-Paretas 91d86cd76d 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 <gerard.marull@nordicsemi.no>
2023-05-04 23:13:19 +09:00
Gerard Marull-Paretas df81ca548b boards: custom_plank: add missing CONFIG_PINCTRL=y
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-05-04 23:13:19 +09:00
Gerard Marull-Paretas 563db50f57 ci: do not archive firmware
It's not useful, just wastes time/space for nothing.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-05-04 23:13:19 +09:00
Gerard Marull-Paretas 1c06a7f6c9 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 <gerard.marull@nordicsemi.no>
2023-05-04 23:13:19 +09:00
Gerard Marull-Paretas afa924418c manifest: only clone required modules
Optimize setup/CI time by cloning only what is necessary.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-05-04 23:13:19 +09:00
Gerard Marull-Paretas 5939755cbb ci: simplify twister args
s/G/--integration (more clear)
s/--testsuite-root/-T (shorter, still clear)

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-05-03 19:06:23 +09:00
Gerard Marull-Paretas f4baa37159 ci: use west twister
Invoke Twister using west.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-05-03 19:06:23 +09:00
Gerard Marull-Paretas 0a7afcb0dc ci: remove redundant --board-root
Twister automatically adds module board root folders now.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-05-03 19:06:23 +09:00
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