大家好,我这边正在做通过用28335通过can在线升级程序功能,现在有个问题请教大家:
步骤执行到DSP2833x_CodeStartBranch.asm文件时,也即调用了_c_int00子程序后不是会跳转到main函数执行么,那么请问如果我此时在线升级代码和用户功能代码都存在flash里面时,那不是有两个main函数么?那为什么系统是跳到在线升级的代码中的main处去执行而不是用户功能代码里面的main处执行呢?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
大家好,我这边正在做通过用28335通过can在线升级程序功能,现在有个问题请教大家:
步骤执行到DSP2833x_CodeStartBranch.asm文件时,也即调用了_c_int00子程序后不是会跳转到main函数执行么,那么请问如果我此时在线升级代码和用户功能代码都存在flash里面时,那不是有两个main函数么?那为什么系统是跳到在线升级的代码中的main处去执行而不是用户功能代码里面的main处执行呢?
参考一下如下代码:
.ref _c_int00
.global code_start
***********************************************************************
*Function : codestart section
*
*Description : Branch to code starting point
***********************************************************************
.sect "codestart"
code_start:
LB check ; LB _c_int00 ;Branch to start of boot.asm in RTS library
; end codestart section
.sect ".text"
check:
MOVL XAR0, #0x13F780 ; left 2k for mark in sector A
CMP *XAR0, #0xFFFF ; never update before
B app, EQ
LB search
addPTR:
ADDB XAR0, #0x4 ;#1 or #4 or#8
search:
CMP *XAR0, #0xFFFF
B addPTR, NEQ
SUBB XAR0, #0x4
CMP *XAR0, #0xFFF0
B app, EQ
LB _c_int00
app:
MOVL XAR7, #0x13A000 ;jump to user app code
LB *XAR7
.end
---ERIC