----------------------------------------------------------------------------------------------------------
Author :tiger-john(冀博)
WebSite :blog.csdn.net/tigerjb
Email :jibo.tiger@gmail.com
Tiger声明:本人不排斥别人转载tiger-john的文章,只是请您注明出处3Q
---------------------------------------------------------------------------------------------------
一.RVDS startup flow
In RVDS compiler environment, an initialization sequence executes to set up the system before the main task is executed.
The Figure 1[1] shows the default initialization sequence (use BL __main method)
Figure 1 the default initialization sequence
The reset handler executes immediately on system startup. The block of code labeled $$Sub$$main executes immediately before the main application.
First: The reset handler is a short module coded in assembler that is executed on system reset. As a minimum, we must reset handler initializes stack pointers for the modes that your application is running in by ourselves.
Second: the reset handler typically branches to __main to begin the C library initialization sequence. __main branches directly to __scatterload. __scatterload is responsible for setting the runtime image memory map, whereas __rt_entry (runtime entry) is responsible for initializing the C library.
(1) __scatterload carries out code and data copying, decompression of RW data if necessary, and zeroing of ZI data.
(2) __scatter load branches to __rt_entry. This sets up the application stack and heap. So we can must implementation __user_initial_stackheap. If we don’t implement __user_initial_stackheap function, or the system raise error message: undefined symbol Image$$Limit (refer from sys_stackheap.o). Then initializes library functions and their data, and calls any constructors of global declared objects (this is only use C++ only)
(3)__rt_entry then branches to main () that is entry to our application. When the main application has finished executing, __rt_entry shuts down the library, then hands control back to the debugger.
Note:
(1)If we use BL __main, the RVDS compiler auto realize to copy data to memory and initialize ZI data of zero ,not we implement by ourselves. And, if use BL __main, the function main () has a special significance. The presence of a main () function forces the linker to link in the initialization code in __main and __rt_entry. Without a function labeled main () the initialization sequence is not linker in, and as a result, some standard C library functionality is not supported.
(2) If we use BL main, we must implement copy data to memory and initialize ZI data of zero. In this method, the application code entry label is arbitrary character. Only BL Label the same is function Label.
(3) In the GUN compiler environment the system can’t auto copy data to memory and initialize ZI data of zero. This usage of it is more closed to the second, but they have some slight difference.
二. RVDS startup project of Error message
In this section, during write startup project base on bare-metal using RVDS compiler environment I faced some errors message, analyzing the reasons and raising the method of avoiding and modifying these errors. For more details please check in startup project code.
1. Error message: startup.o (vectors) contains invalid call from ‘~PRES8’ function to ‘REQ8’ function serial_init.
(1) Error reason: This linker error is given where a stack alignment conflict is detected in object code. The “ABI for the ARM Architecture” demands that code maintains 8~bytes stack alignment at its interfaces. This allows efficient use of LDRD and STRD instructions (in ARM Architecture 5TE and later) to access 8-byte-aligned “double” and “long long” data types. Symbols like ‘~PRES8’ and ‘REQ8’ are “Build Attributes” of the objects. PRES8 means the object PRESERVES 8~byte alignment of the stack. ~PRES8 means the object REQuires 8-byte alignment of the stack. ~PRES8 means the object REQuires 8-byte alignment of the stack [2].
(2) Solution: Add ‘PRESERRVE8’ directive to the top of each assembler file.
PRESERVE8
AREA TEXT, CODE, READONLY
CODE32
2. Error message: Undefined symbol Image$$ZI$$Limit (referred from sys_stackheap.o)
(1) Error reason: Because the default implementation uses Image$$ZI$$Limit, you must re-implement __user_initial_stackheap (). The following error message is displayed from the linker: Undefined symbol Image&&ZI$$Limit (referred from sys_stackheap.o) [3]
(2)Solution: Re-implement the __user_initial_stackheap ()
EXPORT __user_initial_stackheap
__user_initial_stackheap
LDR r0, =bottom_of_heap
MOV pc, lr
AREA Heap, DATA, NOINIT
bottom_of_head SPACE 1
Reference:
1. RealView® Compilation Tools Version 2.2 Developer Guide
2. ARM Web Error link: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0437a/index.html
3. RealView® Compilation Tools Version 2.2 Linker and Utilities Guide
分享到:
相关推荐
信息安全_数据安全_us-18-Dameff-Mental-Health-Hacks 业务风控 漏洞挖掘 大数据 安全实践 移动安全
Baymax: A Mental-Analyzing Mobile App Based on Big Data.pdf
神奇的魅力解决您的心理困境 :high_voltage:...$ cd Magical-Charisma-To-Solve-Your-Mental-Dilemma 部署到GitHub :package: 完成设置后,您应该在线托管网站。 强烈建议您通读的 。 部署到Netlify :package: 您也可
设置GOPATH ,可以使用go get -u github.com/cretz/go-mental-poker/...获取代码和所有依赖项。 概述 SRA密钥是基于共享质数的两个数字,当一个值应用于一个值时,另一个可以用于“取消应用”(即分别进行加密和...
Contrasting procedures for empirical support of traditional and Population-Based mental health services CONTRASTING PROCEDURES FOR EMPIRICAL SUPPORT OF TRADITIONAL AND POPULATION-BASED MENTAL HEALTH...
从2020年6月1日至6月8日,COVID对心理健康的影响目录关于该项目该项目的目的是预测在COVID-19大流行期间过去7天中分别对两个子问题的焦虑或抑郁样症状发生率的React。 我设计的工具使用了从2020年6月1日至2020年6月8...
Matlab related EEG analysis based on : Wavelet Based Analysis of EEG Signal for Evaluating Mental Behavior
title={A Computational Approach to Understanding Empathy Expressed in Text-Based Mental Health Support}, author={Sharma, Ashish and Miner, Adam S and Atkins, David C and Althoff, Tim}, year={2020},...
A Machine Learning Analysis of COVID-19 Mental Health Data_COVID2019冠状病毒疾病的机器学习分析.pdf
This paper proposes a precise PV simulator based on the seven-parameter electriccircuit model. The proposed simulator can generate the output characteristics of a PV system preciselyat different ...
Experi- mental results on 14 important kernels extracted from well known benchmark programs show that using EPIMap can improve the per- formance of the kernels on CGRA by more than 2.8X on average, ...
数据融合matlab代码多模式精神工作量评估信号处理 此存储库包含用于处理生理多模态信号和从中提取特征的代码,如在SMC 2020上发表的题为“使用多传感器融合进行体育活动期间运动伪像-鲁棒性精神工作量评估”的论文中...
The validity of the otis-lennon mental ability test, elementary II level, for suspected mental retardates T H E VALIDITY OF' T H E OTIS-LENNON MENTAL ABILITY TEST, ELEMENTARY I1 LEVEL, FOR ...
该网站以“为基础。 标题图像来自 。 版权和许可 版权所有2013-2016 Blackrock Digital LLC。 根据许可发布的代码。
资源来自pypi官网。 资源全名:mental_models-0.1.2-py3-none-any.whl
In the second section, we introduce the agent mental model based on DFL. In the third section, we introduce the single agent learning algorithm based on DFL. The fourth section extends this idea to a...
最近的大流行改变了人们的工作方式。 这种变化给我们的身心健康带来了损失。 尽管人们在身体健康方面有更高的意识和机敏性,但心理健康却处于次要地位。 我们忽略自己的心理健康并不是一件新鲜事,但现在正是实现...
不在乎我们有关心理健康支出的故事的交互式代码。 从的react项目模板react项目。作者约书亚·伯德( )现场文章
共生心理健康该网站提供有关在冠状病毒大流行期间青少年心理健康的信息。
In today�s IT marketplace, qualified project managers are heavily in demand as employers increasingly require those who are capable of managing larger and more complex projects. The PMP ...