2

Makefile を変更して、対応するアセンブリ命令を生成したいと考えています。Makefile とコード リポジトリは次の場所にあります。

https://github.com/swetland/omap4boot

ただし、プリミティブに追加-SしてCFLAGSも、目的の動作にはなりません。

私は何が欠けていますか?

よろしく。

簡素化された Makefile (一部の行が省略されています)。

what_to_build:: all

-include local.mk

TOOLCHAIN ?= arm-eabi-

BOARD ?= panda

TARGET_CC := $(TOOLCHAIN)gcc
TARGET_LD := $(TOOLCHAIN)ld
TARGET_OBJCOPY := $(TOOLCHAIN)objcopy
TARGET_OBJDUMP := $(TOOLCHAIN)objdump

TARGET_CFLAGS := -g -S -Os  -Wall
TARGET_CFLAGS +=  -march=-march=armv7-a+sec -fno-builtin -ffreestanding
TARGET_CFLAGS += -I. -Iinclude
TARGET_CFLAGS += -include config_$(BOARD).h

TARGET_LIBGCC := $(shell $(TARGET_CC) $(TARGET_CFLAGS) -print-libgcc-file-name)

HOST_CFLAGS := -g -S -O2 -Wall
HOST_CFLAGS += -Itools

OUT := out/$(BOARD)
OUT_HOST_OBJ := $(OUT)/host-obj
OUT_TARGET_OBJ := $(OUT)/target-obj

ALL :=

include build/rules.mk

M_NAME := usbboot
M_OBJS := tools/usbboot.o
M_OBJS += tools/usb_linux.o
M_OBJS += 2ndstage.o
include build/host-executable.mk

M_NAME := mkheader
M_OBJS := tools/mkheader.o
include build/host-executable.mk

M_NAME := bin2c
M_OBJS := tools/bin2c.o
include build/host-executable.mk

M_NAME := aboot
M_BASE := 0x40309000
M_OBJS := arch/omap4/start.o
M_OBJS += arch/omap4/serial.o 


include build/target-executable.mk

$(OUT)/aboot.ift: $(OUT)/aboot.bin $(OUT)/mkheader
@echo generate $@
@./$(OUT)/mkheader $(TEXT_BASE) `wc -c $(OUT)/aboot.bin` > $@
@cat $(OUT)/aboot.bin >> $@
ALL += $(OUT)/aboot.ift

$(OUT_HOST_OBJ)/2ndstage.o: $(OUT)/aboot.bin $(OUT)/bin2c
@echo generate $@
$(QUIET)./$(OUT)/bin2c aboot < $(OUT)/aboot.bin > $(OUT)/2ndstage.c
gcc -c -o $@ $(OUT)/2ndstage.c

clean::
@echo clean
@rm -rf $(OUT)

all:: $(ALL)`
4

2 に答える 2