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.

TMS320F2800157: 报错unresolved symbol _boot_main, first referenced in ./boot/src/Boot_Entry.obj

Part Number: TMS320F2800157

下面是app和bootloader合并一个工程里的用于booloader和app跳转的汇编代码(Boot_Entry.asm):

在28035工程上编译通过且正常运行,移植到00157工程上编译报错

unresolved symbol _boot_main, first referenced in ./boot/src/Boot_Entry.obj

void boot_main(void)为bootloader的main函数在外部c文件定义,且在.h文件extern了;main(void)为app的main函数

实测把LCR _boot_main位置放到LCR _main 上一行,则编译通过,但这样会改变运行逻辑。

下面为Boot_Entry.asm代码,麻烦分析下,感谢!

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
.global _AppEntPoint, _App_Entry
.global _RstEntPoint, _Rst_Entry
_AppEntPoint LB _App_Entry
_RstEntPoint LB _Rst_Entry
.ref _c_int00
.global _boot_main
.bss _MdlAddr,0
.bss _uiFromApp,0
.global _uiFromApp,_MdlAddr
__stack: .usect ".stack",0
.sect "FlashBoot"
_Rst_Entry:
; INITIALIZE STACK POINTER.
MOV AL,#__stack ; set to beginning of stack space
MOV @SP,AL
SPM 0 ; set product shift to 0
; SET C28x MODES
SETC OBJMODE ; select C28x object mode
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX