新蒲京娱乐场官网-www.8555cc.com|最新网站NO.1-2

新蒲京娱乐场官网8555cc最新网站提醒您:您的浏览器版本过低或者使用了兼容模式,为了获得更好的浏览体验,建议使用IE10以上的浏览器或使用极速模式。 请升级浏览器以获得更好的体验!

首页 > 技术文章 > ARM软件工具 > arm编译器 > ARM编译器编译时出错“Error: L6388E: ScatterAssert expression...”,RVDS、DS-5、MDK-ARM

ARM编译器编译时出错“Error: L6388E: ScatterAssert expression...”,RVDS、DS-5、MDK-ARM

问题类别:ARM软件工具 > arm编译器 浏览次数:10581
发布日期:2013/9/5 17:09:31 文章来源:新蒲京娱乐场官网8555cc最新网站
回复日期:2020/12/18 10:19:55

环境说明

用RVCT编译工程,如高通8x26工程

分析描述

出现如下类似的错误:
Error: L6388E: ScatterAssert expression (ImageLength(er1) < ImageLength(er2)) failed on line 27 : (0x608 < 0x400)

问题解答

当前armlink中的ScatterAssert scatter文件功能产生失败消息,其中包含了被评估的数字。


ScatterAssert(expression) 函数可以在顶层试用,或者在一个加载的区域使用。程序 link 结束后,可以用 ScatterAssert 来评估,如果 expression评估失败,则会输出错误信息。

英文原文:The ScatterAssert(expression) function can be used at the top level, or within a load region. It is evaluated after the link has completed and gives an error message if expression evaluates to false.


加载地址相关函数(load address related functions)只能在ScatterAssert函数中使用,它们映射到 3 个定义symbol值的linker

英文原文:The load address related functions can only be used within the ScatterAssert function. They map to the three linker defined symbol values:


表格5 加载地址相关函数Table 5. Load address related functions )

Function Linker defined symbol value
LoadBase(region_name) Load$$region_name$$Base
LoadLength(region_name) Load$$region_name$$Length
LoadLimit(region_name) Load$$region_name$$Limit

参数“region_name”可以是加载的或者执行的区域名称,不允许正向引用。region_name只能引用已经定义的加载或执行区域。下面的例子展示了如何使用ScatterAssert函数,用以编写比允许的区域 max_size 更复杂的尺寸检查。

英文原文:The parameter region_name can be either a load or an execution region name. Forward references are not permitted. The region_name can only refer to load or execution regions that have already been defined.

The following example shows how to use the ScatterAssert function to write more complex size checks than those permitted by the max_size of the region:


例程11 使用 ScatterAssert 检查多区域尺寸(Example 11. Using ScatterAssert to check the size of multiple regions)

LR1 0x8000 {

    ER0 +0

     {

         *(+RO)

     }

     ER1 +0

     {

         file1.o(+RW)

     }

     ER2 +0

     {

         file2.o(+RW)

     }

     ScatterAssert((LoadLength(ER1) + LoadLength(ER2)) < 0x1000)            ; LoadLength is compressed size

     ScatterAssert((ImageLength(ER1) + ImageLength(ER2)) < 0x2000)        ; ImageLength is uncompressed size

 }

 ScatterAssert(ImageLength(LR1) < 0x3000) ; Check uncompressed size of LoadRegion


错误地址:http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0496c/BABHAIBE.html

本文英文原文地址:http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0493c/CHDHCFBC.html