您的位置:首页 > 其它

[ArmCompiler6--armlink]Keil-MDK中scatter file语法

2017-04-27 11:59 2326 查看

简述

keil MDK IDE目前在MCU开发中使用非常广泛,有些时候可能要做一些代码移植,或者更加灵活的处理memory的问题,就需要用到scatter file了,这里对scatter file的一些写法做些学习。

典型的scatter file结构



load region的描述

load_region_description ::=  load_region_name  (base_address  | ("+" offset)) [attribute_list] [max_size]
"{"          execution_region_description+        "}"


这里需要对attribute_list做下详细介绍:

Attr说明
ABSOLUTE指定链接地址
ALIGN alignment为load region增加分配限制,从4到alignment
NOCOMPRESS默认RW数据压缩是启用的,该属性将指定load region中某些内容不能压缩
OVERLAY运行在同一地址有多个load region的重叠,但是ARM工具并不允许重叠,因此需要自己提供重叠管理
PI位置独立

execution region的描述

execution_region_description ::=
exec_region_name (base_address | "+" offset) [attribute_list] [max_size | length]
"{"             input_section_description*         "}"


attribute_list和load region的类似

input section description

input_section_description ::=   module_select_pattern [ "(" input_section_selector ( "," input_section_selector )* ")" ]input_section_selector ::= "+" input_section_attr        | input_section_pattern
| input_section_type        | input_symbol_pattern        | section_properties




描述项说明
Module nameobject filename, lib member name, lib filename
Input section namesection name, type or attributes(READ-ONLY, CODE)
Symbol name符号
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  Keil MDK scatter syntax 语法