System Configuration

[中文]

The Armino configuration is integrated in the build, and the process is shown in the following figure:

8

The processing corresponding to the labels in the figure is:

    1. Code generation, before compiling, the build system scans the configuration file first, and generates the header file or configuration file required for compiling.

    1. Generate BIN - compiles, links and generates raw binaries.

    1. Scan the configuration file again, pack according to the configuration items, including adding CRC, encrypting, signing, etc., and finally generate all-app.bin, all-app-no-bl.bin and ota.bin.

    1. Deploy the generated OTP/EFUSE configuration file to the board.

Configuration Files

Armino supports the following configuration files:

  • Kconfig - component configuration, generates sdkconfig.h. For details, refer to Kconfig configuration.

  • csv - configuration file in CSV format, including:

    • partitions.csv - partition configuration table, used to generate partitions_gen.h. Please refer to Partition configuration for details.

    • mpc.csv - Security block peripheral configuration table, used to generate security.h. For details, please refer to Security Configuration.

    • ppc.csv - Security peripheral configuration table, used to generate security.h. For details, please refer to Security Configuration.

    • gpio_dev.csv - Configure the peripheral and GPIOs mapping. This table together with ppc.csv will help to generate peripheral security configurations. For details, please refer to Security Configuration.

    • security.csv - security configuration, used to generate security.h and otp_efuse_otp.json, also used for packaging. For details, please refer to Security Configuration.

    • ota.csv - configure the OTA strategy and security counter. For details, please refer to OTA Configuration.

  • key - Configure security-related KEY, such as FLASH AES KEY, secure boot public key pair, etc. For details, please refer to Security Configuration.

Configuration Files Organization

The configuration file is organized in Armino as shown in the following figure:

-armino/
    - components/
        - c1/
            -Kconfig
    - middleware/
        -boards/
            - bk7236/
                -csv
                    - mpc.csv
                    - ppc.csv
                    - ota.csv
                    - partitions.csv
                    - security.csv
                - key
                    - root_ec256_pubkey.pem
                    - root_ec256_privkey.pem
        - soc/
            - bk7236/
                -bk7236.defconfig
    - projects/
        - my_project/
            -config/
                - common.config
                -bk7236.config
                - csv
                    - mpc.csv
                    -ppc.csv
                    -ota.csv
                    - partitions.csv
                    - security.csv
                    - bk7236_partitions.csv
                - key
                    - root_ec256_pubkey.pem
                    - root_ec256_privkey.pem
            -Kconfig.projbuild
            - main/
                -Kconfig
            - components/
                - c1/
                    -Kconfig

For configuration files or configuration items with the same name, the priority rules are:

  • Project Configuration > Middleware Configuration > Component Configuration.

  • For configuration files in the same directory: specific chip configuration items > general configuration items.

Note

Kconfig uses the configuration items in the high priority file to replace the configuration items in the low priority configuration file; Other configuration files are replaced by configuration files with higher priority than those with lower priority.