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.

cmd内数据段内存分配问题



各位工程师好,

我的软硬件环境为ccsv5.5,6678(非evm板),没有用sys/bios操作系统

若cmd的段全部分配到L2中,程序运行正常。如下

SECTIONS
{
    .csl_vect           >    VECTORS
    .bootload           >    BOOT
    .text               >    LL2_RW_DATA
    .cinit              >    LL2_RW_DATA
    .const              >    LL2_RW_DATA
    .switch             >    LL2_RW_DATA
    .stack              >    LL2_RW_DATA
    GROUP
    {
        .neardata
        .rodata
        .bss
    }                 >    LL2_RW_DATA
    .far            >    LL2_RW_DATA
    .fardata        >    LL2_RW_DATA
    .cio            >    LL2_RW_DATA
    .sysmem         >    LL2_RW_DATA

    .cppi            >    LL2_RW_DATA
    .qmss            >    LL2_RW_DATA
    platform_lib    >    LL2_RW_DATA
    .STACK_CODE        >    LL2_RW_DATA
    .STACKBUFF      >    LL2_RW_DATA
}

若将CMD文件内存分配到DDR3中,运行到printf语句会卡住,进入到running状态,不会继续向下进行。如果把printf语句注释掉,程序会正常继续进行。cmd配置如下

SECTIONS
{
    .csl_vect           >    VECTORS
    .bootload           >    BOOT
    .text               >    LL2_RW_DATA
    .cinit              >    LL2_RW_DATA
    .const              >    LL2_RW_DATA
    .switch             >    DDR3_CODE
    .stack              >    LL2_RW_DATA
    GROUP
    {
        .neardata
        .rodata
        .bss
    }                 >    DDR3_CODE
    .far            >    SL2
    .fardata        >    DDR3_CODE
    .cio            >    DDR3_CODE
    .sysmem         >    DDR3_CODE

    .cppi            >    DDR3_CODE
    .qmss            >    DDR3_CODE
    platform_lib    >    DDR3_CODE
    .STACK_CODE        >    DDR3_CODE
    .STACKBUFF      >    DDR3_CODE
}

希望工程师详细解答