当前位置:网站首页>二次bootloader关于boot28.asm应用的注意事项,28035的
二次bootloader关于boot28.asm应用的注意事项,28035的
2022-06-26 05:11:00 【量子力学和生命科学】
做BL的时候,主函数被改成了BLmian()
boot28.asm中 LCR _SBLmain,如此带返回调用主函数,这句话运行结束后,SBLmain函数的返回值是个APP的入口地址放在ACC中,通过 LCR _exit 调用,最终将ACC中的主函数入口地址加载到PC中
因此, _exit函数的内容要加到boot28.asm中,不然引用的_exit是库中的,没有上面这个过程,就无法完成跳转
添加到boot28.asm中的代码如下:
_exit:
;-----------------------------------------------
; Insure that the stack is deallocated
;-----------------------------------------------
MOV SP,#__stack
;-----------------------------------------------
; Clear the bottom of the stack. This will endup
; in RPC when we are finished
;-----------------------------------------------
MOV *SP++,#0
MOV *SP++,#0
;-----------------------------------------------
; Load RPC with the entry point as determined
; by the boot mode. This address will be returned
; in the ACC register.
;-----------------------------------------------
PUSH ACC
POP RPC
;-----------------------------------------------
; Put registers back in their reset state.
;
; Clear all the XARn, ACC, XT, and P and DP
; registers
;
; NOTE: Leave the device in C28x operating mode
; (OBJMODE = 1, AMODE = 0)
;-----------------------------------------------
ZAPA
MOVL XT,ACC
MOVZ AR0,AL
MOVZ AR1,AL
MOVZ AR2,AL
MOVZ AR3,AL
MOVZ AR4,AL
MOVZ AR5,AL
MOVZ AR6,AL
MOVZ AR7,AL
MOVW DP, #0
;------------------------------------------------
; Restore ST0 and ST1. Note OBJMODE is
; the only bit not restored to its reset state.
; OBJMODE is left set for C28x object operating
; mode.
;
; ST0 = 0x0000 ST1 = 0x0A0B
; 15:10 OVC = 0 15:13 ARP = 0
; 9: 7 PM = 0 12 XF = 0
; 6 V = 0 11 M0M1MAP = 1
; 5 N = 0 10 reserved
; 4 Z = 0 9 OBJMODE = 1
; 3 C = 0 8 AMODE = 0
; 2 TC = 0 7 IDLESTAT = 0
; 1 OVM = 0 6 EALLOW = 0
; 0 SXM = 0 5 LOOP = 0
; 4 SPA = 0
; 3 VMAP = 1
; 2 PAGE0 = 0
; 1 DBGM = 1
; 0 INTM = 1
;-----------------------------------------------
MOV *SP++,#0
MOV *SP++,#0x0A0B
POP ST1
POP ST0
;------------------------------------------------
; Jump to the EntryAddr as defined by the
; boot mode selected and continue execution
;-----------------------------------------------
LRETR
边栏推荐
- LeetCode 19. 删除链表的倒数第 N 个结点
- 钟珊珊:被爆锤后的工程师会起飞|OneFlow U
- Use to_ Numeric to numeric type
- 天才制造者:獨行俠、科技巨頭和AI|深度學習崛起十年
- Pytorch forecast house price
- Dbeaver installation and configuration of offline driver
- Sentimentin tensorflow_ analysis_ layer
- Learn from small samples and run to the sea of stars
- Introduction to classification data cotegory and properties and methods of common APIs
- Using requests library and re library to crawl web pages
猜你喜欢
cartographer_pose_graph_2d
Using requests library and re library to crawl web pages
The first gift of the project, the flying oar contract!
百度API地图的标注不是居中显示,而是显示在左上角是怎么回事?已解决!
Transport layer TCP protocol and UDP protocol
一个从坟墓里爬出的公司
Tensorflow and deep learning day 3
[unity3d] rigid body component
cartographer_optimization_problem_2d
Practical cases | getting started and mastering tkinter+pyinstaller
随机推荐
[quartz] read configuration from database to realize dynamic timing task
2.< tag-动态规划和常规问题>lt.343. 整数拆分
C# 39. string类型和byte[]类型相互转换(实测)
Zuul implements dynamic routing
【红队】要想加入红队,需要做好哪些准备?
A company crawling out of its grave
【quartz】从数据库中读取配置实现动态定时任务
DBeaver 安装及配置离线驱动
Sentimentin tensorflow_ analysis_ layer
Anaconda creates tensorflow environment
Create SSH key pair configuration steps
vscode config
SSH connected to win10 and reported an error: permission denied (publickey, keyboard interactive)
Pycharm package import error without warning
LSTM in tensorflow_ Layers actual combat
A ZABBIX self discovery script (shell Basics)
cartographer_optimization_problem_2d
瀚高数据库自定义操作符‘!~~‘
[unity3d] rigid body component
UWB超高精度定位系统架构图