hi, i need to compile the zstack projects with cc2538SF23, also if I change the device in processor variants I have a 512KB file as output, but the SF23 variant has 256KB, witch file must be changed and how?
thanks
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.
hi, i need to compile the zstack projects with cc2538SF23, also if I change the device in processor variants I have a 512KB file as output, but the SF23 variant has 256KB, witch file must be changed and how?
thanks
Hello Giuseppe,
Thre are few changes required along with changing the linker file CC2538.icf. I will provide you the modified file tomorrow.
Regards,
i've copied the icf of another project, but with this i've 100 KB:
/*###ICF### Section handled by ICF editor, don't touch! ****/
/*-Editor annotation file-*/
/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
/*-Specials-*/
define symbol __ICFEDIT_intvec_start__ = 0x00200000;
/*-Memory Regions-*/
define symbol __ICFEDIT_region_ROM_start__ = 0x00200000;
define symbol __ICFEDIT_region_ROM_end__ = 0x0023ffd3;
define symbol __ICFEDIT_region_RAM_start__ = 0x20000000;
define symbol __ICFEDIT_region_RAM_end__ = 0x20007FFF;
/*-Sizes-*/
define symbol __ICFEDIT_size_cstack__ = 0x800;
define symbol __ICFEDIT_size_heap__ = 0x1000;
/**** End of ICF editor section. ###ICF###*/
//
// Define a memory region that covers the entire 4 GB addressible space of the
// processor.
//
define memory mem with size = 4G;
//
// Define a region for the on-chip flash.
// This device has 256KB Flash size
//
define region FLASH = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
//
// Define a region for Customer Configuration Area in flash.
//
define region FLASH_CCA = mem:[from 0x0023ffd4 to 0x0023ffdf];
//
// Define a region for the on-chip SRAM.
// This device has 32KB RAM size
//
define region SRAM = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
//
// Define regions of retention and non-retention RAM. The stack and other
// variables that require retention through PM2/3 should be placed in the
// retention RAM region
//
define region SRAM_NON_RETENTION = mem:[from __ICFEDIT_region_RAM_start__ to 0x20003fff];
define region SRAM_RETENTION = mem:[from 0x20004000 to __ICFEDIT_region_RAM_end__];
//
// Define a block for the heap. The size should be set to something other
// than zero if things in the C library that require the heap are used.
//
define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
//
// Indicate that the read/write values should be initialized by copying from
// flash.
//
initialize by copy { readwrite };
//
// Indicate that the noinit values should be left alone.
//
do not initialize { section .noinit };
//
// Place the interrupt vectors at the start of flash.
//
place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
//
// Place the cca area at the end of flash (start of FLASH_CCA).
//
place at start of FLASH_CCA { readonly section .flashcca };
//
// Place the remainder of the read-only items into flash.
//
place in FLASH { readonly };
//
// Place the RAM vector table at the start of retention ram.
//
place at start of SRAM_RETENTION { section VTABLE };
//
// Place all read/write items into retention SRAM.
//
place in SRAM_RETENTION { readwrite, block HEAP };
//
// Define CSTACK block to contain .stack section. This enables the IAR IDE
// to properly show the stack content during debug. Place stack at end of
// retention RAM, do not initialize (initializing the stack will destroy the
// return address from the initialization code, causing the processor to branch
// to zero and fault)
//
define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { section .stack };
do not initialize { section .stack };
place at end of SRAM_RETENTION { block CSTACK };
//
// Export stack top symbol. Used by startup file.
//
define exported symbol STACK_TOP = __ICFEDIT_region_RAM_end__ + 1;
//
// Variables that do not need retention should be defined here
//
place in SRAM_NON_RETENTION { section .nonretenvar };
Hello Giuseppe,
Please use the attached linker file that you can use for the 256K Flash Device.
Also, you would need to change the device type in IAR by going to Project Tab within IAR --> Project Options. Then in the pop up window select the correct device. Also ensure that the device descriptor file within the Debugger category in this window is for correct device.
http://e2e.ti.com/cfs-file.ashx/__key/communityserver-discussions-components-files/158/3660.CC2538.icf
Regards,
hi, thanks for ypur answer, sorry but i don't understand what you mean:
Suyash Jain said:Also ensure that the device descriptor file within the Debugger category in this window is for correct device.
i've changed the device with TexasInstruments CM2538SF53 and copied the code in the file you linked in tools/cc2538.icf,so now? what else should i do?
thanks again
edit:
done, thanks!!
sorry, but the program seems to lock at the instruction MAC_RADIO_TIMER_WAKE_UP, could it be a problem of the radio? i'm using a custom board with a pcb antenna designed like the one on cc2538EM
hi Suyash, no, could it be an hardware issue? or sbout compiling problems(the original program was for the SF53)? I'm making a new board to try the radio section.
thanks for your help!!
Hi Giuseppe ,
I am also facing same issue.
We are currently using Evaluation module CC2538EM of TI for development purpose which is having CC2538SF53(512k flash) Controller on it.
And firmware of our project is developed on same evaluation board, which needs to be migrated now to our custom board which is having CC2538SF23(256k flash) controller on it.
As per your guidelines we have modified icf file in firmware of CC2538SF53 controller and tried to flash the code in CC2538SF23 controller through IAR debugger.
But we are getting error messages as below,
Unloaded macro file: C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.2\arm\config\flashloader\TexasInstruments\FlashCC2538.mac
The flash loader program reported an error.
If you have resolved issue Please let me know the changes.
Thanks,
sagar