/*
 *  ======== ti_devices_config.c ========
 *  Customer Configuration for CC27XX devices.
 *
 *  DO NOT EDIT - This file is generated by the SysConfig tool.
 *
 */


#include <ti/devices/DeviceFamily.h>
#include DeviceFamily_constructPath(inc/hw_ccfg.h)
#include DeviceFamily_constructPath(inc/hw_scfg.h)
extern void (*const resetVectors[])(void);

#if defined(__IAR_SYSTEMS_ICC__)
__root const ccfg_t ccfg @ ".ccfg" =
#elif defined(__TI_COMPILER_VERSION__)
#pragma DATA_SECTION(ccfg, ".ccfg")
#pragma RETAIN(ccfg)
const ccfg_t ccfg =
#elif defined(__llvm__)
const ccfg_t ccfg __attribute__((section(".ccfg"), retain)) =
#else
const ccfg_t ccfg __attribute__((section(".ccfg"), used)) =
#endif
{
    .bootCfg.pBldrVtor = CCFG_BC_PBLDR_USE_FCFG,

    .bootCfg.bldrParam.serialRomBldrParamStruct.bldrEnabled = XCFG_BC_BLDR_DIS,
    .bootCfg.bldrParam.serialRomBldrParamStruct.serialIoCfgIndex = 0,
    .bootCfg.bldrParam.serialRomBldrParamStruct.pinTriggerDio = 0,
    .bootCfg.bldrParam.serialRomBldrParamStruct.pinTriggerEnabled = XCFG_BC_PINTRIG_DIS,
    .bootCfg.bldrParam.serialRomBldrParamStruct.pinTriggerLevel = XCFG_BC_PINTRIG_LEVEL_LO,
    .bootCfg.pAppVtor = (void*)&resetVectors,

    /* Set to 0. This checksum must be calculated and updated prior to
     * programming the application to the device (this is normally handled as a
     * post-build step, or by the flashloader).
     */
    .bootCfg.crc32 = 0x00000000,

    .res0 = {0xFFFFFFFF, 0xFFFFFFFF},

    .permissions.allowDebugPort = CCFG_PERMISSION_ALLOW,
    .permissions.allowEnergyTrace = CCFG_PERMISSION_ALLOW,
    .permissions.allowFlashVerify = CCFG_PERMISSION_ALLOW,
    .permissions.allowFlashProgram = CCFG_PERMISSION_ALLOW,
    .permissions.allowChipErase = CCFG_PERMISSION_ALLOW,
    .permissions.allowToolsClientMode = CCFG_PERMISSION_ALLOW,
    .permissions.allowFakeStby = CCFG_PERMISSION_ALLOW,
    .permissions.allowReturnToFactory = CCFG_PERMISSION_ALLOW,

    .misc.saciTimeoutOverride = 0U,

    .misc.allowMainAppErase    = CCFG_PERMISSION_ALLOW,

    .flashProt.writeEraseProt.mainSectors0_31 = 0xffffffff,
    .flashProt.writeEraseProt.mainSectors32_255 = 0xffffffff,
    .flashProt.writeEraseProt.mainSectors256_511 = 0xffffffff,

    .flashProt.writeEraseProt.ccfgSector = 0,
    .flashProt.writeEraseProt.fcfgSector = 0,
    .flashProt.writeEraseProt.engrSector = 0,
    .flashProt.writeEraseProt.scfgSector = 0,
    .flashProt.writeEraseProt.vlogSector = 0,

    .flashProt.readProt.mainSectors = 0xf,
    .flashProt.readProt.ccfgSector = 0x3f,

    .flashProt.chipEraseRetain.mainSectors0_31 = 0x0,
    .flashProt.chipEraseRetain.mainSectors32_255 = 0x0,
    .flashProt.chipEraseRetain.mainSectors256_511 = 0xfc000000,

    /* Set to 0. This checksum (after bootCfg through hwInitCopyList) must be
     * calculated and updated prior to programming the application to the device
     * (this is normally handled as a post-build step, or by the flashloader).
     */
    .crc32 = 0x00000000,

    /* No user record */

    .debugCfg.authorization = CCFG_DBGAUTH_DBGOPEN,

    /* Set to 0. This checksum must be calculated and updated prior to
     * programming the application to the device (this is normally handled as a
     * post-build step, or by the flashloader).
     */
    .debugCfg.crc32 = 0x00000000,
};

#if defined(__IAR_SYSTEMS_ICC__)
__root const scfg_t scfg @ ".scfg" =
#elif defined(__TI_COMPILER_VERSION__)
#pragma DATA_SECTION(scfg, ".scfg")
#pragma RETAIN(scfg)
const scfg_t scfg =
#elif defined(__llvm__)
/* Push current set of diagnostics */
#pragma clang diagnostic push
/* Ignore warnings about overriding struct members in the initialiser below.
 * This is required only for ticlang.
 */
#pragma clang diagnostic ignored "-Winitializer-overrides"
const scfg_t scfg __attribute__((section(".scfg"), retain)) =
#else
const scfg_t scfg __attribute__((section(".scfg"), used)) =
#endif
{
    SCFG_DEFAULT_VALUES,

    /* Overwrite default SCFG values */
    .hsmCfg.publicKeyHash = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
                             0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
                             0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
                             0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff},
    .keyRingCfg = {
        .keyEntries = {
            { SCFG_INVALID_KEY_ENTRY },
            { SCFG_INVALID_KEY_ENTRY },
            { SCFG_INVALID_KEY_ENTRY },
            { SCFG_INVALID_KEY_ENTRY },
            { SCFG_INVALID_KEY_ENTRY },
            { SCFG_INVALID_KEY_ENTRY },
            { SCFG_INVALID_KEY_ENTRY },
            { SCFG_INVALID_KEY_ENTRY },
            { SCFG_INVALID_KEY_ENTRY },
            { SCFG_INVALID_KEY_ENTRY },
            { SCFG_INVALID_KEY_ENTRY },
            { SCFG_INVALID_KEY_ENTRY },
            { SCFG_INVALID_KEY_ENTRY },
            { SCFG_INVALID_KEY_ENTRY },
            { SCFG_INVALID_KEY_ENTRY },
            { SCFG_INVALID_KEY_ENTRY },
            { SCFG_INVALID_KEY_ENTRY },
            { SCFG_INVALID_KEY_ENTRY },
        },
    },

    /* Set to 0. This checksum must be calculated and updated prior to
     * programming the application to the device (this is normally handled as a
     * post-build step, or by the flashloader).
     */
    .crc32 = 0x00000000,
};

#ifdef __llvm__
/* Restore the original set of diagnostics */
#pragma clang diagnostic pop
#endif
