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.

F28377D的CLA中定义的局部变量

F28377D的例程CLA_asin-cpu01里面,CLA文件中定义的局部变量是在哪个空间的,MAP文件里面没有

  • Uninitialized global data will be placed in the section ".bss_cla
    Scratchpad(configurable)
    Local variables and compiler temporary variables placed here
    局部变量就是放在scratchpad,类似stack.
    Eric
  • 就是这个吗? 

    #ifdef CLA_C
    /* CLA C compiler sections */
    //
    // Must be allocated to memory the CLA has write access to
    //
    CLAscratch :
    { *.obj(CLAscratch)
    . += CLA_SCRATCHPAD_SIZE;
    *.obj(CLAscratch_end) } > RAMLS1, PAGE = 1

    .scratchpad : > RAMLS1, PAGE = 1
    .bss_cla : > RAMLS1, PAGE = 1
    .const_cla : > RAMLS1, PAGE = 1
    #endif //CLA_C

    不好意思,你可以帮我解读一下这几句意思吗,谢谢了

  • 就是这个。

    CLA编译器编译后就会将局部变量放在scratchpad,而这个scratchpad 映射在RAMLS1的存储空间。

    同理bss也就是全局变量的分配段和存储空间。

     CLA_SCRATCHPAD_SIZE 是CLA堆栈的空间。