LDR R12,=rt_free_box
MRS R3,IPSR
LSLS R3,#24
BXNE R12
MRS R3,CONTROL
LSLS R3,#31
BXEQ R12
SVC 0
BX LR
报错:
Error: thumb conditional instruction should be in IT block -- `bxne R12'
Error: thumb conditional instruction should be in IT block -- `bxeq R12'
gcc4.6.2编译器设置
AS = arm-none-eabi-gcc -x assembler-with-cpp
ASFLAGS = $(MCFLAGS) -mthumb -mfpu=vfp -mno-thumb-interwork -msoft-float -mfix-cortex-m3-ldrd -g -gdwarf-2 -Wa,-amhls=$(<:.s=.lst) $(ADEFS)
该程序为rvmdk下面正确可用的代码,我把它移植到gcc上面就出了这个问题。 |