parent
060251d5f9
commit
613c870c7f
@ -0,0 +1,14 @@
|
||||
#ifndef __STM32L1XX_HW_H
|
||||
#define __STM32L1XX_HW_H
|
||||
|
||||
/* Configuration */
|
||||
#define MCU_SRAM_SIZE (48*1024)
|
||||
#define MCU_SRAM_BASE (0x20000000)
|
||||
#define MCU_EXTSRAM_SIZE (0)
|
||||
#define MCU_EXTSRAM_BASE (0x68000000)
|
||||
#define MCU_FLASH_BASE (0x08000000)
|
||||
#define MCU_FLASH_SIZE (384*1024)
|
||||
#define MCU_FLASH_PAGE_SIZE 2048
|
||||
#define MCU_FLASH_IMAGE_SIZE (382*1024)
|
||||
|
||||
#endif
|
@ -0,0 +1 @@
|
||||
stm32f10x.ld.in
|
@ -0,0 +1,41 @@
|
||||
# The processor!
|
||||
MCU_CORE=cm3
|
||||
# Set up include paths
|
||||
MCU_INCLUDE += -I$(LIBDIR)/CMSIS/Include
|
||||
MCU_INCLUDE += -I$(LIBDIR)/CMSIS/Device/ST/STM32L1xx/Include
|
||||
MCU_INCLUDE += -I$(LIBDIR)/STM32L1xx_StdPeriph_Driver/inc
|
||||
|
||||
# Set up CFLAGS
|
||||
MCU_CPPFLAGS += -D$(shell echo -n $(MCU_SUBTYPE) | tr a-z A-Z )
|
||||
MCU_CPPFLAGS += -D"assert_param(expr)=((void)0)"
|
||||
MCU_CFLAGS += -mcpu=cortex-m3 -mthumb -Wa,-mthumb
|
||||
|
||||
# Target Libraries
|
||||
MCU_LIBS += $(LIBDIR)/libstm32l1xx.a
|
||||
|
||||
# CMSIS
|
||||
STM32L1xx_OBJS = $(LIBDIR)/CMSIS/Device/ST/STM32L1xx/Source/Templates/system_stm32l1xx.o
|
||||
# Standard Peripheral Library
|
||||
STM32L1xx_OBJSR = misc.o stm32l1xx_adc.o stm32l1xx_aes.o stm32l1xx_aes_util.o \
|
||||
stm32l1xx_comp.o stm32l1xx_crc.o stm32l1xx_dac.o stm32l1xx_dbgmcu.o \
|
||||
stm32l1xx_dma.o stm32l1xx_exti.o stm32l1xx_flash.o \
|
||||
stm32l1xx_flash_ramfunc.o stm32l1xx_fsmc.o stm32l1xx_gpio.o \
|
||||
stm32l1xx_i2c.o stm32l1xx_iwdg.o stm32l1xx_lcd.o stm32l1xx_opamp.o \
|
||||
stm32l1xx_pwr.o stm32l1xx_rcc.o stm32l1xx_rtc.o stm32l1xx_sdio.o \
|
||||
stm32l1xx_spi.o stm32l1xx_syscfg.o stm32l1xx_tim.o stm32l1xx_usart.o \
|
||||
stm32l1xx_wwdg.o
|
||||
|
||||
STM32L1xx_OBJS += $(addprefix $(LIBDIR)/STM32L1xx_StdPeriph_Driver/src/,$(STM32L1xx_OBJSR))
|
||||
|
||||
# Bookkeeping
|
||||
MCU_LIBS_OBJS += $(STM32L1xx_OBJS)
|
||||
|
||||
# Build Rules
|
||||
$(LIBDIR)/startup_$(MCU_SUBTYPE).o: $(LIBDIR)/CMSIS/Device/ST/STM32L1xx/Source/Templates/gcc_ride7/startup_$(MCU_SUBTYPE).s
|
||||
@$(E) " AS " $@
|
||||
$(Q)$(AS) -c -o $@ $<
|
||||
|
||||
$(LIBDIR)/libstm32l1xx.a: $(STM32L1xx_OBJS) $(LIBDIR)/startup_$(MCU_SUBTYPE).o
|
||||
@$(E) " AR " $@
|
||||
$(Q)$(AR) cr $@ $(STM32L1xx_OBJS) $(LIBDIR)/startup_$(MCU_SUBTYPE).o
|
||||
|
Loading…
Reference in new issue