- Added STM standard peripheral library - Added FreeRTOS - Added FreeRTOS fixes and config - Added main.c Set up makefile structure and implemented makefiles for STM library and the hsb-mrts project Todo: HAL makefiles git-svn-id: https://svn.vbchaos.nl/svn/hsb/trunk@167 05563f52-14a8-4384-a975-3d1654cca0fa
70 lines
1.4 KiB
Makefile
70 lines
1.4 KiB
Makefile
# STM support library
|
|
|
|
STM32_STDPERIPH_INC = Libraries/STM32F10x_StdPeriph_Driver/inc/
|
|
CORE_DIR = Libraries/CMSIS/CM3/CoreSupport/
|
|
DEVICE_SUPPORT_DIR = Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x
|
|
|
|
SRC_DIR = Libraries/STM32F10x_StdPeriph_Driver/src/
|
|
|
|
INCLUDE_DIRS = \
|
|
-I$(DEVICE_SUPPORT_DIR) \
|
|
-I$(CORE_DIR) \
|
|
-I$(STM32_STDPERIPH_INC) \
|
|
|
|
|
|
OBJ_DIR = Libraries/STM32F10x_StdPeriph_Driver/obj
|
|
|
|
CROSS_COMPILE = arm-none-eabi-
|
|
|
|
CC = $(CROSS_COMPILE)gcc
|
|
CCFLAGS = -c -O2 -g -fno-common -mcpu=cortex-m3 -mthumb -DUSE_FULL_ASSERT $(INCLUDE_DIRS) -I. -Wall -Werror -D"assert_param(expr)=((void)0)"
|
|
|
|
AR = $(CROSS_COMPILE)ar
|
|
ARFLAGS = rs
|
|
|
|
OBJECTS = \
|
|
misc.o \
|
|
stm32f10x_adc.o \
|
|
stm32f10x_bkp.o \
|
|
stm32f10x_can.o \
|
|
stm32f10x_cec.o \
|
|
stm32f10x_crc.o \
|
|
stm32f10x_dac.o \
|
|
stm32f10x_dbgmcu.o \
|
|
stm32f10x_dma.o \
|
|
stm32f10x_exti.o \
|
|
stm32f10x_flash.o \
|
|
stm32f10x_fsmc.o \
|
|
stm32f10x_gpio.o \
|
|
stm32f10x_i2c.o \
|
|
stm32f10x_iwdg.o \
|
|
stm32f10x_pwr.o \
|
|
stm32f10x_rcc.o \
|
|
stm32f10x_rtc.o \
|
|
stm32f10x_sdio.o \
|
|
stm32f10x_spi.o \
|
|
stm32f10x_tim.o \
|
|
stm32f10x_usart.o \
|
|
stm32f10x_wwdg.o
|
|
|
|
LIBRARY = libSTM_StdPeriph.a
|
|
|
|
vpath %.c $(SRC_DIR)
|
|
vpath %.o $(OBJ_DIR)
|
|
|
|
all: $(LIBRARY)
|
|
|
|
$(LIBRARY): $(OBJ_DIR) $(OBJECTS) | $(OBJ_DIR)
|
|
$(AR) $(ARFLAGS) $@ $(addprefix $(OBJ_DIR)/, $(OBJECTS))
|
|
|
|
%.o: %.c
|
|
$(CC) $(CCFLAGS) $< -o $(OBJ_DIR)/$@
|
|
|
|
clean:
|
|
rm -rf $(LIBRARY) $(OBJ_DIR)
|
|
|
|
$(OBJ_DIR):
|
|
mkdir -p $@
|
|
|
|
.PHONY: all clean
|