Lines Matching full:nanopb
2 Scons Builder for nanopb .proto definitions.
4 This tool will locate the nanopb generator and use it to generate .pb.c and
12 # Link nanopb core to the program
14 myprog = env.Program(["myprog.c", myproto, "$NANOPB/pb_encode.c", "$NANOPB/pb_decode.c"])
18 Normally, this script is used in the test environment of nanopb and it locates
19 the nanopb generator by a relative path. If this script is used in another
20 application, the path to nanopb root directory has to be defined:
22 env.SetDefault(NANOPB = "path/to/nanopb")
28 env.SetDefault(PROTOCFLAGS = "--plugin=protoc-gen-nanopb=path/to/protoc-gen-nanopb")
41 '''Find the path to nanopb root directory.'''
42 if env.has_key('NANOPB'):
43 # Use nanopb dir given by user
44 return env['NANOPB']
52 "Could not find the nanopb root directory")
88 … return e('--plugin=protoc-gen-nanopb=' + os.path.join(n, 'generator', 'protoc-gen-nanopb.bat'))
90 return e('--plugin=protoc-gen-nanopb=' + os.path.join(n, 'generator', 'protoc-gen-nanopb'))
113 '''Add Builder for nanopb protos.'''
115 env['NANOPB'] = _detect_nanopb(env)
119 env.SetDefault(PROTOCPATH = ['.', os.path.join(env['NANOPB'], 'generator', 'proto')])