Commit graph

33 commits

Author SHA1 Message Date
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
Carles Cufí 36602d0c70
Initial commit 2021-01-12 14:16:14 +01:00