-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Seppo Takalo
committed
Aug 12, 2019
1 parent
055c912
commit e18ae77
Showing
21 changed files
with
381 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,7 @@ | ||
.astyleignore | ||
.astylerc | ||
.git | ||
BUILD | ||
scripts | ||
mbed-os | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.