-
-
Notifications
You must be signed in to change notification settings - Fork 775
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
armclang .S文件编译报错,以及--cpu报错 #1962
Comments
改了 28fe6eb
要分也可以,但是要根据特定传进来的 arch 来区分哪些是 aarch64的。。目前传的 arch 就是 cpu 。。我不清楚哪些是 arm64 。。你知道的话,也可以帮忙提个 pr 改下 |
@waruqi 已经添加aarch64支持,增加了armclang 的 -mcpu和 armlink --cpu参数差异的支持,如果没问题的话就提交PR了? $ R:\Keil_v5\ARM\ARMCLANG\bin>armclang -mcpu=list --target=arm-arm-none-eabi
The following arguments to option 'mcpu' can be selected:
-mcpu=cortex-m0
-mcpu=cortex-m0plus
-mcpu=cortex-m1
-mcpu=cortex-m3
-mcpu=cortex-m4
-mcpu=cortex-m7
-mcpu=cortex-m23
-mcpu=cortex-m33
-mcpu=cortex-m35p
-mcpu=cortex-m55
-mcpu=cortex-r4
-mcpu=cortex-r4f
-mcpu=sc000
-mcpu=sc300
$ R:\Keil_v5\ARM\ARMCLANG\bin>armlink --cpu=list
The following arguments to option 'cpu' can be selected:
--cpu=6-M
--cpu=6S-M
--cpu=7-R
--cpu=7-M
--cpu=7E-M
--cpu=8-M.Base
--cpu=8-M.Main
--cpu=8-M.Main.dsp
--cpu=8.1-M.Main
--cpu=8.1-M.Main.dsp
--cpu=8.1-M.Main.mve
--cpu=8.1-M.Main.mve.fp
--cpu=Cortex-M0
--cpu=Cortex-M0plus
--cpu=SC000
--cpu=Cortex-M1
--cpu=Cortex-M1.os_extension
--cpu=Cortex-M1.no_os_extension
--cpu=Cortex-M3
--cpu=Cortex-M3-rev0
--cpu=SC300
--cpu=Cortex-M4
--cpu=Cortex-M4.no_fp
--cpu=Cortex-M7
--cpu=Cortex-M7.fp.sp
--cpu=Cortex-M7.no_fp
--cpu=Cortex-M23
--cpu=Cortex-M33
--cpu=Cortex-M33.no_fp
--cpu=Cortex-M33.no_dsp
--cpu=Cortex-M33.no_dsp.no_fp
--cpu=Cortex-M35P
--cpu=Cortex-M35P.no_fp
--cpu=Cortex-M35P.no_dsp
--cpu=Cortex-M35P.no_dsp.no_fp
--cpu=Cortex-M55
--cpu=Cortex-M55.no_mvefp
--cpu=Cortex-M55.no_fp
--cpu=Cortex-M55.no_mve
--cpu=Cortex-M55.no_mve.no_fp
--cpu=Cortex-R4
--cpu=Cortex-R4F |
已更新,按照命令给出的提示,armlink时不需要替换plus为+,测试也OK。 |
就一个 arm64 判断,搞的有点复杂了,而且原本有内置 s:replace("", "", {plain = true}) 可用 另外所有 string 操作,直接用 s:xx 替代 string.xx(s, ..) 保持风格一致 你可以先开 pr 我到时候 review后 你再改下 |
描述问题
1. 编译.S文件时,报错:
error: "<command line>", line 2: Error: A1167E: Invalid line start
2. 修复.S文件报错后
error: armclang: error: unsupported option '--cpu'
期待的结果
错误信息
1.
.S
文件报错2. error: armclang: error: unsupported option '--cpu'
按
修复.1
修复后又报错相关环境
请提供编译和运行环境信息,下面是一些必须填写的基础信息,便于我们针对性排查问题:
其他信息
armclang.exe
来进行编译,仅根据参数来区分GNU Syntax和Arm Syntax.Keil Arm assmbler
arm-arm-none-eabi
和aarch64-arm-none-eabi
,但目前固定为arm-arm-none-eabi
似乎也没什么大问题,keil还是32位的用得多些修复
1.
.S
报错修改安装目录下
xmake/toolchains/armclang/xmake.lua
中 as 命令为 armclang2. 完全修复
直接替换
xmake/toolchains/armclang/xmake.lua
内容target加入add_asflags("-masm=auto"),
- 0 Error(s), 0 Warning(s).
达成^_^.The text was updated successfully, but these errors were encountered: