Hi,
Maybe my question is a little off-topic. I want to run an open source project on Windows as well.
I downloaded Github project payne92/bare-metal-arm · GitHub, and tried to build it in Windows. The windows version of gcc-arm is used and makefile is updated for toolchain path.
GCCBIN = C:/gcc-arm/gcc-arm-none-eabi-4_7-2013q1-20130313-win32/bin
CC = $(GCCBIN)/arm-none-eabi-gcc
AR = $(GCCBIN)/arm-none-eabi-ar
OBJCOPY = $(GCCBIN)/arm-none-eabi-objcopy
OBJDUMP = $(GCCBIN)/arm-none-eabi-objdump
SIZE = $(GCCBIN)/arm-none-eabi-size
RM = rm
DEBUG_OPTS = -g3 -gdwarf-2
OPTS = -Os
TARGET = -mcpu=cortex-m0
CFLAGS = -ffunction-sections -fdata-sections -Wall -Wa,-adhlns=$(addsuffix .lst, $(basename $<)) \
-fmessage-length=0 $(TARGET) -mthumb -mfloat-abi=soft \
$(DEBUG_OPTS) $(OPTS) -I .
LIBOBJS = _startup.o syscalls.o uart.o delay.o accel.o touch.o usb.o \
ring.o tests.o
#LIBOBJS = _startup.o syscalls.o uart.o delay.o accel.o touch.o usb.o ring.o
INCLUDES = freedom.h common.h
#all: demo.srec demo.dump
all: demo.dump demo.srec
libbare.a: $(LIBOBJS)
$(AR) -rv libbare.a $(LIBOBJS)
clean:
$(RM) *.o *.lst *.out libbare.a *.srec *.dump
%.o: %.c
$(CC) $(CFLAGS) -c $<
%.dump: %.out
$(SIZE) $<
$(OBJDUMP) --disassemble $< >$@
%.srec: %.out
$(OBJCOPY) -O srec $< $@
$(SIZE) $@
%.out: %.o mkl25z4.ld libbare.a
$(CC) $(CFLAGS) -T mkl25z4.ld -o $@ $< libbare.a
I can build it successfully. but the demo.out demo.o will be removed anyway. But I can not find it in makefile.
C:/gcc-arm/gcc-arm-none-eabi-4_7-2013q1-20130313-win32/bin/arm-none-eabi-size demo.out
text data bss dec hex filename
21644 2268 440 24352 5f20 demo.out
C:/gcc-arm/gcc-arm-none-eabi-4_7-2013q1-20130313-win32/bin/arm-none-eabi-objdump --disassemble demo.out >demo.dump
C:/gcc-arm/gcc-arm-none-eabi-4_7-2013q1-20130313-win32/bin/arm-none-eabi-objcopy -O srec demo.out demo.srec
C:/gcc-arm/gcc-arm-none-eabi-4_7-2013q1-20130313-win32/bin/arm-none-eabi-size demo.srec
text data bss dec hex filename
0 23912 0 23912 5d68 demo.srec
rm demo.o demo.out
How can I keep demo.o demo.out after building project?