Despite the L1 being a low power device, my initial focus is on making it basically compatible with existing devices. To that end, provide clock setup helper routines that configure it for maximum performance, allowing some similar clock speeds to F1 devices to help with testing. This requires adding the power chipset routines to set the voltage range. Clock setup style is similar to the F4 code, which seems nicer than the overflow of different routines used on the F1 code. NOTE: Both the F4 existing pwr code, and this code don't actually include the f1 core power code, even though it should be compatible
40 lines
1.4 KiB
Makefile
40 lines
1.4 KiB
Makefile
##
|
|
## This file is part of the libopencm3 project.
|
|
##
|
|
## Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>
|
|
##
|
|
## This library is free software: you can redistribute it and/or modify
|
|
## it under the terms of the GNU Lesser General Public License as published by
|
|
## the Free Software Foundation, either version 3 of the License, or
|
|
## (at your option) any later version.
|
|
##
|
|
## This library is distributed in the hope that it will be useful,
|
|
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
## GNU Lesser General Public License for more details.
|
|
##
|
|
## You should have received a copy of the GNU Lesser General Public License
|
|
## along with this library. If not, see <http://www.gnu.org/licenses/>.
|
|
##
|
|
|
|
LIBNAME = libopencm3_stm32l1
|
|
|
|
PREFIX ?= arm-none-eabi
|
|
#PREFIX ?= arm-elf
|
|
CC = $(PREFIX)-gcc
|
|
AR = $(PREFIX)-ar
|
|
CFLAGS = -Os -g -Wall -Wextra -I../../../include -fno-common \
|
|
-mcpu=cortex-m3 -mthumb -Wstrict-prototypes \
|
|
-ffunction-sections -fdata-sections -MD -DSTM32L1
|
|
# ARFLAGS = rcsv
|
|
ARFLAGS = rcs
|
|
OBJS = rcc.o gpio.o desig.o crc.o usart.o exti2.o
|
|
OBJS += flash.o gpio_common_all.o gpio_common_f24.o
|
|
OBJS += pwr_chipset.o # TODO, get pwr.o to fix f2/f4 first... pwr.o
|
|
#OBJS += timer.o # WORK IN PROGRESS
|
|
|
|
VPATH += ../../usb:../:../../cm3:../common
|
|
|
|
include ../../Makefile.include
|
|
|