Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add mbox backend for eGPIO #16592

Merged

Conversation

jaz1-nordic
Copy link
Contributor

@jaz1-nordic jaz1-nordic commented Jul 24, 2024

For testing with icmsg backend:

Build zephyr's blinky (zephyr/samples/basic/blinky) with:
west build -p -b nrf54l15dk/nrf54l15/cpuapp --sysbuild -- -DSB_CONFIG_SDP=y -DSB_CONFIG_EGPIO_FLPR_APPLICATION=y -DSB_CONFIG_EGPIO_BACKEND_ICMSG=y -DSB_CONFIG_PARTITION_MANAGER=n -DEXTRA_DTC_OVERLAY_FILE="./boards/nrf54l15dk_nrf54l15_cpuapp_egpio.overlay"
or
west build -p -b nrf54l15dk/nrf54l15/cpuapp --test-item sample.basic.blinky.egpio_icmsg .

For testing with shared_struct mbox backend:

Build zephyr's blinky (zephyr/samples/basic/blinky) with:
west build -p -b nrf54l15dk/nrf54l15/cpuapp --sysbuild -- -DSB_CONFIG_SDP=y -DSB_CONFIG_EGPIO_FLPR_APPLICATION=y -DSB_CONFIG_EGPIO_BACKEND_MBOX=y -DSB_CONFIG_PARTITION_MANAGER=n -DEXTRA_DTC_OVERLAY_FILE="./boards/nrf54l15dk_nrf54l15_cpuapp_egpio.overlay"
or
west build -p -b nrf54l15dk/nrf54l15/cpuapp --test-item sample.basic.blinky.egpio_mbox .

Flash images with:
west flash

@jaz1-nordic jaz1-nordic requested review from masz-nordic, magp-nordic and a team July 24, 2024 10:15
@github-actions github-actions bot added manifest changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. labels Jul 24, 2024
@NordicBuilder
Copy link
Contributor

NordicBuilder commented Jul 24, 2024

The following west manifest projects have been modified in this Pull Request:

Name Old Revision New Revision Diff
zephyr nrfconnect/sdk-zephyr@5d10d27 nrfconnect/sdk-zephyr@8005d4e (main) nrfconnect/[email protected]

Note: This message is automatically posted and updated by the Manifest GitHub Action.

@NordicBuilder
Copy link
Contributor

NordicBuilder commented Jul 24, 2024

Test specification

CI/Jenkins/NRF

  • Integration Platforms

CI/Jenkins/integration

Test Module File based changes Manually selected West overwrite
test-low-level X
test-sdk-dfu X
test-sdk-find-my X

Detailed information of selected test modules

Note: This message is automatically posted and updated by the CI

@NordicBuilder
Copy link
Contributor

You can find the documentation preview for this PR at this link. It will be updated about 10 minutes after the documentation build succeeds.

Note: This comment is automatically posted by the Documentation Publishing GitHub Action.

@jaz1-nordic jaz1-nordic force-pushed the add-struct-communication-to-egpio branch from bf0d571 to fb5a763 Compare August 6, 2024 14:27
@jaz1-nordic jaz1-nordic force-pushed the add-struct-communication-to-egpio branch from fb5a763 to b1ff15f Compare August 6, 2024 14:39
@shanthanordic shanthanordic removed the request for review from a team August 15, 2024 06:50
@jaz1-nordic jaz1-nordic force-pushed the add-struct-communication-to-egpio branch from b1ff15f to 68346d4 Compare August 21, 2024 11:49
@NordicBuilder
Copy link
Contributor

NordicBuilder commented Aug 21, 2024

CI Information

To view the history of this post, clich the 'edited' button above
Build number: 24

Inputs:

Sources:

sdk-nrf: PR head: cb2dc7ecfe3448d970a47eab9dff46b23477e098
zephyr: PR head: 8005d4e87b9bcba25f441a51f4f5d29b541022b9

more details

sdk-nrf:

PR head: cb2dc7ecfe3448d970a47eab9dff46b23477e098
merge base: f288576b77ad50e293fe52be8b54d48bb5bdda45
target head (main): f288576b77ad50e293fe52be8b54d48bb5bdda45
Diff

zephyr:

PR head: 8005d4e87b9bcba25f441a51f4f5d29b541022b9
merge base: 5d10d27a0a978816153764e8f7024cbbc3fae197
Diff

Github labels

