🎙 Episode #21 -- Zephyr - First Experiences

  • 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