我试图让本教程按预期工作但没有成功(在bl主要指令之后出现故障).根据教程命令
(qemu) xp /1dw 0xa0000018
Run Code Online (Sandbox Code Playgroud)
应该导致打印33(但我得到0x00而不是)
a0000018: 33
Run Code Online (Sandbox Code Playgroud)
这是主调用后寄存器的内容(参见startup.s)
(qemu) info registers
R00=a000001c R01=a000001c R02=00000006 R03=00000000
R04=00000000 R05=00000005 R06=00000006 R07=00000007
R08=00000008 R09=00000009 R10=00000000 R11=a3fffffc
R12=00000000 R13=00000000 R14=0000003c R15=00000004
PSR=800001db N--- A und32
FPSCR: 00000000
Run Code Online (Sandbox Code Playgroud)
我有以下文件
main.c
startup.s
lscript.ld
Makefile
Run Code Online (Sandbox Code Playgroud)
我正在使用以下工具链
arm-2013.11-24-arm-none-eabi-i686-pc-linux-gnu
Run Code Online (Sandbox Code Playgroud)
Makefile:
SRCS := main.c startup.s
LINKER_NAME := lscript.ld
ELF_NAME := program.elf
BIN_NAME := program.bin
FLASH_NAME := flash.bin
CC := arm-none-eabi
CFLAGS := -nostdlib
OBJFLAGS ?= -DS
QEMUFLAGS := -M connex -pflash $(FLASH_NAME) -nographic -serial …Run Code Online (Sandbox Code Playgroud)