This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TM4C129XNCZAD: Adding version details in bootloader

Part Number: TM4C129XNCZAD

Dear sir,

My bootloader rest on 0x0000 and application rest on 0x4000

I add t wo files to bootloader bl_version.c and bl_version.h.  but not able to write to to trhe flash memory of location 0x3F00.  This location i have to read through application software i am getting FF FF FF FF. 

bl_version.c  below code

#include "bl_version.h"

/* Mark as used so linker never removes it */
__attribute__((section(".BOOT_VER"), used))
const BL_VERSION_T BootloaderVersion =
{
    BL_MAGIC,
    BL_VER_MAJOR,
    BL_VER_MINOR,
    BL_VER_PATCH,
    0xFF
};

 

bl_version.h header file have

#ifndef __BL_VERSION_H__
#define __BL_VERSION_H__

#include <stdint.h>

#define BL_VER_MAJOR   1
#define BL_VER_MINOR   0
#define BL_VER_PATCH   0

#define BL_MAGIC       0xB00710AD
#define BL_VERSION_ADDR   0x00003F00

typedef struct
{
    uint32_t magic;
    uint8_t  major;
    uint8_t  minor;
    uint8_t  patch;
    uint8_t  reserved;
} BL_VERSION_T;

/* Version object defined in bl_version.c */
extern const BL_VERSION_T BootloaderVersion;

#endif /* __BL_VERSION_H__ */

 

scatter file is 

FLASH 0x00000000 0x00010000
{
    RESET 0x00000000 0x00003F00
    {
        *.o (RESET, +First)
        .ANY (+RO)
    }

    BOOT_VER 0x00003F00 0x00000100
    {
        *(.BOOT_VER)
    }

    SRAM 0x20000000 0x00010000
    {
        .ANY (+RW +ZI)
    }
}  

 

still show FF FF FF FF on memory location 0x3F00 

Kindly do the needful