This is a kind of continuation to: devzone.nordicsemi.com/.../
I'm modifying the bootloader_secure sample to implement encryption.
I'm now at the step where I need to change the init packet, so I followed advice and in particular this: infocenter.nordicsemi.com/.../nrfutil_customizing.html
However, I come across a few issues after changing the .proto file. I reverted back to original files, but then, running "protoc -odfu-cc.pb dfu-cc.proto" gives me an error message that I need a syntax defintion, fair enough, it's proto compiler v3, so I add again 'syntax = "proto2";' at the top of the proto file, run the command again, all good.
Then I run the nanopb_generator, but when trying to compile, I get lots of error. The generated files do not seem compatible at all with the sample code, with for example:
typedef PB_BYTES_ARRAY_T(64) dfu_signed_command_signature_t;
typedef struct {
dfu_command_t command;
dfu_signature_type_t signature_type;
dfu_signed_command_signature_t signature;
/* @@protoc_insertion_point(struct:dfu_signed_command_t) */
} dfu_signed_command_t;
turning into:
typedef struct {
dfu_command_t command;
dfu_signature_type_t signature_type;
pb_callback_t signature;
/* @@protoc_insertion_point(struct:dfu_signed_command_t) */
} dfu_signed_command_t;
(this is done by the nanopb_generator bundled with the SDK)
So signature is now a pb_callback type, which doesn't have a "size" member, unlike PB_BYTES_ARRAY_T.
Does anyone know how to re-create those dfu-cc.pb.h/.c identical to the one that ships with the example?