ti-cgt-armllvm_3.2.0.LTS这个编译器在编译asm文件时,经常不识别一些指令,如下图,有两种错误,一个是if后面需要写绝对表达式,因为这两个宏没有定义,然后就报错了。还有一个是不能识别下面的类似.thumbfunc,.armfunc等指令。
源码如下:
报错如下:
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.
ti-cgt-armllvm_3.2.0.LTS这个编译器在编译asm文件时,经常不识别一些指令,如下图,有两种错误,一个是if后面需要写绝对表达式,因为这两个宏没有定义,然后就报错了。还有一个是不能识别下面的类似.thumbfunc,.armfunc等指令。
源码如下:
报错如下:
一个是if后面需要写绝对表达式
这个是要求的,请看下面的.if伪指令。
.if absolute expression
https://software-dl.ti.com/codegen/docs/tiarmclang/rel3_2_0_LTS/gnu_syntax_arm_asm_language/gnu_arm_directives/control_directives.html#gar-control-directives
还有一个是不能识别下面的类似.thumbfunc,.armfunc等指令。
请尝试使用.thumb_func,.armfunc不支持,请看下面user guide里的list
4.1. List of GNU-Syntax Arm Assembly Directives
https://software-dl.ti.com/codegen/docs/tiarmclang/rel3_2_0_LTS/gnu_syntax_arm_asm_language/gnu_arm_directives/alphabetical_directive_directory.html
我理解绝对表达式是没问题的,但是像我上述例子中,两个宏未定义,应该识别为0即可,然后调用else的逻辑代码,但此处报的错却是不能识别这样的表达式
请尝试使用.thumb_func,.armfunc不支持,请看下面user guide里的list
4.1. List of GNU-Syntax Arm Assembly Directives
https://software-dl.ti.com/codegen/docs/tiarmclang/rel3_2_0_LTS/gnu_syntax_arm_asm_language/gnu_arm_directives/alphabetical_directive_directory.html
此处是这几种指令都不识别,包括.thumb_func
综上:因为我编译的是SDK包中提供的MCAL Drv里的文件,所以这个应该是能正常适配编译器的才对。而我现在编译报错,是不是需要添加什么识别汇编asm文件的配置选项?
我咨询了e2e工程师,下面是他的回复。
您的汇编是用老版本的armcl写的,建议用较新的基于LLVM/Clang的TI Arm compiler>。
This is assembly code written to be built with the assembler from the older TI proprietary Arm compiler, often called by its short name armcl. To understand how to use it with the newer LLVM/Clang based TI Arm compiler, please see the Migrating Assembly Language Source Code part of the tiarmclang online manual.
https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1320527/tda4vm-ti-cgt-armllvm_3-2-0-lts
请看下面e2e工程师的回复。
MCAL应该是用 ti-cgt-armllvm_3.2.0.LTS写的。
I believe MCAL source files provided are written for ti-cgt-armllvm_3.2.0.LTS .
You can look for "What's new" section in below URL
麻烦回复一下下面工程师的问题。
Few things i didn't get here ,
Are the MCAL drivers showing compilation errors while building ?
or
Any errors while building examples ?
Please ask customer to state their problem a bit more clear.
请看下面工程师的回复。他需要咨询其他工程师i,要晚点回复。
sorry for the delay.
The boot.asm file used in PDK has been used in MCAL as well. so i am trying to get more info from the team and expert was not available last week.Allow me some more time to get the info.
请把下面的代码去掉再试试。
Remove the below in source code and check once.