Nanopb的安装与使用

it2025-06-11  18

github下载

https://github.com/nanopb/nanopb

安装python3.6

配置pip下载安装python以来库

pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple

安装python依赖库

pip install protobuf grpcio-tools

在generator目录下使用simple.proto测试生成(可能报支持包没有)

protoc.bat simple.proto -o simple.pb

python nanopb_generator.py simple.pb

直接生成可以

python .\nanopb_generator.py .\simple.pb

 

 

 

最新回复(0)