Hi,
i am using ccsv6 and CC1310. I want to use internal FLASH for data storage. So i have to declare my data in flash and than
copy it to RAM for modification and so on. But i have a problem in reading form internal FLASH.
I have modified memory map and make new section in cc13x0f128.cmd. I want to put ma data to .devcfg section.
/* The starting address of the application. Normally the interrupt vectors */
/* must be located at the beginning of the application. */
#define FLASH_BASE 0x0
#define FLASH_SIZE 0x1F000
#define RAM_BASE 0x20000000
#define RAM_SIZE 0x4000
#define APIRAM_BASE 0x20004000
#define APIRAM_SIZE 0x1000
//;#define GPRAM_BASE 0x11000000
//;#define GPRAM_SIZE 0x2000
/* System memory map */
MEMORY
{
/* Application stored in and executes from internal flash */
FLASH (RX) : origin = FLASH_BASE, length = FLASH_SIZE//-0x1000
/* Application uses internal RAM for data */
SRAM (RWX) : origin = RAM_BASE, length = RAM_SIZE
APISRAM (RWX) : origin = APIRAM_BASE, length = APIRAM_SIZE
/* Application can use GPRAM region as RAM if cache is disabled in the CCFG
(DEFAULT_CCFG_SIZE_AND_DIS_FLAGS.SET_CCFG_SIZE_AND_DIS_FLAGS_DIS_GPRAM = 0) */
//; GPRAM (RWX): origin = GPRAM_BASE, length = GPRAM_SIZE
CONFIGDEVDATA (RX) : origin = 0x1F000, length = 0x1000
}
/* Section allocation in memory */
SECTIONS
{
.intvecs : > FLASH_BASE
.text : > FLASH
.const : > FLASH
.constdata : > FLASH
.rodata : > FLASH
.cinit : > FLASH
.pinit : > FLASH
.init_array : > FLASH
.emb_text : > FLASH
.ccfg : > FLASH (HIGH)
.devcfg : > CONFIGDEVDATA
.vtable : > SRAM
.vtable_ram : > SRAM
vtable_ram : > SRAM
.data : > SRAM
.bss : > SRAM
.sysmem : > SRAM
.stack : > SRAM (HIGH)
.nonretenvar : > SRAM
.ramapifun : > APISRAM
//; .gpram : > GPRAM
}
In the code i declare DeviceFLASHConfig struct :
#pragma DATA_SECTION(DeviceFLASHConfig,".devcfg")
#pragma RETAIN(DeviceFLASHConfig)
DeviceFLASHConfigStruct DeviceFLASHConfig;
In memory map file after compilation DeviceFLASHConfig is properly placed in FLASH section .devcfg but
when i load my code via ccs debugger mode device hangs. I can not start it, after program is loaded device is started and only active button is STOP, after stopping it goes out from debug mode. When i comment DeviceFLASHConfig it is ok.
What could be the problem. In the code i do not use DeviceFLASHConfig struct, for now i just declared it to see if this works.
BR