Import Mbed OS hard-float snapshot
This commit is contained in:
42
storage/kvstore/kv_config/filesystem/mbed_lib.json
Normal file
42
storage/kvstore/kv_config/filesystem/mbed_lib.json
Normal file
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"name": "storage_filesystem",
|
||||
"config": {
|
||||
"rbp_internal_size": {
|
||||
"help": "Default is the larger of the last 2 sectors or last 14 pages of flash.",
|
||||
"value": "0"
|
||||
},
|
||||
"internal_base_address": {
|
||||
"help": "If default, base address is set to internal_size bytes before the end of flash.",
|
||||
"value": "0"
|
||||
},
|
||||
"filesystem": {
|
||||
"help": "Options are default, FAT or LITTLE. If default value the filesystem is chosen by the blockdevice type",
|
||||
"value": "default"
|
||||
},
|
||||
"blockdevice": {
|
||||
"help": "Options are default, SPIF, DATAFASH, QSPIF, SD or other. If default, the block device will be chosen according to the component defined in targets.json. If other, override get_other_blockdevice() to support block device out of Mbed OS tree.",
|
||||
"value": "default"
|
||||
},
|
||||
"external_size": {
|
||||
"help": "Size in bytes of the external block device, if default value, the maximum size available is used.",
|
||||
"value": "0"
|
||||
},
|
||||
"external_base_address": {
|
||||
"help": "The default will set start address to address 0",
|
||||
"value": "0"
|
||||
},
|
||||
"mount_point": {
|
||||
"help": "Where to mount the filesystem.",
|
||||
"value": "kv"
|
||||
},
|
||||
"folder_path": {
|
||||
"help": "Path for the working directory where the FileSystemStore stores the data",
|
||||
"value": "kvstore"
|
||||
}
|
||||
},
|
||||
"target_overrides": {
|
||||
"MCU_PSOC6": {
|
||||
"rbp_internal_size": "7168"
|
||||
}
|
||||
}
|
||||
}
|
||||
29
storage/kvstore/kv_config/filesystem_no_rbp/mbed_lib.json
Normal file
29
storage/kvstore/kv_config/filesystem_no_rbp/mbed_lib.json
Normal file
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"name": "storage_filesystem_no_rbp",
|
||||
"config": {
|
||||
"filesystem": {
|
||||
"help": "Options are default, FAT or LITTLE. If default value the filesystem is chosen by the blockdevice type",
|
||||
"value": "default"
|
||||
},
|
||||
"blockdevice": {
|
||||
"help": "Options are default, SPIF, DATAFLASH, QSPIF, SD or other. If default the block device will be chosen by the defined component. If other, override get_other_blockdevice() to support block device out of Mbed OS tree.",
|
||||
"value": "default"
|
||||
},
|
||||
"external_size": {
|
||||
"help": "Size in bytes of the external block device, if default the maximum size available is used.",
|
||||
"value": "0"
|
||||
},
|
||||
"external_base_address": {
|
||||
"help": "The default will set start address to address 0",
|
||||
"value": "0"
|
||||
},
|
||||
"mount_point": {
|
||||
"help": "Where to mount the filesystem.",
|
||||
"value": "kv"
|
||||
},
|
||||
"folder_path": {
|
||||
"help": "Path for the working directory where the FileSystemStore stores the data",
|
||||
"value": "kvstore"
|
||||
}
|
||||
}
|
||||
}
|
||||
48
storage/kvstore/kv_config/global/mbed_lib.json
Normal file
48
storage/kvstore/kv_config/global/mbed_lib.json
Normal file
@@ -0,0 +1,48 @@
|
||||
{
|
||||
"name": "storage",
|
||||
"config": {
|
||||
"storage_type": {
|
||||
"help": "Options are TDB_INTERNAL, TDB_EXTERNAL, TDB_EXTERNAL_NO_RBP, FILESYSTEM, FILESYSTEM_NO_RBP or default. If default, the storage type will be chosen according to the component defined in targets.json",
|
||||
"value": "default"
|
||||
},
|
||||
"default_kv": {
|
||||
"help": "A string name for the default kvstore configuration",
|
||||
"value": "kv"
|
||||
}
|
||||
},
|
||||
"target_overrides": {
|
||||
"HANI_IOT": {
|
||||
"storage_type": "TDB_INTERNAL"
|
||||
},
|
||||
"K66F": {
|
||||
"storage_type": "TDB_INTERNAL"
|
||||
},
|
||||
"NUCLEO_F411RE": {
|
||||
"storage_type": "TDB_INTERNAL"
|
||||
},
|
||||
"NUCLEO_F429ZI": {
|
||||
"storage_type": "TDB_INTERNAL"
|
||||
},
|
||||
"NUCLEO_H743ZI": {
|
||||
"storage_type": "TDB_INTERNAL"
|
||||
},
|
||||
"NUCLEO_H743ZI2": {
|
||||
"storage_type": "TDB_INTERNAL"
|
||||
},
|
||||
"DISCO_H747I": {
|
||||
"storage_type": "TDB_INTERNAL"
|
||||
},
|
||||
"DISCO_H747I_CM4": {
|
||||
"storage_type": "TDB_INTERNAL"
|
||||
},
|
||||
"LPC55S69_S": {
|
||||
"storage_type": "TDB_INTERNAL"
|
||||
},
|
||||
"ARM_MUSCA_A1_S": {
|
||||
"storage_type": "TDB_INTERNAL"
|
||||
},
|
||||
"ARM_MUSCA_B1_S": {
|
||||
"storage_type": "TDB_INTERNAL"
|
||||
}
|
||||
}
|
||||
}
|
||||
76
storage/kvstore/kv_config/include/kv_config/kv_config.h
Normal file
76
storage/kvstore/kv_config/include/kv_config/kv_config.h
Normal file
@@ -0,0 +1,76 @@
|
||||
/*
|
||||
* Copyright (c) 2018 ARM Limited. All rights reserved.
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
#ifndef _KV_CONFIG
|
||||
#define _KV_CONFIG
|
||||
|
||||
#include "blockdevice/BlockDevice.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef MBED_CONF_STORAGE_STORAGE
|
||||
#define MBED_CONF_STORAGE_STORAGE USER_DEFINED
|
||||
#endif
|
||||
|
||||
#define _STORAGE_CONFIG_concat(dev) _storage_config_##dev()
|
||||
#define _STORAGE_CONFIG(dev) _STORAGE_CONFIG_concat(dev)
|
||||
|
||||
/**
|
||||
* @brief This function initializes one of the configuration that exists in Mbed OS. To overwrite
|
||||
* the default configuration, please overwrite this function.
|
||||
*
|
||||
* @returns 0 on success or negative value on failure.
|
||||
*/
|
||||
int kv_init_storage_config();
|
||||
|
||||
/**
|
||||
* @brief A getter for filesystemstore folder path configuration
|
||||
*
|
||||
* @returns string with the file folder path or NULL if not set
|
||||
*/
|
||||
const char *get_filesystemstore_folder_path();
|
||||
|
||||
/**
|
||||
* @brief Get the default TDBStore flash start address and size.
|
||||
*
|
||||
* @param[out] start_address Default TDBStore start address in flash.
|
||||
* @param[out] size Default TDBStore size.
|
||||
*
|
||||
* @returns MBED_SUCCESS Success.
|
||||
* MBED_ERROR_INITIALIZATION_FAILED Failed to initialize flash driver.
|
||||
* MBED_ERROR_MEDIA_FULL Default TDBStore space overlaps with program memory.
|
||||
*/
|
||||
int kv_get_default_flash_addresses(mbed::bd_addr_t *start_address, mbed::bd_size_t *size);
|
||||
|
||||
/**
|
||||
* @brief Get the TDBStore flash bounds from the configured start address and size.
|
||||
*
|
||||
* @param[inout] start_address Configured TDBStore start address in flash.
|
||||
* @param[inout] size Configured TDBStore size. If 0, the size will be from the start address to the end of flash
|
||||
*
|
||||
* @returns MBED_SUCCESS Success.
|
||||
* MBED_ERROR_INVALID_ARGUMENT One of the arguments is NULL or both the configured start address and size are 0.
|
||||
* MBED_ERROR_INITIALIZATION_FAILED Failed to initialize flash driver.
|
||||
* MBED_ERROR_INVALID_SIZE Configured size results in misaligned start/end address or end address past the end of flash.
|
||||
* MBED_ERROR_MEDIA_FULL Configured start address/size results in bounds overlapping with program memory.
|
||||
*/
|
||||
int kv_get_flash_bounds_from_config(mbed::bd_addr_t *start_address, mbed::bd_size_t *size);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // closing brace for extern "C"
|
||||
#endif
|
||||
#endif
|
||||
3
storage/kvstore/kv_config/mbed_lib.json
Normal file
3
storage/kvstore/kv_config/mbed_lib.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"name": "kv-config"
|
||||
}
|
||||
1123
storage/kvstore/kv_config/source/kv_config.cpp
Normal file
1123
storage/kvstore/kv_config/source/kv_config.cpp
Normal file
File diff suppressed because it is too large
Load Diff
30
storage/kvstore/kv_config/tdb_external/mbed_lib.json
Normal file
30
storage/kvstore/kv_config/tdb_external/mbed_lib.json
Normal file
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"name": "storage_tdb_external",
|
||||
"config": {
|
||||
"rbp_internal_size": {
|
||||
"help": "Default is the larger of the last 2 sectors or last 14 pages of flash.",
|
||||
"value": "0"
|
||||
},
|
||||
"internal_base_address": {
|
||||
"help": "If default, the base address is set to internal_size bytes before the end of flash.",
|
||||
"value": "0"
|
||||
},
|
||||
"blockdevice": {
|
||||
"help": "Options are default, SPIF, DATAFASH, QSPIF, SD or other. If default the block device will be chosen by the defined component. If other, override get_other_blockdevice() to support block device out of Mbed OS tree.",
|
||||
"value": "default"
|
||||
},
|
||||
"external_size": {
|
||||
"help": "Size in bytes of the external block device, if default the maximum size available is used.",
|
||||
"value": "0"
|
||||
},
|
||||
"external_base_address": {
|
||||
"help": "The default will set start address to address 0",
|
||||
"value": "0"
|
||||
}
|
||||
},
|
||||
"target_overrides": {
|
||||
"MCU_PSOC6": {
|
||||
"rbp_internal_size": "7168"
|
||||
}
|
||||
}
|
||||
}
|
||||
17
storage/kvstore/kv_config/tdb_external_no_rbp/mbed_lib.json
Normal file
17
storage/kvstore/kv_config/tdb_external_no_rbp/mbed_lib.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"name": "storage_tdb_external_no_rbp",
|
||||
"config": {
|
||||
"blockdevice": {
|
||||
"help": "Options are default, SPIF, DATAFASH, QSPIF, SD or other. If default the block device will be chosen by the defined component. If other, override get_other_blockdevice() to support block device out of Mbed OS tree.",
|
||||
"value": "default"
|
||||
},
|
||||
"external_size": {
|
||||
"help": "Size in bytes of the external block device, if default the maximum size available is used.",
|
||||
"value": "0"
|
||||
},
|
||||
"external_base_address": {
|
||||
"help": "The default will set start address to address 0",
|
||||
"value": "0"
|
||||
}
|
||||
}
|
||||
}
|
||||
50
storage/kvstore/kv_config/tdb_internal/mbed_lib.json
Normal file
50
storage/kvstore/kv_config/tdb_internal/mbed_lib.json
Normal file
@@ -0,0 +1,50 @@
|
||||
{
|
||||
"name": "storage_tdb_internal",
|
||||
"config": {
|
||||
"internal_size": {
|
||||
"help": "Size of the FlashIAP block device. Default size will be the larger of the last 2 sectors or last 14 pages of flash.",
|
||||
"value": "0"
|
||||
},
|
||||
"internal_base_address": {
|
||||
"help": "If default, the base address is set to internal_size bytes before the end of flash.",
|
||||
"value": "0"
|
||||
}
|
||||
},
|
||||
"target_overrides": {
|
||||
"LPC55S69_S": {
|
||||
"internal_size": "0x8000",
|
||||
"internal_base_address": "0x00028000"
|
||||
},
|
||||
"LPC55S69_NS": {
|
||||
"internal_size": "0x8000",
|
||||
"internal_base_address": "0x00090000"
|
||||
},
|
||||
"DISCO_H747I": {
|
||||
"internal_size": "2*FLASH_SECTOR_SIZE",
|
||||
"internal_base_address": "0x080C0000"
|
||||
},
|
||||
"ARM_MUSCA_A1_S": {
|
||||
"internal_size": "0x8000",
|
||||
"internal_base_address": "0x00420000"
|
||||
},
|
||||
"ARM_MUSCA_B1_S": {
|
||||
"internal_size": "0x8000",
|
||||
"internal_base_address": "0x10000000"
|
||||
},
|
||||
"FVP_MPS2": {
|
||||
"internal_size": "0x200000",
|
||||
"internal_base_address": "0x00200000"
|
||||
},
|
||||
"NU_PFM_M2351_S": {
|
||||
"internal_size": "0x8000",
|
||||
"internal_base_address": "(PSA_SECURE_ROM_START + PSA_SECURE_ROM_SIZE - 0x1000 - MBED_CONF_STORAGE_TDB_INTERNAL_INTERNAL_SIZE)"
|
||||
},
|
||||
"MCU_PSOC6": {
|
||||
"internal_size": "0x10000"
|
||||
},
|
||||
"CYTFM_064B0S2_4343W": {
|
||||
"internal_size": "0x8000",
|
||||
"internal_base_address": "0x10168000"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user