Skip to content

Commit

Permalink
samples: basic: blinky: Extend upstream sample
Browse files Browse the repository at this point in the history
Add sample that reuses source code from "original" sample that
existing in the upstream Zephyr.

Extend sample with configuration that uses emulated GPIO
instead of "ordinary" GPIO.

Remove Twister alt-config for upstream sample.

Signed-off-by: Sebastian Głąb <[email protected]>
  • Loading branch information
nordic-segl committed Feb 27, 2025
1 parent 7f8f9f9 commit 95144b9
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 9 deletions.
2 changes: 1 addition & 1 deletion CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,7 @@
/samples/CMakeLists.txt @nrfconnect/ncs-co-build-system
/samples/app_event_manager/ @nrfconnect/ncs-si-muffin @nrfconnect/ncs-si-bluebagel
/samples/app_event_manager_profiler_tracer/ @nrfconnect/ncs-si-muffin @nrfconnect/ncs-si-bluebagel
/samples/basic/blinky/ @nrfconnect/ncs-low-level-test @nrfconnect/ncs-ll-ursus
/samples/benchmarks/coremark/ @nrfconnect/ncs-si-bluebagel
/samples/bluetooth/nrf_auraconfig/ @nrfconnect/ncs-audio
/samples/bluetooth/central_and_peripheral_hr/ @nrfconnect/ncs-si-muffin
Expand Down Expand Up @@ -703,7 +704,6 @@
/scripts/partition_manager/*.rst @nrfconnect/ncs-aurora-doc
/scripts/shell/ble_console/**/*.rst @nrfconnect/ncs-doc-leads
/scripts/west_commands/sbom/*.rst @nrfconnect/ncs-si-muffin-doc
/scripts/twister/alt/zephyr/samples/basic/ @nrfconnect/ncs-ll-ursus
/scripts/twister/alt/zephyr/samples/sensor/ @nrfconnect/ncs-low-level-test
/scripts/twister/alt/zephyr/tests/drivers/ @nrfconnect/ncs-low-level-test

Expand Down
11 changes: 11 additions & 0 deletions samples/basic/blinky/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#
# Copyright (c) 2025 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

cmake_minimum_required(VERSION 3.20.0)
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(blinky)

target_sources(app PRIVATE ${ZEPHYR_BASE}/samples/basic/blinky/src/main.c)
3 changes: 3 additions & 0 deletions samples/basic/blinky/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
This sample extends the same-named Zephyr sample to verify it with Nordic development kits.

Source code and basic configuration files can be found in the corresponding folder structure in zephyr/samples/basic/blinky.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/*
* Copyright (c) 2025 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

&led0 {
gpios = <&egpio 9 GPIO_ACTIVE_HIGH>;
};
1 change: 1 addition & 0 deletions samples/basic/blinky/prj.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CONFIG_GPIO=y
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,11 @@ common:
tags:
- LED
- gpio
- ci_tests_drivers_sdp
depends_on: gpio
tests:
sample.basic.blinky:
filter: dt_enabled_alias_with_parent_compat("led0", "gpio-leds")
harness: led
integration_platforms:
- frdm_k64f

sample.basic.blinky.sdp.gpio.icmsg:
nrf.extended.sample.basic.blinky.sdp.gpio.icmsg:
sysbuild: true
platform_allow:
- nrf54l15dk/nrf54l15/cpuapp
Expand All @@ -32,7 +28,7 @@ tests:
- "LED state: ON"
- "LED state: OFF"

sample.basic.blinky.sdp.gpio.mbox:
nrf.extended.sample.basic.blinky.sdp.gpio.mbox:
sysbuild: true
platform_allow:
- nrf54l15dk/nrf54l15/cpuapp
Expand All @@ -52,7 +48,7 @@ tests:
- "LED state: ON"
- "LED state: OFF"

sample.basic.blinky.sdp.gpio.icbmsg:
nrf.extended.sample.basic.blinky.sdp.gpio.icbmsg:
sysbuild: true
platform_allow:
- nrf54l15dk/nrf54l15/cpuapp
Expand Down

0 comments on commit 95144b9

Please sign in to comment.