Skip to content

Sample code to use Nanopb in Linux kernel module

Notifications You must be signed in to change notification settings

p47t/openxc-nanopb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

What is this?

This is a demonstration showing how to use Protocol Buffer in a Linux kernel module or typically a device driver.

Why Using Protocol Buffer in Embedded System is a Good Idea?

In embedded system, typically hand-written C struct definitions are used to pass data around even for cross-chip communication. This interface contract between two sides (e.g. device driver and firmware) is too rigid to change. One cannot change the interface without breaking compatibility with the other side. Protocol Buffer can provide versioning mechanism to allow evolving either side independently.

How can Protocol Buffer be Used in Linux Kernel?

Nanopb is a Protocol Buffer implementation designed for embedded systems. It has small code size and require less than 1KB RAM to run. Besides its dependencies on C runtime library is minimized so that it can be easily ported to be used in Linux kernel. Integrating Nanopb with a kernel module can be done without breaking a sweat.

Releases

No releases published

Packages

No packages published

Languages