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.

请教814x DVRRDK 编译后map文件在哪里?

请教814x DVRRDK 编译后map文件在哪里?

  • 你好,

    下面的信息请参考:

    root@user-desktop:/media/work/DVR_RDK/4.01/DVRRDK_04.01.00.02/dvr_rdk/build/dvr_rdk/bin/ti814x-evm# ls
    dvr_rdk_c6xdsp_debug_512M_128M.xe674
    dvr_rdk_c6xdsp_debug_512M_128M.xe674.map
    dvr_rdk_m3video_release_512M_128M.xem3
    dvr_rdk_m3video_release_512M_128M.xem3.map
    dvr_rdk_m3vpss_release_512M_128M.xem3
    dvr_rdk_m3vpss_release_512M_128M.xem3.map

  • 谢谢 再请教一下,如何同时使用 两个#pragma 如:

    我想分配buf到IRAM,同时要求buf 一定link不被优化掉

    #pragma RETAIN(buf)

    #pragma DATA_SECTION(buf,“iram”)

    int buf []

    应该怎么写呀


  • 谢谢 再请教一下,如何同时使用 两个#pragma 如:

    我想分配buf到IRAM,同时要求buf 一定link不被优化掉

    #pragma RETAIN(buf)

    #pragma DATA_SECTION(buf,“iram”)

    int buf []

    应该怎么写呀

  • 是不是

    #pragma SET_DATA_SECTION(“iram”)

    #pragma RETAIN(buf)

    int buf []

    #pragma SET_DATA_SECTION()

  • shuyu liang 说:

    谢谢 再请教一下,如何同时使用 两个#pragma 如:

    我想分配buf到IRAM,同时要求buf 一定link不被优化掉

    #pragma RETAIN(buf)

    #pragma DATA_SECTION(buf,“iram”)

    int buf []

    应该怎么写呀


    你好,

    你是不是再找下面的信息?

    http://www.ti.com/lit/ug/spru187u/spru187u.pdf

    6.5.6 The volatile Keyword
    The compiler eliminates redundant memory accesses whenever possible, using data flow analysis to
    figure out when it is legal. However, some memory accesses may be special in some way that the
    compiler cannot see, and in such cases you must use the volatile keyword to prevent the compiler from
    optimizing away something important. The compiler does not optimize out any accesses to variables
    declared volatile. The number and order of accesses of a volatile variable are exactly as they appear in
    the C/C++ code, no more and no less.
    There are different ways to understand how volatile works, but fundamentally it is a hint to the the
    compiler that something it cannot understand is going on, and so the compiler should not try to be overclever.
    Any variable which might be modified by something external to the obvious control flow of the program
    (such as an interrupt service routine) must be declared volatile. This tells the compiler that an interrupt
    function might modify the value at any time, so the compiler should not perform optimizations which will
    change the number or order of accesses of that variable. This is the primary purpose of the volatile
    keyword.
    In the following example, the loop intends to wait for a location to be read as 0xFF:
    unsigned int *ctrl;
    while (*ctrl !=0xFF);
    However, in this example, *ctrl is a loop-invariant expression, so the loop is optimized down to a singlememory
    read. To get the desired result, define ctrl as:
    volatile unsigned int *ctrl;
    Here the *ctrl pointer is intended to reference a hardware location, such as an interrupt flag.
    Volatile must also be used when accessing memory locations that represent memory-mapped peripheral
    devices. Such memory locations might change value in ways that the compiler cannot predict. These
    locations might change if accessed, or when some other memory location is accessed, or when some
    signal occurs.
    Volatile must also be used for local variables in a function which calls setjmp, if the value of the local
    variables needs to remain valid if a longjmp occurs.

  • 谢谢

            并不是这样的,使用volatile还是会将不用的符号去掉,您看还有别的方法吗?

    使一个未使用的数组 同时分配到我需要的空间并且不被优化掉

  • 换个方法,如何使某段代码不被优化呢??

  • 你好,

    你能否尝试http://processors.wiki.ti.com/index.php/Placing_Variables_in_Specific_Memory_Location_-_MSP430?

    #pragma RETAIN(jtag_lock)

    #pragma location=0x17FC

    const unsigned long int jtag_lock = 0xAAAAAAAA;

  • shuyu liang 说:

    换个方法,如何使某段代码不被优化呢??

    你好,

    你可以把相关代码摘出来作为一个API,另起一个文件,这个新文件可以选择不优化。

    对了,你现在的问题和标题无关,如果还有问题,请另起一个新的讨论主题。谢谢!

  • 谢谢您

             我再发个帖子讨论这个问题。