Zephyr - First Experiences

Posted on Friday, May 26, 2023
Some thoughts on our first few months with Zephyr

Show Notes

Available on your favorite podcast platform.

  • backstory
    • working on a project using freeRTOS on STM32H743
    • a lot of work integrating things like Ethernet/USB
    • code generation has tradeoffs
    • without one week, 1 engineer working part-time had Zephyr running with most drivers working
  • Build
    • Kconfig (very granular)
    • Device Tree -> C headers
    • extensive use of Macros
    • no C++
  • differences between other RTOS models
    • most MCU tooling takes RTOS, and MCU integrates and delivers
    • Zephyr does the opposite – they take MCU HAL, and then integrate and deliver directly to developers
  • Support/Community
    • Discord
    • Github discussions
  • Shell
    • is amazing
    • proper terminal with tab completion, proper backspace support, etc
    • keeps what you are typing at bottom of screen even if there are logging messages scrolling
    • list threads, memory used, %CPU, etc
    • Projects like Beagle Connect Freedom – they are piping shell over radio connection
  • Logging
    • standard levels ERR, WRN, INF, DBG
    • easy to add a logging domain in any module
    • Macros automatically apply LOG_WRN() to current logging domain
    • can change log level of each domain at runtime in shell
  • Tooling
    • well-integrated flashing
    • debugging uses the command line GDB
  • Linux connections
  • Performance
  • challenges
    • configuration
    • tracing code through system calls
    • documentation is fairly good, but can be hard to find things
  • opinion
    • The Zephyr project is a sustainable approach as MCUs become more complex

Discuss this episode at our community site.

Hosts

Cliff Brake

Cliff Brake

Cliff has been developing products for a long time. See BEC and Github for more information.

Khem Raj

Khem Raj

Khem is an OpenEmbedded maintainer.