Skip to content

Commit

Permalink
v4.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Seppo Takalo committed Aug 12, 2019
1 parent 055c912 commit e18ae77
Show file tree
Hide file tree
Showing 21 changed files with 381 additions and 43 deletions.
5 changes: 5 additions & 0 deletions .astyleignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
.astyleignore
.astylerc
.git
BUILD
scripts
mbed-os

1 change: 0 additions & 1 deletion configs/block_device_fake_rot.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@
"mbed-bootloader.application-start-address": "(MBED_ROM_START+65*1024)"
},
"UBLOX_EVK_ODIN_W2": {
"target.device_has_remove": ["EMAC"],
"update-client.application-details" : "(MBED_ROM_START+64*1024)",
"mbed-bootloader.application-start-address": "(MBED_ROM_START+65*1024)"
},
Expand Down
3 changes: 2 additions & 1 deletion configs/internal_flash_no_rot.json
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@
"update-client.storage-address" : "(MBED_ROM_START + MBED_BOOTLOADER_FLASH_BANK_SIZE + KVSTORE_SIZE)",
"update-client.storage-size" : "(MBED_BOOTLOADER_FLASH_BANK_SIZE - KVSTORE_SIZE)",
"update-client.storage-locations" : 1,
"target.extra_labels_remove" : [ "WICED", "CORDIO", "PSA", "MBED_SPM" ]
"target.extra_labels_remove" : [ "WICED", "CORDIO", "PSA", "MBED_SPM" ],
"target.device_has_remove" : [ "LPTICKER" ]
},
"K64F": {
"kvstore-size": "2*24*1024",
Expand Down
79 changes: 79 additions & 0 deletions configs/internal_kvstore_with_qspif.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
{
"config": {
"documentation": {
"options": [
"The configuration for boards is:",
"- Firmware storage is on an external QSPI Flash(QSPIF) block device",
"- Internal KVStore only",
"The flash regions are as follows:",
"1. Bootloader - 32KiB from the beginning of flash",
"2. KVSTORE - 2 flash sectors immediately following the bootloader",
"3. Active App Metadata Header - (1KiB/2KiB) from the end of KVSTORE",
"4. Active App - From end of header to the end of flash",
"+--------------------------+",
"| |",
"| |",
"| |",
"| Active App |",
"| |",
"| |",
"| |",
"+--------------------------+ <-+ mbed-bootloader.application-start-address",
"|Active App Metadata Header|",
"+--------------------------+ <-+ update-client.application-details",
"| |",
"| KVSTORE |",
"| |",
"+--------------------------+ <-+ storage_tdb_internal.internal_base_address",
"| |",
"| Bootloader |",
"| |",
"+--------------------------+ <-+ 0",
"Firmware Candidate Storage is on external QSPIF device at an offset of 0 MiB.",
"The storage size is the size of the maximum application size (i.e. Active",
"Application region size) multiplied by the number of storage-locations.",
"(storage-locations is set to 1 in this configuration)",
"+--------------------------+<-+ End of QSPIF block device",
"| |",
"+--------------------------+<-+ update-client.storage-size + update-client.storage-address",
"| |",
"+--------------------------+",
"| |",
"| Firmware Candidate 0 |",
"| |",
"+--------------------------+",
"| Firmware Candidate 0 |",
"| Metadata Header |",
"+--------------------------+ <-+ Start of QSPIF block device (i.e. 0x0); update-client.storage-address"
]
}
},
"macros": [
"ARM_UC_USE_PAL_BLOCKDEVICE=1",
"MBED_CLOUD_CLIENT_UPDATE_STORAGE=ARM_UCP_FLASHIAP_BLOCKDEVICE",
"MBED_BOOTLOADER_ACTIVE_HEADER_REGION_SIZE=1024"
],
"target_overrides": {
"*": {
"platform.use-mpu" : false,
"platform.stdio-baud-rate" : 115200,
"platform.stdio-flush-at-exit" : false,
"update-client.firmware-header-version" : "2",
"target.restrict_size" : "0x8000",
"storage.storage_type" : "TDB_INTERNAL",
"storage_tdb_internal.internal_base_address": "(MBED_ROM_START+MBED_BOOTLOADER_SIZE)",
"storage_tdb_internal.internal_size" : "(2*8*1024)",
"update-client.application-details" : "(MBED_ROM_START + MBED_BOOTLOADER_SIZE+MBED_CONF_STORAGE_TDB_INTERNAL_INTERNAL_SIZE)",
"mbed-bootloader.application-start-address" : "(MBED_CONF_UPDATE_CLIENT_APPLICATION_DETAILS + MBED_BOOTLOADER_ACTIVE_HEADER_REGION_SIZE)",
"target.components_add" : ["QSPIF"],
"update-client.storage-address" : "0",
"update-client.storage-size" : "((MBED_ROM_START + MBED_ROM_SIZE - MBED_CONF_MBED_BOOTLOADER_APPLICATION_START_ADDRESS) * MBED_CONF_UPDATE_CLIENT_STORAGE_LOCATIONS)",
"update-client.storage-locations" : 1,
"target.device_has_remove" : [ "LPTICKER" ]
},
"DISCO_L475VG_IOT01A": {
"target.restrict_size" : "0x9800",
"mbed-bootloader.bootloader-size": "(38*1024)"
}
}
}
84 changes: 84 additions & 0 deletions configs/internal_kvstore_with_spif.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
{
"config": {
"documentation": {
"options": [
"The configuration for boards is:",
"- Firmware storage is on an external SPI Flash(SPIF) block device",
"- Internal KVStore only",
"The flash regions are as follows:",
"1. Bootloader - 32KiB from the beginning of flash",
"2. KVSTORE - 2 flash sectors immediately following the bootloader",
"3. Active App Metadata Header - (1KiB/2KiB) from the end of KVSTORE",
"4. Active App - From end of header to the end of flash",
"+--------------------------+",
"| |",
"| |",
"| |",
"| Active App |",
"| |",
"| |",
"| |",
"+--------------------------+ <-+ mbed-bootloader.application-start-address",
"|Active App Metadata Header|",
"+--------------------------+ <-+ update-client.application-details",
"| |",
"| KVSTORE |",
"| |",
"+--------------------------+ <-+ storage_tdb_internal.internal_base_address",
"| |",
"| Bootloader |",
"| |",
"+--------------------------+ <-+ 0",
"Firmware Candidate Storage is on external SPIF device at an offset of 0 MiB.",
"The storage size is the size of the maximum application size (i.e. Active",
"Application region size) multiplied by the number of storage-locations.",
"(storage-locations is set to 1 in this configuration)",
"+--------------------------+<-+ End of SPIF block device",
"| |",
"+--------------------------+<-+ update-client.storage-size + update-client.storage-address",
"| |",
"+--------------------------+",
"| |",
"| Firmware Candidate 0 |",
"| |",
"+--------------------------+",
"| Firmware Candidate 0 |",
"| Metadata Header |",
"+--------------------------+ <-+ Start of SPIF block device (i.e. 0x0); update-client.storage-address"
]
}
},
"macros": [
"ARM_UC_USE_PAL_BLOCKDEVICE=1",
"MBED_CLOUD_CLIENT_UPDATE_STORAGE=ARM_UCP_FLASHIAP_BLOCKDEVICE",
"MBED_BOOTLOADER_ACTIVE_HEADER_REGION_SIZE=1024"
],
"target_overrides": {
"*": {
"platform.use-mpu" : false,
"platform.stdio-baud-rate" : 115200,
"platform.stdio-flush-at-exit" : false,
"update-client.firmware-header-version" : "2",
"target.restrict_size" : "0x8000",
"storage.storage_type" : "TDB_INTERNAL",
"storage_tdb_internal.internal_base_address": "(MBED_ROM_START+MBED_BOOTLOADER_SIZE)",
"storage_tdb_internal.internal_size" : "(16*1024)",
"update-client.application-details" : "(MBED_ROM_START + MBED_BOOTLOADER_SIZE+MBED_CONF_STORAGE_TDB_INTERNAL_INTERNAL_SIZE)",
"mbed-bootloader.application-start-address" : "(MBED_CONF_UPDATE_CLIENT_APPLICATION_DETAILS + MBED_BOOTLOADER_ACTIVE_HEADER_REGION_SIZE)",
"target.components_add" : ["SPIF"],
"update-client.storage-address" : "0",
"update-client.storage-size" : "((MBED_ROM_START + MBED_ROM_SIZE - MBED_CONF_MBED_BOOTLOADER_APPLICATION_START_ADDRESS) * MBED_CONF_UPDATE_CLIENT_STORAGE_LOCATIONS)",
"update-client.storage-locations" : 1,
"target.device_has_remove" : [ "LPTICKER" ]
},
"NUCLEO_F303RE": {
"target.restrict_size" : "0x9000",
"mbed-bootloader.bootloader-size": "(36*1024)",
"spif-driver.SPI_MOSI" : "PC_12",
"spif-driver.SPI_MISO" : "PC_11",
"spif-driver.SPI_CLK" : "PC_10",
"spif-driver.SPI_CS" : "PA_15",
"update-client.storage-page" : 2
}
}
}
81 changes: 81 additions & 0 deletions configs/spif_kvstore.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
{
"config": {
"documentation": {
"options": [
"Usage:",
"- mbed compile -t <TOOLCHAIN> -m <TARGET> --profile=tiny.json --app-config configs/spif_kvstore.json",
"In this configuration:",
"- Firmware storage is on a SPIF block device",
"- Root of Trust is obtain from internal flash in kvstore",
"The flash regions are as follows:",
"1. Bootloader - from the beginning of flash",
"2. KVSTORE - immediately following the bootloader",
"3. Active App Metadata Header - from the end of KVSTORE",
"4. Active App - from end of Header to the end of internal flash",
"+--------------------------+",
"| |",
"| |",
"| |",
"| Active App |",
"| |",
"| |",
"| |",
"+--------------------------+ <-+ mbed-bootloader.application-start-address",
"|Active App Metadata Header|",
"+--------------------------+ <-+ update-client.application-details",
"| |",
"| KVSTORE INTERNAL |",
"| |",
"+--------------------------+ <-+ storage_tdb_internal.internal_base_address",
"| |",
"| Bootloader |",
"| |",
"+--------------------------+ <-+ 0",

"4. KVStore external part is on SPIF at an offset of 0 MiB.",
"5. Firmware Candidate Storage is on SPIF at an offset of 1 MiB.",
"+--------------------------+ <-+ update-client.storage-size * update-client.storage-locations",
"| |",
"| UPDATE STORAGE |",
"| |",
"+--------------------------+ <-+ update-client.storage-address",
"| |",
"| KVSTORE EXTERNAL |",
"| |",
"+--------------------------+ <-+ 0",
"The storage size is the size of the maximum application size (i.e. Active",
"Application region size) multiplied by the number of storage-locations.",
"(storage-locations is set to 1 in this configuration)"
]
}
},
"macros": [
"ARM_UC_USE_PAL_BLOCKDEVICE=1",
"MBED_CLOUD_CLIENT_UPDATE_STORAGE=ARM_UCP_FLASHIAP_BLOCKDEVICE",
"MBED_BOOTLOADER_ACTIVE_HEADER_REGION_SIZE=1024"
],
"target_overrides": {
"*": {
"platform.use-mpu" : false,
"platform.stdio-baud-rate" : 115200,
"platform.stdio-flush-at-exit" : false,

"target.components_add" : ["SPIF"],
"storage.storage_type" : "FILESYSTEM",
"storage_filesystem.filesystem" : "LITTLE",
"storage_filesystem.blockdevice" : "SPIF",

"storage_filesystem.internal_base_address" : "(MBED_ROM_START + 0xa000)",
"storage_filesystem.rbp_internal_size" : "(2*4*1024)",
"update-client.application-details" : "(MBED_CONF_STORAGE_FILESYSTEM_INTERNAL_BASE_ADDRESS + MBED_CONF_STORAGE_FILESYSTEM_RBP_INTERNAL_SIZE)",
"mbed-bootloader.application-start-address": "(MBED_CONF_UPDATE_CLIENT_APPLICATION_DETAILS + MBED_BOOTLOADER_ACTIVE_HEADER_REGION_SIZE)",

"storage_filesystem.external_base_address" : "(0*1024*1024)",
"storage_filesystem.external_size" : "(1*1024*1024)",
"update-client.storage-address" : "(MBED_CONF_STORAGE_FILESYSTEM_EXTERNAL_BASE_ADDRESS + MBED_CONF_STORAGE_FILESYSTEM_EXTERNAL_SIZE)",
"update-client.storage-locations" : 1,
"update-client.storage-size" : "((MBED_ROM_START + MBED_ROM_SIZE - MBED_CONF_MBED_BOOTLOADER_APPLICATION_START_ADDRESS) * MBED_CONF_UPDATE_CLIENT_STORAGE_LOCATIONS)",
"update-client.firmware-header-version" : "2"
}
}
}
23 changes: 23 additions & 0 deletions configs/test_configs/header_separate_after_app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"macros": [
"ARM_UC_USE_PAL_BLOCKDEVICE=1",
"MBED_CLOUD_CLIENT_UPDATE_STORAGE=ARM_UCP_FLASHIAP_BLOCKDEVICE"
],
"target_overrides": {
"*": {
"platform.stdio-baud-rate" : 115200,
"platform.stdio-flush-at-exit": false,
"update-client.storage-address" : "(1024*1024*64)",
"update-client.storage-size" : "((MBED_ROM_START + MBED_ROM_SIZE - MBED_CONF_MBED_BOOTLOADER_APPLICATION_START_ADDRESS) * MBED_CONF_UPDATE_CLIENT_STORAGE_LOCATIONS)",
"update-client.storage-locations": 1,
"update-client.firmware-header-version": "2",
"sd.CRC_ENABLED": 0,
"mbed-bootloader.use-kvstore-rot": 0,
"target.extra_labels_remove": [ "WICED", "CORDIO", "PSA", "MBED_SPM" ]
},
"K64F": {
"update-client.application-details" : "(MBED_ROM_START+1020*1024)",
"mbed-bootloader.application-start-address": "(MBED_ROM_START+40*1024)"
}
}
}
23 changes: 23 additions & 0 deletions configs/test_configs/header_separate_before_app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"macros": [
"ARM_UC_USE_PAL_BLOCKDEVICE=1",
"MBED_CLOUD_CLIENT_UPDATE_STORAGE=ARM_UCP_FLASHIAP_BLOCKDEVICE"
],
"target_overrides": {
"*": {
"platform.stdio-baud-rate" : 115200,
"platform.stdio-flush-at-exit": false,
"update-client.storage-address" : "(1024*1024*64)",
"update-client.storage-size" : "((MBED_ROM_START + MBED_ROM_SIZE - MBED_CONF_MBED_BOOTLOADER_APPLICATION_START_ADDRESS) * MBED_CONF_UPDATE_CLIENT_STORAGE_LOCATIONS)",
"update-client.storage-locations": 1,
"update-client.firmware-header-version": "2",
"sd.CRC_ENABLED": 0,
"mbed-bootloader.use-kvstore-rot": 0,
"target.extra_labels_remove": [ "WICED", "CORDIO", "PSA", "MBED_SPM" ]
},
"K64F": {
"update-client.application-details" : "(MBED_ROM_START+32*1024)",
"mbed-bootloader.application-start-address": "(MBED_ROM_START+40*1024)"
}
}
}
24 changes: 24 additions & 0 deletions configs/test_configs/power_cut_test.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"macros": [
"ARM_UC_USE_PAL_BLOCKDEVICE=1",
"MBED_CLOUD_CLIENT_UPDATE_STORAGE=ARM_UCP_FLASHIAP_BLOCKDEVICE",
"BOOTLOADER_POWER_CUT_TEST=1"
],
"target_overrides": {
"*": {
"platform.stdio-baud-rate": 9600,
"platform.stdio-flush-at-exit": false,
"update-client.storage-address": "1024*1024*64",
"update-client.storage-size": "1024*1024",
"update-client.storage-locations": 1,
"update-client.firmware-header-version": "2",
"sd.CRC_ENABLED": 0,
"mbed-bootloader.use-kvstore-rot": 0,
"target.extra_labels_remove": [ "WICED", "CORDIO", "PSA", "MBED_SPM" ]
},
"K64F": {
"update-client.application-details" : "128*1024",
"mbed-bootloader.application-start-address": "129*1024"
}
}
}
2 changes: 1 addition & 1 deletion mbed-os.lib
Original file line number Diff line number Diff line change
@@ -1 +1 @@
https://github.com/ARMmbed/mbed-os/#0f959dbe4749c20416236e4fe1dac5692cbe18ab
https://github.com/ARMmbed/mbed-os/#7482462434d5cf718177653ef797547a976a7c5e
Loading

0 comments on commit e18ae77

Please sign in to comment.