1:LDMIA sp!, {lr, r1}
warning: register list not in ascending order
解决方法:LDMIA sp!, {r1, lr}
2: .global _tx_thread_context_save
_tx_thread_context_save:
Error: L6286E: Relocation #REL:4 in startup.o(StartUp) with respect to _tx_thread_context_save. Value(0x8000202) out of range(-0x00800000 - 0x7fffff) for (R_ARM_JUMP24)
解决方法:.global _tx_thread_context_save
.type _tx_thread_context_save, function
_tx_thread_context_save:
3:汇编文件中#include,#ifdef没起作用
解决方法:在settings->Arm Assembler6->Miscellaneous加上 -x assembler-with-cpp,表示Assembly code containing C directives that require the C preprocessor.
4:'~PRES8 (The user did not require code to preserve 8-byte data objects)' section vectors.o(.text) should not use the address of 'REQ8 (Code was permitted to depend on the 8-byte aligment of 8-byte data items)' function Undefined_Handler.
解决方法:文件开头加 .eabi_attribute Tag_ABI_align_preserved, 1