Keil?MDK中使用Arm?compiler?6注意事項(xiàng)
[導(dǎo)讀]關(guān)注、星標(biāo)公眾號(hào),直達(dá)精彩內(nèi)容來(lái)源:技術(shù)讓夢(mèng)想更偉大整理:李肖遙使用ArmCompiler6要求MDK版本:5.23及以上版本KeilMDK-MiddlewarePack:Version7.4.0orhigherKeilARMCompilerSupportPack:Version...
關(guān)注、星標(biāo)公眾號(hào),直達(dá)精彩內(nèi)容
// Iterate round a loop 10 times, adding 1 to a register each time.
.section .text,"x"
.balign 4
main: //
MOV w5,#0x64 // W5 = 100
MOV w4,#0 // W4 = 0
B test_loop // branch to test_loop
loop:
ADD w5,w5,#1 // Add 1 to W5
ADD w4,w4,#1 // Add 1 to W4
test_loop:
CMP w4,#0xa // if W4 < 10, branch back to loop
BLT loop
.end //
- MDK版本:5.23及以上版本
- Keil MDK-Middleware Pack:Version 7.4.0 or higher
- Keil ARM Compiler Support Pack:Version 1.3.0 or higher
- ARM CMSIS Pack Version:5.0.1 or higher
AC5與AC6不同之處
- 不顯示警告信息,使用-Wno-參數(shù)。這樣有助于我們將關(guān)注點(diǎn)放在修改錯(cuò)誤上來(lái)。關(guān)于詳細(xì)的AC6警告選項(xiàng)請(qǐng)參考:http://clang.llvm.org/docs/DiagnosticsReference.html
- AC5與AC6不兼容的語(yǔ)言擴(kuò)展
- AC6開(kāi)始兼容GNU風(fēng)格的匯編代碼
// Iterate round a loop 10 times, adding 1 to a register each time.
.section .text,"x"
.balign 4
main: //
MOV w5,#0x64 // W5 = 100
MOV w4,#0 // W4 = 0
B test_loop // branch to test_loop
loop:
ADD w5,w5,#1 // Add 1 to W5
ADD w4,w4,#1 // Add 1 to W4
test_loop:
CMP w4,#0xa // if W4 < 10, branch back to loop
BLT loop
.end //
- AC6增加了對(duì)Link時(shí)間的優(yōu)化