Enabled Name Description
ci-disabled Disable the ci execution
ci-all-test Run all of ci, no test spec filtering will be done
ci-force-downstream Force execution of downstream even if twister fails
ci-run-twister Force run twister
ci-run-zephyr-twister Force run zephyr twister
List of changed files detected by CI (42)
.github
│  │ test-spec.yml
CODEOWNERS
applications
│  ├── sdp
│  │  ├── gpio
│  │  │  ├── CMakeLists.txt
│  │  │  ├── boards
│  │  │  │  ├── nrf54l15dk_nrf54l15_cpuflpr.conf
│  │  │  │  ├── nrf54l15dk_nrf54l15_cpuflpr.overlay
│  │  │  │  ├── nrf54l15dk_nrf54l15_cpuflpr_icmsg.overlay
│  │  │  │  │ nrf54l15dk_nrf54l15_cpuflpr_mbox.overlay
│  │  │  ├── include
│  │  │  │  │ main.h
│  │  │  ├── prj.conf
│  │  │  ├── sample.yaml
│  │  │  ├── src
│  │  │  │  ├── main.c
│  │  │  │  ├── nrfe_icmsg.c
│  │  │  │  │ nrfe_mbox.c
│  │  │  │ sysbuild.conf
│  ├── sw_io_devices
│  │  ├── gpio
│  │  │  ├── boards
│  │  │  │  ├── nrf54l15pdk_nrf54l15_cpuflpr.conf
│  │  │  │  │ nrf54l15pdk_nrf54l15_cpuflpr.overlay
│  │  │  ├── prj.conf
│  │  │  │ sample.yaml
cmake
│  ├── sysbuild
│  │  │ sdp.cmake
drivers
│  ├── gpio
│  │  ├── CMakeLists.txt
│  │  ├── Kconfig
│  │  ├── gpio_nrfe.c
│  │  ├── gpio_nrfe.h
│  │  ├── gpio_nrfe_icmsg.c
│  │  │ gpio_nrfe_mbox.c
include
│  ├── drivers
│  │  ├── gpio
│  │  │  │ nrfe_gpio.h
│  ├── sdp
│  │  │ nrfe_common.h
scripts
│  ├── twister
│  │  ├── alt
│  │  │  ├── zephyr
│  │  │  │  ├── samples
│  │  │  │  │  ├── basic
│  │  │  │  │  │  ├── blinky
│  │  │  │  │  │  │  │ sample.yaml
snippets
│  ├── emulated-gpio
│  │  ├── emulated-gpio.overlay
│  │  ├── icmsg
│  │  │  ├── boards
│  │  │  │  │ nrf54l15dk_nrf54l15_cpuapp.overlay
│  │  │  ├── emulated-gpio.overlay
│  │  │  │ snippet.yml
│  │  ├── mbox
│  │  │  ├── boards
│  │  │  │  │ nrf54l15dk_nrf54l15_cpuapp.overlay
│  │  │  ├── emulated-gpio.overlay
│  │  │  │ snippet.yml
sysbuild
│  ├── CMakeLists.txt
│  ├── Kconfig.sdp
│  ├── Kconfig.sysbuild
│  │ sdp.cmake
west.yml
zephyr
│  ├── samples
│  │  ├── basic
│  │  │  ├── blinky
│  │  │  │  ├── boards
│  │  │  │  │  │ nrf54l15dk_nrf54l15_cpuapp_egpio.overlay
│  ├── share
│  │  ├── sysbuild
│  │  │  ├── cmake
│  │  │  │  ├── modules
│  │  │  │  │  │ sysbuild_extensions.cmake

Outputs:

Toolchain

Version: 9583beca34
Build docker image: docker-dtr.nordicsemi.no/sw-production/ncs-build:9583beca34_81ed5a52d6

Test Spec & Results: ✅ Success; ❌ Failure; 🟠 Queued; 🟡 Progress; ◻️ Skipped; ⚠️ Quarantine

  • ◻️ Toolchain - Skipped: existing toolchain is used
  • ✅ Build twister
    • sdk-nrf test count: 1359
    • sdk-zephyr test count: 5649
  • ✅ Integration tests
    • ✅ test-fw-nrfconnect-boot
    • ✅ test-fw-nrfconnect-rs
    • ✅ test-fw-nrfconnect-fem
    • ✅ test-sdk-find-my
    • ✅ test-low-level
    • ✅ test-sdk-mcuboot
    • ✅ test-sdk-dfu
Disabled integration tests
    • desktop52_verification
    • doc-internal
    • test_ble_nrf_config
    • test-fw-nrfconnect-apps
    • test-fw-nrfconnect-ble_mesh
    • test-fw-nrfconnect-ble_samples
    • test-fw-nrfconnect-chip
    • test-fw-nrfconnect-nfc
    • test-fw-nrfconnect-nrf-iot_cloud
    • test-fw-nrfconnect-nrf-iot_libmodem-nrf
    • test-fw-nrfconnect-nrf-iot_lwm2m
    • test-fw-nrfconnect-nrf-iot_mosh
    • test-fw-nrfconnect-nrf-iot_nrf_provisioning
    • test-fw-nrfconnect-nrf-iot_positioning
    • test-fw-nrfconnect-nrf-iot_samples
    • test-fw-nrfconnect-nrf-iot_serial_lte_modem
    • test-fw-nrfconnect-nrf-iot_thingy91
    • test-fw-nrfconnect-nrf-iot_zephyr_lwm2m
    • test-fw-nrfconnect-nrf_crypto
    • test-fw-nrfconnect-proprietary_esb
    • test-fw-nrfconnect-ps
    • test-fw-nrfconnect-rpc
    • test-fw-nrfconnect-tfm
    • test-fw-nrfconnect-thread
    • test-fw-nrfconnect-zigbee
    • test-sdk-audio
    • test-sdk-pmic-samples
    • test-sdk-sidewalk
    • test-sdk-wifi
    • test-secdom-samples-public

