Mayank Gupta / Mbed OS pelion-example-frdm

Dependencies:   FXAS21002 FXOS8700Q

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers arm_uc_mmConfig.h Source File

arm_uc_mmConfig.h

00001 // ----------------------------------------------------------------------------
00002 // Copyright 2016-2017 ARM Ltd.
00003 //
00004 // SPDX-License-Identifier: Apache-2.0
00005 //
00006 // Licensed under the Apache License, Version 2.0 (the "License");
00007 // you may not use this file except in compliance with the License.
00008 // You may obtain a copy of the License at
00009 //
00010 //     http://www.apache.org/licenses/LICENSE-2.0
00011 //
00012 // Unless required by applicable law or agreed to in writing, software
00013 // distributed under the License is distributed on an "AS IS" BASIS,
00014 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00015 // See the License for the specific language governing permissions and
00016 // limitations under the License.
00017 // ----------------------------------------------------------------------------
00018 
00019 #ifndef MANIFEST_MANAGER_CONFIG_H
00020 #define MANIFEST_MANAGER_CONFIG_H
00021 
00022 #include <limits.h>
00023 #include "update-client-common/arm_uc_config.h"
00024 
00025 #define MAX_HASH_BYTES 32
00026 #define MAX_SYMM_KEY_BYTES 16
00027 // #define ECC_SIG_BYTES 71
00028 #define MAX_URI_BYTES 128
00029 
00030 #define MANIFEST_SUPPORTED_VERSION 1
00031 #define MANIFEST_MANAGER_NO_STORAGE 1
00032 
00033 #ifndef ARM_UC_MM_ENABLE_TEST_VECTORS
00034 #define ARM_UC_MM_ENABLE_TEST_VECTORS 0
00035 #endif
00036 
00037 #ifndef ARM_UC_MM_ENABLE_INSERT_TEST_VECTORS
00038 #define ARM_UC_MM_ENABLE_INSERT_TEST_VECTORS 0
00039 #endif
00040 
00041 #define RFC_4122_BYTES (128/CHAR_BIT)
00042 #define RFC_4122_WORDS (RFC_4122_BYTES/sizeof(uint32_t))
00043 
00044 #define CERT_MAX_STORAGE 1024
00045 #define CA_PREFIX       "com.arm.mbed.update.mm.ca"
00046 #define MANIFEST_PREFIX "com.arm.mbed.update.mm.m"
00047 
00048 #define MANIFEST_ROLLBACK_PROTECTION 0
00049 
00050 #define CFSTORE_HASH_ID_SIZE ((((256 + CHAR_BIT - 1) / CHAR_BIT + 2) / 3) * 4 + 1)
00051 
00052 #define MANIFEST_STORAGE_RETENTION_LEVEL ARM_RETENTION_NVM
00053 // TODO: Enable ACLs for manifest storage
00054 #define MANIFEST_STORAGE_ACLS_ENABLED 0
00055 // TODO: Enable lazy flush
00056 #define MANIFEST_STORAGE_LAZY_FLUSH_ENABLED 0
00057 // TODO: Enable flush-on-close
00058 #define MANIFEST_STORAGE_FLUSH_ON_CLOSE_ENABLED 0
00059 // TODO: Enable storage-detect
00060 #define MANIFEST_STORAGE_STORAGE_DETECT_ENABLED 0
00061 // TODO: Enable async callbacks for config store
00062 #define MFST_ASYNC_KV_ASYNC 1
00063 #endif // MANIFEST_MANAGER_CONFIG_H