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.

28388

Other Parts Discussed in Thread: C2000WARE

请问这个警告什么意思?

#10278-D null: LOAD placement specified for section ".text:rts2800_fpu32_eabi.lib<memset.c.obj>". This section contains decompression routines required for linker generated copy tables and C/C++ auto-initialization. Must ensure that this section is copied to run address before the C/C++ boot code is executed or is placed with single allocation specifier (ex. "> MEMORY").

  • 不知您的cmd文件时如何定义的。若是可以的话,请您详细说明一下现在的情况

    链接器允许您为加载和运行分配一个段到不同的地址。但是您仍然必须采取明确的步骤,以便在使用代码或数据之前的某个时间将其从加载地址复制到运行地址。  

    在初始化全局变量的情况下,链接器会为您处理许多细节。如: 

    int a = 123;
    int b = 456;
    

    对于此代码,编译器会发出类似以下程序集的内容:

    ; pseudo-assembly code
        .data         ; section is named .data
    a:  .word   123   ; init the variables
    b:  .word   456

    链接器压缩所有 .data section(从而节省内存)并将压缩数据放入名为 .cinit 的节中。
    这个 .cinit 部分还包含初始化记录,以及一个指向 RTS 库中函数的指针表,这些函数在系统启动期间解压缩数据。
    解压期间使用的两个例程可在 RTS 库对象模块 copy_decompress_none.obj 和 memcpy_t2.obj 中找到。


    重点:这两个解压例程在系统启动时调用,在调用 main 之前。这些例程必须从加载地址复制到运行地址才能运行。默认情况下不会发生这种情况。您的选择是:

    1 更改系统启动,以便在其他任何事情之前复制这些例程
    2 不要分配一个加载地址,而只分配一个运行地址。

    一般使用第2种方法。

     仅将这些 RTS 例程分配给运行地址的链接器命令文件语法是:

        for_rts_decompress { 
            rtsv7R4_T_be_v3D16_eabi.lib<copy_decompress_none.obj>(.text:decompress:none) 
            rtsv7R4_T_be_v3D16_eabi.lib<memcpy_t2.obj>(.text) 
        } > RAM_BOOT1
    

    这将创建一个名为 for_rts_decompress 的输出节。输入部分是来自 RTS 对象模块 copy_decompress_none.obj 的 .text:decompress:none 和来自 RTS 对象模块 memcpy_t2.obj 的 .text。这些输入节名称是根据之前的链接器错误诊断开发的。请注意 for_rts_decompress 如何仅分配内存范围 RAM_BOOT1 中的运行地址,而不分配加载地址。当启动代码开始运行时,这些routines必须出现在这个运行地址。

  • 您好,我将CMD发您了,您能看看吗?

  • 不好意思,未能收到您的cmd文件

  • 我私信发您?不知道您收到否?

  • 建议您先参考下TI的cmd文件(C2000Ware_3_04_00_00\device_support\f2838x\common\cmd)2838x_flash_api_lnk

    boot to Flash的begin地址需要是0x080000

    /* BEGIN is used for the "boot to Flash" bootloader mode */
    BEGIN : origin = 0x080000, length = 0x000002