Weekly Progress Report - Greybus for Zephyr

Weekly Progress Report: Greybus for Zephyr

Hi, this is a weekly blog for my GSoC 2022 project Greybus for Zephyr Updates. My mentors for this project are Jason Kridner, Vaishnav Achath, Deepak Khatri and Tim Orling. This thread will be updated weekly.

Youtube Video: https://youtu.be/GN82Yiq_kRg
Blog Link: https://gsoc.beagleboard.io/greybus-for-zephyr/

1 Like

Week 1

Accomplishments

  • Build Zephyr applications for BeagleConnect nodes on the Gateway device.
  • Fixes for the updated bcf-sdk [Pull #17]
  • Setup connection between the native POSIX target and host

Blockers

Upcoming Targets

  • Finish the introduction video
  • Establish a TCP connection between the native POSIX target and host

Week 2

Accomplishments

  • Finished the introduction slides and scripts
  • Patched the issue causing stack smashing on the native_POSIX target [Commit 9fd1f60d]
  • Setup a greybus application on the native_POSIX target communicating via UART [Commit 34fdf305]

Blockers

Upcoming Targets

  • Interface PWM with zephyr from nuttx sources
  • Establish a TCP connection between the native POSIX target and host
1 Like

Week 3

Accomplishments

Blockers

Upcoming Targets

  • Test PWM over greybus
  • Improve the testbench
  • Interface PWM with zephyr from nuttx sources

Week 4

Accomplishments

  • Reorganize the code so it’s easier to track.
  • Started developing a host side testbench to generate greybus message instead of gbridge
  • Interface UART from nuttx sources [Branch uart-wip]

Blockers

  • Inconsistent behaviour by the greybus-pwm firmware (crashes the host sometimes)
  • Zephyr does not have api to generate UART break

Upcoming Targets

  • Test PWM and UART over greybus
  • Improve the testbench
  • Interface GPIO IRQ with zephyr from nuttx sources

Week 5

Accomplishments

  • Fix CI, again…
  • Started developing a host side testbench to generate greybus message instead of gbridge
  • Complete port of UART from nuttx sources [Branch uart-wip]

Blockers

Upcoming Targets

  • Test PWM and UART peripherals over greybus
  • Connect to the POSIX target with a userspace testbench

Week 6

Accomplishments

  • Completed beagleconnect documentation for docs.beagleboard.io [Merge #14]
  • I thought an incorrect devicetree overlay was causing Issue #5, as the error is caused by passing a pointer to a non-static local variable to a state machine which changed the value at that memory location later on. However, this does not seem to fix the issue.
  • Greybus core messages are being sent to the POSIX target

Blockers

Upcoming Targets

  • Move the PWM and UART devices into the gb_bundle’s private data
  • Get core greybus messages working on the testbench

Week 7

Accomplishments

  • Narrowed down the cause of the major blocker [Issue #5]

Blockers

  • This issue now shows up even when PWM or UART are not configured. This seems to have risen from the recent rebase of zephyr to version 3.1.0. My understanding so far is that the zephyr target crashes when gbridge is run on the host. The kernel panic on the host probably occurs because of the errors on the zephyr side of things. The doubly-linked list seems to cause an imprecise bus error when initialized. This leads me to some sort of regression in the transport-tcpip.c.
  • POSIX target does not receive the messages over the pseudo-terminal. I am unsure about how the interfaces in gbridge work, upon figuring them out, I should be able to write greybus messages to a pseudo-terminal

Upcoming Targets

  • Thoroughly debug the transport-tcpip to figure out what has regressed
  • Get core greybus messages working on the testbench

Week 8

Accomplishments

  • Updated zephyr to the latest version in hopes of fixing [Issue #5]
  • Setup control and svc operations for the testbench

Blockers

  • This issue still persists [Issue #5]. This has been reported earlier, and I applied their patches, but it hasn’t solved my problem yet.
  • Reading from the pty results in permission errors for the testbench

Upcoming Targets

  • Thoroughly debug the transport-tcpip to figure out what has regressed
  • Fix the uart-transport for the testbench
  • Add peripheral support to the testbench