1 /** 2 ****************************************************************************** 3 * @file otp_provision.c 4 * @author MCD Application Team 5 * @brief File provisionning otp value 6 * 7 * 8 ****************************************************************************** 9 * @attention 10 * 11 * <h2><center>© Copyright (c) 2020-2021 STMicroelectronics. 12 * All rights reserved.</center></h2> 13 * 14 * This software component is licensed by ST under BSD 3-Clause license, 15 * the "License"; You may not use this file except in compliance with the 16 * License. You may obtain a copy of the License at: 17 * opensource.org/licenses/BSD-3-Clause 18 * 19 ****************************************************************************** 20 */ 21 22 #include "nv_counters.h" 23 #define INT2LE(A) (uint8_t)(A & 0xFF), (uint8_t )((A >> 8) & 0xFF),\ 24 (uint8_t )((A >> 16) & 0xFF), (uint8_t )((A >> 24) & 0xFF) 25 26 27 #if defined(__ICCARM__) 28 __root 29 #endif 30 #if defined(__ICCARM__) 31 #pragma default_function_attributes = @ ".BL2_NVMCNT_Const" 32 #else 33 __attribute__((section(".BL2_NVMCNT_Const"))) 34 #endif /* __ICCARM__ */ 35 const struct nv_counters_t nvmcnt_init = { 36 .checksum = NV_COUNTERS_INITIALIZED, 37 .init_value = NV_COUNTERS_INITIALIZED, 38 .counters = { 0, 0, 0, 0, 0, 0 } 39 }; 40