Tool/software: Starterware
Hello,
I have an issue with updating the firmware on the internal flash. The code is port from stellaris controller. I am able to bring up tm4c129 controller, connect to cloud, initialize the file system and do some RF processing too.But now i have an issue while triggering an firmware update. I am downloading the new fw update to external flash file system.
My linker script addressing is as follows :
BOOT (rx) : ORIGIN = 0x00000000, LENGTH = 0x00007FF0 /
BOOTINFO (rx) : ORIGIN = 0x00007FF0, LENGTH = 0x00000010
FLASH (rx) : ORIGIN = 0x00008000, LENGTH = 0x00073BC0
FLASHINFO (rx) : ORIGIN = 0x0007BBC0, LENGTH = 0x00000040
FACTORY (rx) : ORIGIN = 0x0007BC00, LENGTH = 0x00000400
CFG (rx) : ORIGIN = 0x0007C000, LENGTH = 0x00005000
I have a custom update code in the bootloader which will check on reboot and update if necessary.
while (offset < fe->filesize) { FlashErase(start + offset); // start is app start address which is 0x8000 and offset is 0 initially offset += 1024; // 1kb size }
What i notice is that the data in 0x7bbc0 to 0x7bbf4 is there but the rest from 0x7bbf8 is erased and is -1 or ff including the Factory block and CFG block.
I have no idea what the issue is.
Also the same problem i notice when using openocd for flashing the code. So i need to fully erase entire flash and re flash. My openocd version is
Open On-Chip Debugger 0.10.0-dev-00419-gbcaf775 (2016-11-23-16:36)
Licensed under GNU GPL v2
My .gdbinit has
reset
monitor flash write_image erase firmware.axf
Any help will be be greatful.
Thank you
Kumar