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.

IWR6843AOPEVM: ccs工程的Section Configuration是否有详细文档可以参考?

Part Number: IWR6843AOPEVM


您好,6843的工程中代码有.fastCode,.hsramCode,.overlaidCode,.slowCode等等,请问这些代码分区的含义是什么?代码被分配到这些区域与不分配的区别是什么?

请问是否有文档可以参考?谢谢!

  • 这些代码分区应该是用#pragma DATA_SECTION或者#pragma CODE_SECTION定义的,这主要是用来把数据或者代码指定到想要放的memory地址,#pragma伪指令,可以参考下面compiler user guide。
    7.9.7 The DATA_SECTION Pragma
    https://www.ti.com/lit/ug/sprui04b/sprui04b.pdf

  • 感谢您的回复。还是有些不明白,比如在dsp的pcount3D_dss_linker.cmd中,有如下分配:

    /* Section Configuration */
    SECTIONS
    {
    systemHeap : {} >> L2SRAM_UMAP0 | L2SRAM_UMAP1
    .dpc_l1Heap : { } > L1DSRAM
    .dpc_l2Heap: { } >> L2SRAM_UMAP0 | L2SRAM_UMAP1
    .ovly > L2SRAM_UMAP0 | L2SRAM_UMAP1

    .l3data: type=NOINIT, start(_L3data_start), size(_L3data_size), load=L3SRAM PAGE 1

    .fastCode:
    {
    RADARDEMO_detectionCFAR_priv.oe674 (.text:RADARDEMO_detectionCFAR_raCAAll)

    ……

    } load=L3SRAM PAGE 0 , run=L1PSRAM PAGE 0, table(_pcount3DDemo_fastCode_L1PSRAM_copy_table, compression=off)

    .hsramCode:
    {
    libdpm_xwr68xx.ae674 (.text:DPM_deinit)
    libmailbox_xwr68xx.ae674 (.text:Mailbox_close)
    ……
    rts*.lib (.text:ldexp)

    } load=L3SRAM PAGE 0, run=HSRAM PAGE 0, table(_pcount3DDemo_configCode_HSRAM_copy_table, compression=off)

    .overlaidCode:
    {
    RADARDEMO_aoaEst2DCaponBF.oe674 (.text:RADARDEMO_aoaEst2DCaponBF_create)
    RADARDEMO_detectionCFAR.oe674 (.text:RADARDEMO_detectionCFAR_create)
    ……
    dss_main.oe674 (.text:Pcount3DDemo_dssInitTask)
    } load=L3SRAM PAGE 0

    .unUsedCode:
    {
    RADARDEMO_detectionCFAR_priv.oe674 (.text:RADARDEMO_detectionCFAR_CAAll)
    RADARDEMO_detectionCFAR_priv.oe674 (.text:RADARDEMO_detectionCFAR_OS)
    } load=L3SRAM PAGE 0

    .slowCode:
    {
    libmailbox_xwr68xx.ae674 (.text:Mailbox_init)
    ……
    libsoc_xwr68xx.ae674 (.text:SOC_init)

    } load=L3SRAM PAGE 0 (HIGH)

    }

    这样将代码段分配到不同的.fastCode,.hsramCode,.overlaidCode,.slowCode中的作用是什么?分配的依据是什么?

  • 这些段里的代码可以根据需求分配到不同速度的Memory中,需要快速执行的代码放到对应的代码区。

    load=L3SRAM PAGE 0 , run=L1PSRAM PAGE 0, table(_pcount3DDemo_fastCode_L1PSRAM_copy_table, compression=off)

    分配到.fastCode里的代码load到L3SRAM,但运行时,会被copy到速度更快的L1PSRAM上运行。

    .overlaidCode:
    {
    RADARDEMO_aoaEst2DCaponBF.oe674 (.text:RADARDEMO_aoaEst2DCaponBF_create)
    RADARDEMO_detectionCFAR.oe674 (.text:RADARDEMO_detectionCFAR_create)
    ……
    dss_main.oe674 (.text:Pcount3DDemo_dssInitTask)
    } load=L3SRAM PAGE 0

    .overlaidCode里的代码load和run是一个地址,都是在L3SRAM,说明这些代码不需要搬移到更快的RAM里运行。

    关于load, run address的说明,请看汇编手册。
    8.5.6 Placing a Section at Different Load and Run Addresses
    https://www.ti.com/lit/ug/sprui03b/sprui03b.pdf