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.

CCS/cc1310: i can not write to flash from my application

Part Number: CC1310
Other Parts Discussed in Thread: CC1310

Tool/software: Code Composer Studio

hi
I am trying to write to flash memory
and I am using an example that I found in the forum, that example is the following :

/////////////////////////////////////////////////

void writeToFlash(void)
{
int32_t result;

/* Disable the cache */
VIMSModeSet(VIMS_BASE, VIMS_MODE_DISABLED);
while(VIMSModeGet(VIMS_BASE) != VIMS_MODE_DISABLED);

/* Make sure that sector isn't write protected. */
result = FlashProtectionGet(SECTOR_TO_ERASE_START_ADDR);
if(result == FLASH_WRITE_PROTECT)
{
while (1);
}

/* Disable all interrupts when accessing the flash */
CPUcpsid();

/* Erase a flash Page */
result = FlashSectorErase(SECTOR_TO_ERASE_START_ADDR); //SECTOR_TO_ERASE_START_ADDR =FLASHMEM_BASE + (SECTOR_TO_ERASE * SECTOR_SIZE)
//SECTOR_SIZE = 4096
//SECTOR_TO_ERASE = 14
if(result != FAPI_STATUS_SUCCESS)
{
while (1);
}

/* Program 128 bytes in chunks of 8 bytes */
for( i = 0; i < 32; i += 8)
{
/* Write to flash */
result = FlashProgram(&packet[i], SECTOR_TO_ERASE_START_ADDR + i, 8);

if(result != FAPI_STATUS_SUCCESS)
{
while (1);
}
}

CPUcpsie();

/* Re-enable the cache */
VIMSModeSet(VIMS_BASE, VIMS_MODE_ENABLED);
}

////////////////////////////////////////////////


but when I try to compile I get this error :

///////////////////////////////////////

#10010 errors encountered during linking; "myapplication.out" not built 
<a href="processors.wiki.ti.com/.../10234"> unresolved symbols remain
gmake: *** [all] Error 2
gmake[1]: *** [myapplication.out] Error 1 
unresolved symbol FlashProgram, first referenced in ./myapplication.obj
unresolved symbol FlashProtectionGet, first referenced in ./myapplication.obj 
unresolved symbol FlashSectorErase, first referenced in ./myapplication.obj 

/////////////////////////////////////


I think I need to refer to the library but I do not know how to specify it. Please help someone.

Luis Valseca