logo资料库

TASKING LSL 脚本语言介绍.pptx

第1页 / 共15页
第2页 / 共15页
第3页 / 共15页
第4页 / 共15页
第5页 / 共15页
第6页 / 共15页
第7页 / 共15页
第8页 / 共15页
资料共15页,剩余部分请下载后查看
TASKING LSL 脚本语言介绍 Channing lv TASKING Field Aplication Engineer 2018 tasking.com
TASKING LSL链接器脚本语言 • LSL含义介绍 • LSL设置芯片(硬件)架构信息 • LSL使用提示 2
LSL含义介绍 • LSL 含义: Linker Script Language 链接器脚本语言 • 在TASKING IDE环境下默认自动生成 • 处理器特殊配置,比如: core architecture, on-chip memory, stack and • heap 等等,都已经在标准LSL文件中进行了预定义 • 可通过窗口配置: Processor 选择, Memory 布局, Stack/Heap配置 • LSL 目的: • 指明某些特性(与linker相关的部分)到所使用的目标板上,设置代码在指 • 指明编译生成的Section在内存中如何布局 定核心上运行,方便为某些代码选择运行核心。 3
Tasking 工具配置: LSL关键字介绍 属性(Attributes): – select names with attributes: r=readable w=writable x=executable i=initialized b=cleared s=scratch 其它比较有用的 LSL 关键字: – run_addr = address (运行时地址,address at run-time) – load_addr = address (在复制到运行地址前,初始地址在ROM中(initial address)) – ordered (以group中定义的排序方式来将sections定位到地址空间中) – contiguous (在group中某单个地址范围内随意布局,但会占用一段连续的memory空间) – clustered (连续的排布(contiguous), 但是当memory不足的时侯会被分割开) – fill (避免其他section填补 对齐间隙(alignment gaps)) – overlay (contiguous,将当前section覆盖到当前的run address上) – copy (为sections 创建一份ROM拷贝,在启动时会将这部分sections从ROM复制到RAM中) – reserved (保留这些section) r readable sections w writable sections x executable sections i initialized sections b sections that should be cleared at program startup s scratch sections (not cleared and not initialized) p protected sections 4
LSL设置芯片(硬件)架构信息 一 • Core0 DSPR address memory dspr0 (tag="on-chip") //Data Scratch Pad Ram { mau = 8; type = ram; size = 120k; map (dest=bus:tc0:fpi_bus, dest_offset=0xd0000000, size=120k, priority=1, exec_priority=0); map (dest=bus:sri, dest_offset=0x70000000, size=120k); } • Core0 PSPR address memory pspr0 (tag="on-chip") //Program Scratch Pad Ram { mau = 8; type = ram; size = 32k; map (dest=bus:tc0:fpi_bus, dest_offset=0xc0000000, size=32k, exec_priority=1); map (dest=bus:sri, dest_offset=0x70100000, size=32k); } 5
LSL设置芯片(硬件)架构信息 二 • Pflash0 address memory pflash0 (tag="on-chip") // pflash0 can be named by User { mau = 8; type = rom; size = 2M; map cached(dest=bus:sri, dest_offset=0x80000000, size=2M); map not_cached(dest=bus:sri, dest_offset=0xa0000000, size=2M, reserved); } 6
LSL设置芯片(硬件)架构信息 三 • 通过”Add”来手动添加 新的memory 文件中呈现 • 通过右侧按钮一键选择 Cached rom 或 Not Cached • 选中某一Memory 通 过”Edit” 来修改其属性 • 所有修改最终会在LSL 注:导入三方的LSL文件 后,可以在IDE界面中做 到读取,但是不能通过 IDE界面修改 7
Tasking 工具配置: LSL 注意事项 ü 如果想要将Section分配到指定的地址Memory, 那么就需要对 Section的类型及其后缀名比较了解,否则极易出现配置不成 功的情况。 ü 地址空间有linear、abs24 、abs18 、csa,用户常用的是 linear 地址空间。 8
分享到:
收藏