没有合适的资源?快使用搜索试试~ 我知道了~
TASKING TriCore tools Linker tips - tricks-WEB.pdf
需积分: 5 15 下载量 54 浏览量
2023-07-19
16:53:48
上传
评论
收藏 803KB PDF 举报
温馨提示
试读
12页
TASKING TriCore tools Linker tips - tricks-WEB.pdf
资源推荐
资源详情
资源评论
APPLICATION
NOTE
LINKER SCRIPT LANGUAGE (LSL)
TIPS & TRICKS FOR TASKING TRICORE TOOLSET
INTRODUCTION
The TASKING
®
Linker/Loader in the VX-toolset for TriCoreTM is a very feature rich tool, oering many helpful func-
tionalities to create an ecient application. For example, it provides optimization options, it supports multi-core
development and incremental linking, and it can be steered through an advanced Linker Script Language (LSL).
This LSL is a very powerful language, used by many of our customers to optimize their application to their specic
needs.
This document provides several helpful tips and tricks to help you benet from the opportunities that LSL pro-
vides. Our support sta has worked with many of our users on LSL tuning and collected frequently used hints for
this tips and tricks overview. We believe you can also learn from these hints and become an LSL expert. If you have
any questions or maybe other suggestions/hints, please don’t hesitate to contact us through support@tasking.
com.
For detailed information about the linker and LSL we refer to the User Manual, chapter 7 Using the Linker, 10.5
Linker Options and 16 Linker Script Language (LSL).
LSL CODE CORE ASSOCIATION AND DATA CORE ASSOCIATION
The TASKING TriCore tools feature the language extensions __share, __private0, __private1, __private2
and __clone to assign a code section or data section to core local memory. You can achieve the same goal with
the following pragmas:
#pragma code_core_association share | private{012} | clone
#pragma data_core_association share | private{012} | clone
This method inuences the section name that the linker uses to assign the section appropriately. To do so, the linker
adds the core association name to the section name. E.g. .bss.private1.module_name.variable_name for a non
initialized variable which must be placed in core 1 local memory.
When the C source code is not available (e.g. because a 3rd party library is used or an object le is already certied
and thus the C source may not be modied) the core assignment using the above mentioned C language extensions
or the pragma is no longer possible. To assign a section to a dierent core, you can use the linker LSL language
keyword ‘modify input’.
For the following C code, compiled with default options but with -N0 for no default near allocation of variables, the
variable my_var_1 will be placed in section .bss.le_1.my_var_1 and the code for init_func will be placed in
section .text.le_1.init_func.
le_1.c
int my_var_1;
void init_func(void);
void main(void)
{
init_func();
while(1)
{
__nop();
}
}
void init_func(void)
{
my_var_1 = 0x1234;
}
APPLICATION
NOTE
LINKER SCRIPT LANGUAGE (LSL)
TIPS & TRICKS FOR TASKING TRICORE TOOLSET
To move the function init_func from ash memory to core 0 local RAM memory to be executed by core 0 only, you
can use the following LSL le entries. The startup code takes care of copying the ash image of the function code
to the core 0 local RAM:
// section_setup entry for the source location (here virtual linear memory, vtc)
section_setup mpe:vtc:linear
{
// Link time code core association private to assign the section to
// core0 memory
modify input ( space = mpe:tc0:linear )
{
select “.text.le_1.init_func”;
}
}
// section_layout entry for the placement of the section in TC0 local PSPR0 memory
// and the ‘copy’ keyword for the linker to create a ROM copy section
// for the initialized code
section_layout :tc0:linear
{
group TC0_FUNCTIONS ( ordered, run_addr=mem:mpe:pspr0, copy )
{
select “.text.le_1.init_func”;
}
}
The linker generated map le shows the result.
ROM copy of the initialized section in ash memory:
+ Space mpe:vtc:linear (MAU = 8bit)
+----------------------------------------------------------------------------------------------------------------------------+
| Chip | Group | Section | Size (MAU) | Space addr | Chip addr | Alignment |
|============================================================================================================================|
...
| mpe:pash0 | | [.text.le_1.init_func] (367) | 0x0000000e | 0x800000ac | 0x000000ac | 0x00000002 |
...
Placement in core local PSPR0 memory:
+ Space mpe:tc0:linear (MAU = 8bit)
+----------------------------------------------------------------------------------------------------------------------------+
| Chip | Group | Section | Size (MAU) | Space addr | Chip addr | Alignment |
|============================================================================================================================|
...
| mpe:pspr0 | TC0_FUNCTIONS | .text.le_1.init_func (169) | 0x0000000e | 0x70100000 | 0x0 | 0x00000002 |
...
剩余11页未读,继续阅读
资源评论
欣欣宇宇
- 粉丝: 1826
- 资源: 20
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- tensorflow-gpu-2.7.4-cp37-cp37m-manylinux2010-x86-64.whl
- 多段线、 圆、弧转多段线(仅我可见)
- tensorflow-2.7.2-cp38-cp38-manylinux2010-x86-64.whl
- yeyue-p8Yi4-ve4a83792.apk
- tensorflow-gpu-2.7.3-cp38-cp38-manylinux2010-x86-64.whl
- 五相感应电机矢量控制模型MATLAB
- RGLED (1) (1).circ
- IMG_20240427_215747.jpg
- python下前端WEB学习笔记
- 田间种植行排号自动生成工具
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功