6.3 Configuration File

The configuration file contains a list of parameters, which are used to configure the project. The parameters are described in the following table.

Table 6-1. Summary of Configuration File Options
ParameterDescriptionDefaultRequired
PAGE_SIZESize of AVR Flash page in decimal bytes. This parameter is part dependent. See the data sheet.N/AYes
KEY1First part (128-bit) of the encryption key in hex. Should be 16 random bytes, with odd-parity bits inserted after every 8th bit, making a total of 18 bytes.None: No encryptionNo, but strongly recommended
KEY2Second part (64-bit) of the encryption key in hex. Should be eight random bytes, with odd-parity bits inserted after every 8th bit, making a total of nine bytes. If omitted, AES128 will be used.None: Use AES128No, but recommended
KEY3Third part (64-bit) of the encryption key in hex. Should be nine random bytes, with odd-parity bits inserted after every 8th bit, making a total of nine bytes. If omitted AES128 or AES192 will be used.None: Use AES128 or AES192No, but recommended
INITIAL_VECTORUsed for chaining cipher blocks. Should be 16 random bytes in hex.0No, but strongly recommended
SIGNATUREFrame validation data in hex. This can be any four bytes, but it is recommended that the values are chosen at random.0No
ENABLE_CRCEnable CRC checking: YES or NO. If enabled, the whole application section will be overwritten and the application must pass a CRC check before it is allowed to start.NoNo, but recommended
MEM_SIZESize of application section in target AVR (in decimal bytes).N/AYes, if CRC is used
The configuration file can be given any valid file name. The name is later given as a parameter to the application that will create the project files. Below is a sample configuration file for the ATmega328PB. The KEY1 parameter is an example 128-bit key (hex 0123456789ABCDEF0123456789ABCDEF) with parity bits inserted.
PAGE_SIZE      = 128
MEM_SIZE       = 30720
CRC_ENABLE     = YES
KEY1           = EC38ECC4C11DBC16151A5E346A872AADAD36
INITIAL_VECTOR = F24D994D5DD3E9F1EEE897616C425028
SIGNATURE      = 89DBF334

Some of the parameters cannot be set without specific knowledge of the target AVR. The following table summarizes the features of some present AVR microcontrollers with bootloader functionality. For devices not present in this table, refer to the data sheet of the device.

Table 6-2. AVR Feature Summary
FeatureM8M16M162M169M32M64M128M328PB
Flash Size, bytes8192163841638416384327686553613107232768
Flash Page size, bytes64128128128128256256128
Flash Pages128128128128256256512 256
BLS (max.), bytes20482048204820484096819281924096
BLS (max.) Pages3216161632323232
MEM_SIZE (min.), bytes6144143361433614336286725734412288028672
PAGE_SIZE, bytes64128128128128256256128