| | |

arm编译器编译时出错“error: l6388e: scatterassert expression...”,rvds、ds-金沙js1005线路

问题类别:arm 开发工具 > ds-5 浏览次数:4541
发布日期:2013/9/5 17:09:31 文章来源:米尔科技
回复日期:2013/9/5 17:34:47
用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


错误地址:

本文英文原文地址:

js555888金沙老品牌的技术支持服务指南

常见问题解答

网站地图