Note: This message is automatically posted and updated by the CI

drivers/gpio/gpio_nrfe.c Outdated Show resolved Hide resolved
drivers/gpio/Kconfig Outdated Show resolved Hide resolved
drivers/gpio/Kconfig Outdated Show resolved Hide resolved
drivers/gpio/Kconfig Outdated Show resolved Hide resolved
applications/sw_io_devices/gpio/src/main.c Outdated Show resolved Hide resolved
cmake/sysbuild/sw_io_devices.cmake Outdated Show resolved Hide resolved
include/drivers/gpio/nrfe_gpio.h Outdated Show resolved Hide resolved
@jaz1-nordic jaz1-nordic force-pushed the add-struct-communication-to-egpio branch 2 times, most recently from 34c38b5 to 7642847 Compare September 10, 2024 14:27
@masz-nordic
Copy link
Contributor

@nordicjm Can you take a look?

Comment on lines +21 to +22
printk("Sending opcode: %d, pin %d, port %d, flag: %d\n", msg->opcode, msg->pin, msg->port,
msg->flags);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use logging subsystem

drivers/gpio/Kconfig Show resolved Hide resolved
drivers/gpio/Kconfig Outdated Show resolved Hide resolved
sysbuild/Kconfig.sdp Outdated Show resolved Hide resolved
sysbuild/sdp.cmake Outdated Show resolved Hide resolved
sysbuild/sdp.cmake Outdated Show resolved Hide resolved
sysbuild/sdp.cmake Outdated Show resolved Hide resolved
sysbuild/sdp.cmake Show resolved Hide resolved
@jaz1-nordic jaz1-nordic force-pushed the add-struct-communication-to-egpio branch from 51b2e25 to 977fc35 Compare September 30, 2024 13:34
@masz-nordic
Copy link
Contributor

@nordicjm can you take a look?

Commits necessary for blinky to work eGPIO on L15.

Signed-off-by: Jakub Zymelka <[email protected]>
Official naming changed from "sw-defined io devices"
to "software defined peripherals".

Signed-off-by: Jakub Zymelka <[email protected]>
Add an mbox-based shared struct type
to the possible ipc communication channels.

Signed-off-by: Jakub Zymelka <[email protected]>
Add an mbox-based shared struct type to the possible
ipc communication channels.

Signed-off-by: Jakub Zymelka <[email protected]>
Add an alternative in the form of a snippet using mbox channels
and a shared structure for communication between cores.

Signed-off-by: Jakub Zymelka <[email protected]>
Add SDP FLPR application image to the build depending
on the enabled configuration.

Signed-off-by: Jakub Zymelka <[email protected]>
Add yaml configurations to enable eGPIO tests with sysbuild
and different backends.

Signed-off-by: Jakub Zymelka <[email protected]>
@jaz1-nordic jaz1-nordic force-pushed the add-struct-communication-to-egpio branch from 51d56a9 to cb2dc7e Compare October 2, 2024 08:12
@NordicBuilder NordicBuilder removed the DNM label Oct 2, 2024
CODEOWNERS Show resolved Hide resolved
drivers/gpio/gpio_nrfe_icmsg.c Show resolved Hide resolved
applications/sdp/gpio/include/main.h Show resolved Hide resolved
Copy link
Contributor

@bjarki-andreasen bjarki-andreasen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not blocking requests but if we upstream this we will need to align with my comments.

include/sdp/nrfe_common.h Show resolved Hide resolved
include/sdp/nrfe_common.h Show resolved Hide resolved
include/sdp/nrfe_common.h Show resolved Hide resolved
nrfe_gpio_mbox_data_t *rx_data = (nrfe_gpio_mbox_data_t *)user_data;

/* Try and get lock for the shared data structure */
if (atomic_flag_test_and_set(&rx_data->lock.locked)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use zephyr's atomic_set_bit with zephyr's primitve atomic_t

@tmon-nordic tmon-nordic dismissed their stale review October 2, 2024 13:12

The comments may not be that critical

@carlescufi carlescufi merged commit 90ec420 into nrfconnect:main Oct 3, 2024
13 of 14 checks passed
@jaz1-nordic jaz1-nordic deleted the add-struct-communication-to-egpio branch October 3, 2024 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. manifest manifest-zephyr
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants