firmware/generate_pb.py
Patrick Moessler 0c83634f42 Initial commit
2019-10-13 00:37:11 +02:00

10 lines
No EOL
590 B
Python

Import("env")
env.AlwaysBuild(
env.Alias("generate_pb", None, [
r"if not exist $PROJECT_DIR\lib\pb_gen mkdir $PROJECT_DIR\lib\pb_gen\ ",
r"$PROJECT_DIR\extra\nanopb\generator-bin\protoc.exe -I$PROJECT_DIR\extra\ -o$PROJECT_DIR\lib\pb_gen\fx.pb fx.proto",
r"$PROJECT_DIR\extra\nanopb\generator-bin\nanopb_generator.exe -D$PROJECT_DIR\lib\pb_gen\ $PROJECT_DIR\lib\pb_gen\fx.pb",
r"copy $PROJECT_DIR\extra\nanopb\pb.h $PROJECT_DIR\lib\pb_gen\ ",
r"copy $PROJECT_DIR\extra\nanopb\pb_decode.* $PROJECT_DIR\lib\pb_gen\ "
]))
#print(env.Dump())