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.

[RM57 LaunchPad] FIQ_STACK stack pointer out of range



Dear community,

I'd like to use IAR EWARM to debug the projects for the RM57Lx LaunchPad. I tried this first with the Project0.

I got the following warning by debugging with XDS 110:

The stack pointer for stack 'FIQ_STACK' (currently 0x08002000) is outside the stack range (0x08002100 to 0x08002200)

I think the Linker properties must be modified in a proper way. But how to configure the Linker? Changing a the stack range seems to be dangerous. Is there any rule that should be followed?

Similar topics in the forum:

IAR stack outside of range

Good way to check stack size

The default settings of Linker in IAR EWARM:

/*###ICF### Section handled by ICF editor, don't touch! ****/
/*-Editor annotation file-*/
/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\a_v1_0.xml" */
/*-Specials-*/
define symbol __ICFEDIT_intvec_start__ = 0x00000000;
/*-Memory Regions-*/
define symbol __ICFEDIT_region_ROM_start__   = 0x00000040;
define symbol __ICFEDIT_region_ROM_end__     = 0x003FFFFF;
define symbol __ICFEDIT_region_RAM_start__   = 0x08000000;
define symbol __ICFEDIT_region_RAM_end__     = 0x0807FFFF;
/*-Sizes-*/
define symbol __ICFEDIT_size_cstack__   = 0x2000;
define symbol __ICFEDIT_size_svcstack__ = 0x100;
define symbol __ICFEDIT_size_irqstack__ = 0x100;
define symbol __ICFEDIT_size_fiqstack__ = 0x100;
define symbol __ICFEDIT_size_undstack__ = 0x100;
define symbol __ICFEDIT_size_abtstack__ = 0x100;
define symbol __ICFEDIT_size_heap__     = 0x4000;
/**** End of ICF editor section. ###ICF###*/


define memory mem with size = 4G;
define region ROM_region   = mem:[from __ICFEDIT_region_ROM_start__   to __ICFEDIT_region_ROM_end__];
define region RAM_region   = mem:[from __ICFEDIT_region_RAM_start__   to __ICFEDIT_region_RAM_end__];

define symbol __region_DRAM_start__   = 0x80000000;
define symbol __region_DRAM_end__     = 0x807FFFFF;
define region DRAM_region  = mem:[from __region_DRAM_start__   to __region_DRAM_end__];

define block CSTACK    with alignment = 8, size = __ICFEDIT_size_cstack__   { };
define block SVC_STACK with alignment = 8, size = __ICFEDIT_size_svcstack__ { };
define block IRQ_STACK with alignment = 8, size = __ICFEDIT_size_irqstack__ { };
define block FIQ_STACK with alignment = 8, size = __ICFEDIT_size_fiqstack__ { };
define block UND_STACK with alignment = 8, size = __ICFEDIT_size_undstack__ { };
define block ABT_STACK with alignment = 8, size = __ICFEDIT_size_abtstack__ { };
define block HEAP      with alignment = 8, size = __ICFEDIT_size_heap__     { };

initialize by copy { readwrite };
do not initialize  { section .noinit };

place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };

place in ROM_region   { readonly };
place in RAM_region   { readwrite,
                        block CSTACK, block SVC_STACK, block IRQ_STACK, block FIQ_STACK,
                        block UND_STACK, block ABT_STACK, block HEAP };
place in DRAM_region  { section DRAM };

And the codes of 4848.Project0.rar is also attached here, which should be able to run in the IAR EWARM with an evaluation license.

  • I found the solution from a tutorial on the IAR website. Sorry for my ignorance!

    However, although I followed every step in the tutorial, the red ERROR LED lighted up by debugging. It indicated that there was an error on the board. It is weird, because the red LED does not light up by debugging in CCS v6.1.

    Here is the modified 6888.Project0.rar.

  • Honig,


    The RM57 has ECC enable by default after reset.
    It is necessary to program the full flash in order to have the ECC in a valid state.
    Here is a wiki page that explains the process on CCS.

    I'm not sure if IAR provides similar options on their Code Generator and I will have to check with them.

    Please have a look to this page to understand the concept.

    It is a Holiday week here in US, and I will only be able to run some test next week.

  • Hi Jean-Marc,

    Thank you for the quick reply! I'll read the wiki page.

    Have a happy holiday!
  • Hi Jean-Marc,

    I read the TI Wiki page last night. Apparently the linker command file cannot be used with IAR tool chain, hence I'd like to accommodate it for IAR EWARM. Is there a sample code for that? Should I turn to for IAR support team help?

  • Honig,

    The vfill option in the linker command file for TI code generation tools is certainly not supported by other tools vendor.

    The concept is to program the full flash with valid data and corresponding ECC.
    By default, the linker only creates section for used flash space. Unused flash will stay in the erase state (0xFFFF_FFFF for the data and 0xFF for the corresponding ECC) This combination is not a correct ECC/DATA.

    The VFILL option will generate a section in the OUT file to program all ECC.

    An alternate solution for IAR is to use the FILL option. The concept is different, the result similar.
    FILL will force the linker to create data for the full FLASH region. If the flash region is not used by your application, the linker will force a value (0xFFFF_FFFF or any other pattern of your choice)
    The main difference is, in this case the OUT file will be much bigger and the programming time much longer.
    When this option is use, it is necessary in CCS Flash setup to keep the auto-ECC generation ON.