Edit online

image_cfg.json 参考配置

Read time: 2 minute(s)

本配置为 SPINOR,使用 SDK 的 BootLoader 进行烧录的参考配置。

{
    "spi-nor": {
        "size": "16m", // Size of SPI NOR
        "partitions": {
            "spl":        { "size": "1m" },
        },
    },
    "image": {
        "info": { // Header information about image
            "platform": "d13x",
            "product": "demo88-nor",
            "version": "1.0.0",
            "media": {
                "type": "spi-nor",
                "device_id": 0,
            }
        },
        "updater": { // Image writer which is downloaded to RAM by USB
            "psram": {
                "file": "usbupg-psram-init.aic",
                "attr": ["required", "run"],
                "ram": "0x30044000"
            },
            "spl": {
                "file": "bootloader.aic",
                "attr": ["required", "run"],
                "ram": "0x40100000"
            },
        },
        "target": { // Image components which will be burn to device's partitions
            "spl": {
                "file": "app.aic",
                "attr": ["mtd", "required"],
                "part": ["spl"]
            },
        },
    },
    "pre-process": { // Pre-proccess to generate image components from raw data
        "aicimage": { // Create aic boot image
            "usbupg-psram-init.aic": {
                "head_ver": "0x00010001",
                "resource": {
                    "private": "pbp_cfg.bin",
                    "pbp": "d13x.pbp",
                },
            },
            "pbp_ext.aic": {
                "head_ver": "0x00010001",
                "resource": {
                    "pbp": "d13x.pbp",
                    "private": "pbp_cfg.bin",
                },
                // combine to use with loader.aic
                "with_ext": "true",
            },
            "loader.aic": {
                "head_ver": "0x00010001",
                "loader": {
                    "file": "bootloader.bin",
                    "load address": "0x40200000",
                    "entry point":  "0x40200100", // 256 byte aic header
                },
                "resource": {
                    "private": "pbp_cfg.bin",
                },
            },
            "app.aic": {
                "head_ver": "0x00010001",
                "loader": {
                    "file": "app.bin",
                    "load address": "0x40200000",
                    "entry point":  "0x40200100", // 256 byte aic header
                },
                "resource": {
                    "private": "pbp_cfg.bin",
                },
            },
        },
        "concatenate": { // cat files in order
            "bootloader.aic": ["pbp_ext.aic", "loader.aic"],
        },
    },
}