Adding Metadata to GBL Files#
Introduction#
Metadata#
Metadata can be anything that can be put into a byte array. You can add text, structures, or binary data to your GBL files. Hence, when you update your device with a new firmware, you can also update other settings, e.g., a parameter set, that is stored in the persistent storage. You can also send extended version information along with the firmware or you can send new security keys in a signed and encrypted GBL file. You can even send an extra firmware image as metadata intended to be sent to another device.
Adding Metadata to the GBL File#
Metadata can be added when you create the GBL file with the commander gbl create
command. Add the --metadata switch and the name of the file, that contains the metadata. For example:
commander gbl create application.gbl --app application.s37 --metadata metadata.bin
If you use the create_bl_files.bat file to create GBL files, edit the file and extend the commands with the --metadata switch.
Reading Metadata from the Uploaded Files#
You can read the content of the metadata that was put into the GBL file as follows:
You can read data on-the-fly while uploading