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.

3200 .icf文件中没有对堆栈边界及大小做划分?

Other Parts Discussed in Thread: CC3200

IAR .icf文件中没有对堆栈边界及大小做划分?请问该如何配置

  • icf里有如下定义

    //
    // 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 = 0x00008000 { };
    keep {readonly section .cmdtbl};
    define block CmdTbl {section .cmdtbl };

    //
    // Indicate that the noinit values should be left alone. This includes the
    // stack, which if initialized will destroy the return address from the
    // initialization code, causing the processor to branch to zero and fault.
    //
    do not initialize { section .noinit };

    define block CSTACK with alignment = 8, size = 0x800 { section .stack };
    do not initialize { section .stack};
    place at end of SRAM { block CSTACK };

  • 编译器IAR会自动进行堆栈和RAM地址的划分,你只需要修改

    define block CSTACK with alignment = 8, size = 0x800 { section .stack };
    do not initialize { section .stack};
    place at end of SRAM { block CSTACK };

    中Stack的堆栈大小值,但是注意如果堆栈修改的太大,导致你程序的RAM用量超过了分配的RAM用量就会出现问题

    //
    // Define a region for the on-chip flash.
    //

    define region FLASH = mem:[from 0x01000000 to 0x01010000];
    if(CC3200_ES_1_2_1)
    {
    define region SRAM = mem:[from 0x20000000 to 0x20030000];
    }
    else
    {
    define region SRAM = mem:[from 0x20004000 to 0x20030000];
    }