网站公告列表

  没有公告

加入收藏
设为首页
联系本站
您现在的位置: AnalogCN安诺电子 >> 文章 >> 技术交流 >> 文章正文
  uclinux-2008R1-RC8(bf561)到VDSP5的移植(19):li2040           ★★★ 【字体:
uclinux-2008R1-RC8(bf561)到VDSP5的移植(19):li2040
作者:快乐虾    文章来源:http://blog.csdn.net/lights_joy    点击数:    更新时间:2008-5-6    
在添加了.init段之后,VDSP报告li2040警告:
[Warning li2040] ".\uclinux-2008r1-rc8.ldf":690 Due to memory fragmentation, output section '.init' in processor 'p0' was mapped discontinuously.
 Use FORCE_CONTIGUITY command to ensure that output section is mapped continuously.
 Use NO_FORCE_CONTIGUITY command if contiguity does not matter in this output section.
查了一下li2040,VDSP的解释是:
For most mapping operations, code and data from an object file are mapped contiguously, and input sections are mapped in the order specified inside the output section. If you have mapped an object into a location that causes a fragmentation of memory, the linker may map an object into the gap in such a way that code or data is no longer contiguous. Because of the fragmentation, the linker may also place input sections into memory in an order that is different from the order in which they appear in the output section. The linker warns that the mapping is not contiguous.
An additional (and probably more common) case of non-contiguous placement is when the sections are not mapped in the order specified in the LDF. Such a case might have nothing to do with internal fragmentation.
给出的解决方法是:
How to Fix
The LDF command FORCE_CONTIGUITY forces the linker to keep the variables contiguous. Using the FORCE_CONTIGUITY command may result in unused space in the output section.
You can indicate that it is not important that code and data objects are contiguous by using the LDF command NO_FORCE_CONTIGUITY. In the first example above, if the LDF file contained the NO_FORCE_CONTIGUITY command, the linker would not issue the warning.
If contiguous placement is not important in any of the output section, disable the warning by using the -w2040 command-line switch.
因为uclinux内核在启动完成后需要将.init段占用的空间回收,所以它必须是独立的,在此我选择使用NO_FORCE_CONTIGUITY命令,.init段就变成了:
        .init
        {
             NO_FORCE_CONTIGUITY
               ___init_begin = .;
 
               //.init.text
               INPUT_SECTION_ALIGN(4096)
               . = (. + 4095) / 4096 * 4096;
               __sinittext = .;
               INPUT_SECTIONS($LIBRARIES_CORE_A(.init.text))
               __einittext = .;
               
               //.init.data
               INPUT_SECTION_ALIGN(16)
               INPUT_SECTIONS($LIBRARIES_CORE_A(.init.data))
             
        } > MEM_SDRAM
文章录入:admin    责任编辑:admin 
  • 上一篇文章:

  • 下一篇文章:
  • 发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
    最新热点 最新推荐 相关文章
    ucos-ii在嵌入式智能视觉监控
    14bit 40 MSamples/s ADC应用
    打造windows下的嵌入式开发工
    DSP和FPGA在汽车电子中的广泛
    [连载]ADSP-TSl01S系列之一 
    ADI ADIS1625x低功耗陀螺仪方
    基于DSP的实时图像跟踪系统的
    wxWidgets和MFC动态类型信息
    用dll方式编译wxWidgets-2.8
    Blackfin时钟控制
      网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)
    版权所有:AnalogCN安诺电子 湘ICP备06016315号