0
点赞
收藏
分享

微信扫一扫

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


简述

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

典型的scatter file结构

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

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

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

描述项

说明

Module name

object filename, lib member name, lib filename

Input section name

section name, type or attributes(READ-ONLY, CODE)

Symbol name

符号


举报

相关推荐

java中File类相关基础语法

0 条评论