Arm Mbed OS support forum

How to add prebuild steps?


I have a project where some source files are generated. Specifically, I have some protobuf definitions and using nanopb I generate code to encode and decode messages, is there a way to run this step automatically before every build?

Hello Fabián,

Read my answer here.

Best regards, Zoltan

1 Like

FWIW, this is pretty easy to do with mbed-cmake. You can simply use CMake’s FindProtobuf module to generate the source files automatically. We actually do something similar to this where I work at RPL, except with ASN.1 serialization instead of Protobuf.

1 Like

Thanks, will try it.