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.

使用VLIB3.2.1时报错symbols in the reserved far sections cannot be accessed as near



 void VLIB_Canny_Edge_Detection_md (uint8_t LevelOfFeedback)
{
int32_t tpi; /* test parameter index */

/* Test Parameters */
canny_testParams_t *prm;

canny_getTestParams(&prm, &test_cases);    //extern int32_t    test_cases;在VLIB_test.h中定义
}只有这么一小段,调用更多vlib函数或有更多类似的错误
报错如下
#10319-D symbols in the reserved far sections cannot be accessed as near; symbol "test_cases" in the far section "C:\ti\vlib_c66x_3_2_1_0\packages\ti\vlib\lib\common.ae66(.fardata)" is accessed as near in the section "./mutex.obj(.text)"
  • 你的代码用的near的内存模型,但是这个symbol被放在了far段,你把你整个project的内存访问模型改成far就可以了。

  • 如何将内存模型将near改为far?

  • 请参考C6000编译器手册的说明

    The C6000 C/C++ compiler extends the C/C++ language with the near and far keywords to specify how

    global and static variables are accessed and how functions are called.
    Syntactically, the near and far keywords are treated as storage class modifiers. They can appear before,
    after, or in between the storage class specifiers and types. With the exception of near and far, two storage
    class modifiers cannot be used together in a single declaration. The following examples are legal
    combinations of near and far with other storage class modifiers:
    far static int x;
    static near int x;
    static int far x;
    far int foo();
    static far int foo();