/* This function determines the size of the flash on the Tiva device. */
uint32_t SysCtlFlashSizeGet(void)
/* This function determines the size of the flash on the Tiva device. */
uint32_t SysCtlFlashSizeGet(void)
{
    if(CLASS_IS_TM4C123)
    {
        return(((HWREG(SYSCTL_DC0) & SYSCTL_DC0_FLASHSZ_M) << 11) + 0x800);
    }
    else
    {
        return(2048 * ((HWREG(FLASH_PP) & FLASH_PP_SIZE_M) + 1));
    }
}