GCC_BIN =
PROJECT = cmsis_rtos_demo_thread
OBJECTS = ./mbed-rtos/rtx/rt_Semaphore.o ./mbed-rtos/rtx/rt_Event.o ./mbed-rtos/rtx/rt_List.o ./mbed-rtos/rtx/rt_Mutex.o ./mbed-rtos/rtx/HAL_CM.o ./mbed-rtos/rtx/rt_Task.o ./mbed-rtos/rtx/rt_CMSIS.o ./mbed-rtos/rtx/rt_System.o ./mbed-rtos/rtx/rt_Time.o ./mbed-rtos/rtx/rt_MemBox.o ./mbed-rtos/rtx/rt_Robin.o ./mbed-rtos/rtx/RTX_Conf_CM.o ./mbed-rtos/rtx/rt_Mailbox.o ./main.o ./mbed-rtos/rtos/Thread.o ./mbed-rtos/rtos/Semaphore.o ./mbed-rtos/rtos/Mutex.o ./mbed-rtos/rtos/RtosTimer.o
SYS_OBJECTS =
INCLUDE_PATHS = -I. -I./mbed-rtos -I./mbed-rtos/rtos -I./mbed-rtos/rtx -I./mbed
LIBRARY_PATHS =
LIBRARIES =
LINKER_SCRIPT = None
###############################################################################
AS = $(GCC_BIN)arm-none-eabi-as
CC = $(GCC_BIN)arm-none-eabi-gcc
CPP = $(GCC_BIN)arm-none-eabi-g++
LD = $(GCC_BIN)arm-none-eabi-gcc
OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy
OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump
SIZE = $(GCC_BIN)arm-none-eabi-size
CPU = -mcpu=cortex-m3 -mthumb
CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer
CC_FLAGS += -MMD -MP
CC_SYMBOLS = -DTARGET_NUCLEO_F103RB -DTARGET_M3 -DTARGET_CORTEX_M -DTARGET_STM -DTARGET_STM32F1 -DTARGET_STM32F103RB -DTOOLCHAIN_GCC_ARM -DTOOLCHAIN_GCC -D__CORTEX_M3 -DARM_MATH_CM3 -DMBED_BUILD_TIMESTAMP=1431315978.78 -D__MBED__=1 -DTARGET_FF_ARDUINO -DTARGET_FF_MORPHO
LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main
LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref
LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys
ifeq ($(DEBUG), 1)
CC_FLAGS += -DDEBUG -O0
else
CC_FLAGS += -DNDEBUG -Os
endif
all: $(PROJECT).bin $(PROJECT).hex
clean:
rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS)
.s.o:
$(AS) $(CPU) -o $[url=home.php?mod=space&uid=72445]@[/url] $<
.c.o:
$(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $<
.cpp.o:
$(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 -fno-rtti $(INCLUDE_PATHS) -o $@ $<
$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS)
$(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS)
$(SIZE) $@
$(PROJECT).bin: $(PROJECT).elf
@$(OBJCOPY) -O binary $< $@
$(PROJECT).hex: $(PROJECT).elf
@$(OBJCOPY) -O ihex $< $@
$(PROJECT).lst: $(PROJECT).elf
@$(OBJDUMP) -Sdh $< > $@
lst: $(PROJECT).lst
size:
$(SIZE) $(PROJECT).elf
DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d)
|