new makefiles

This commit is contained in:
Rene Hopf
2015-12-30 08:14:51 +01:00
parent fe22230ba5
commit 498d2a77b8
22 changed files with 619 additions and 873 deletions

3
.gitignore vendored
View File

@@ -68,3 +68,6 @@ eagle.epf
*.info
*.eps
obj_app/
obj_boot/
obj_hv/

View File

@@ -19,9 +19,6 @@ before_install:
- export CXX="g++-4.8" CC="gcc-4.8"
script:
- make
- cd stm32f103/
- make
- cd ..
- cd term/
- mkdir build/
- cd build/

270
Makefile
View File

@@ -1,82 +1,238 @@
SRCS = main.c stm32f4xx_it.c system_stm32f4xx.c printf.c scanf.c setup.c hal.c misc.c eeprom.c link.c version.c syscalls.c shared/crc8.c shared/crc32.c shared/common.c
# Optimization level, can be [0, 1, 2, 3, s].
# 0 = turn off optimization. s = optimize for size.
#
OPT = -O1 -flto
# OPT = -O1 # for debugging
SRCS += ub_lib/stm32_ub_usb_cdc.c ub_lib/usb_cdc_lolevel/usb_core.c ub_lib/usb_cdc_lolevel/usb_dcd_int.c ub_lib/usb_cdc_lolevel/usbd_req.c ub_lib/usb_cdc_lolevel/usbd_cdc_core.c ub_lib/usb_cdc_lolevel/usbd_core.c ub_lib/usb_cdc_lolevel/usb_dcd.c ub_lib/usb_cdc_lolevel/usbd_cdc_vcp.c ub_lib/usb_cdc_lolevel/usbd_desc.c ub_lib/usb_cdc_lolevel/usbd_ioreq.c ub_lib/usb_cdc_lolevel/usb_bsp.c ub_lib/usb_cdc_lolevel/usbd_usr.c
# Object files directory
# Warning: this will be removed by make clean!
#
OBJDIR = obj_app
# all the files will be generated with this name (main.elf, main.bin, main.hex, etc)
# Target file name (without extension)
TARGET = $(OBJDIR)/stmbl
PROJ_NAME=main
# Define all C source files (dependencies are generated automatically)
INCDIRS += inc
INCDIRS += shared
# that's it, no need to change anything below this line!
SOURCES += src/main.c
SOURCES += src/stm32f4xx_it.c
SOURCES += src/system_stm32f4xx.c
SOURCES += src/printf.c
SOURCES += src/scanf.c
SOURCES += src/setup.c
SOURCES += src/hal.c
SOURCES += src/misc.c
SOURCES += src/eeprom.c
SOURCES += src/link.c
SOURCES += src/version.c
SOURCES += src/syscalls.c
###################################################
SOURCES += shared/crc8.c
SOURCES += shared/crc32.c
SOURCES += shared/common.c
CC=arm-none-eabi-gcc
OBJCOPY=arm-none-eabi-objcopy
#CCDIR = /Users/rene/Downloads/gcc-arm-none-eabi-4_7-2013q3/bin
#USB CDC
INCDIRS += src/ub_lib
INCDIRS += src/ub_lib/usb_cdc_lolevel
CFLAGS = -g -Wall -Tstm32_flash.ld -std=gnu99 -fno-builtin -CC -fdiagnostics-color=always
CFLAGS += -mlittle-endian -mthumb -mcpu=cortex-m4 -mthumb-interwork -nostartfiles
CFLAGS += -mfloat-abi=hard -mfpu=fpv4-sp-d16 -nostartfiles -fsingle-precision-constant
CFLAGS += -ffunction-sections -fdata-sections -O1
CFLAGS += -Ilib/inc/core -Ilib/inc/peripherals -Isrc/ub_lib -Isrc/ub_lib/usb_cdc_lolevel
SOURCES += src/ub_lib/stm32_ub_usb_cdc.c
SOURCES += src/ub_lib/usb_cdc_lolevel/usb_core.c
SOURCES += src/ub_lib/usb_cdc_lolevel/usb_dcd_int.c
SOURCES += src/ub_lib/usb_cdc_lolevel/usbd_req.c
SOURCES += src/ub_lib/usb_cdc_lolevel/usbd_cdc_core.c
SOURCES += src/ub_lib/usb_cdc_lolevel/usbd_core.c
SOURCES += src/ub_lib/usb_cdc_lolevel/usb_dcd.c
SOURCES += src/ub_lib/usb_cdc_lolevel/usbd_cdc_vcp.c
SOURCES += src/ub_lib/usb_cdc_lolevel/usbd_desc.c
SOURCES += src/ub_lib/usb_cdc_lolevel/usbd_ioreq.c
SOURCES += src/ub_lib/usb_cdc_lolevel/usb_bsp.c
SOURCES += src/ub_lib/usb_cdc_lolevel/usbd_usr.c
###################################################
# Standard peripheral library
CPPFLAGS += -DUSE_STDPERIPH_DRIVER
#CPPFLAGS += -DUSE_FULL_ASSERT
vpath %.c src
vpath %.a lib
INCDIRS += lib/inc/peripherals
INCDIRS += lib/inc
INCDIRS += lib/inc/core
ROOT=$(shell pwd)
SOURCES += lib/src/peripherals/stm32f4xx_adc.c
SOURCES += lib/src/peripherals/stm32f4xx_dma.c
SOURCES += lib/src/peripherals/stm32f4xx_flash.c
SOURCES += lib/src/peripherals/stm32f4xx_gpio.c
SOURCES += lib/src/peripherals/stm32f4xx_pwr.c
SOURCES += lib/src/peripherals/stm32f4xx_rcc.c
SOURCES += lib/src/peripherals/stm32f4xx_tim.c
SOURCES += lib/src/peripherals/stm32f4xx_usart.c
SOURCES += lib/src/peripherals/misc.c
CFLAGS += -Iinc -Ilib -Ilib/inc -Ishared
CFLAGS += -Ilib/inc/core -Ilib/inc/peripherals
SOURCES += lib/startup_stm32f4xx.s
SRCS += lib/startup_stm32f4xx.s # add startup file to build
#CPPFLAGS += -DSTM32F40_41xxx
LDSCRIPT = stm32_flash.ld
OBJS = $(SRCS:.c=.o)
#============================================================================
OBJECTS += $(addprefix $(OBJDIR)/,$(addsuffix .o,$(basename $(SOURCES))))
OBJECTS += hv_firmware.o
CPPFLAGS += $(addprefix -I,$(INCDIRS))
###################################################
#---------------- Preprocessor Options ----------------
# -fsingle... make better use of the single-precision FPU
# -g generate debugging information
# -save-temps preserve .s and .i-files
#
CPPFLAGS += -fsingle-precision-constant
CPPFLAGS += -g
# CPPFLAGS += -save-temps=obj
.PHONY: lib proj
#---------------- C Compiler Options ----------------
# -O* optimization level
# -f... tuning, see GCC documentation
# -Wall... warning level
#
CFLAGS += $(OPT)
CFLAGS += -std=gnu11
CFLAGS += -ffunction-sections
CFLAGS += -fdata-sections
CFLAGS += -Wall
CFLAGS += -fno-builtin ## from old
CFLAGS += -nostartfiles
#CFLAGS += -Wstrict-prototypes
#CFLAGS += -Wextra
#CFLAGS += -Wpointer-arith
#CFLAGS += -Winline
#CFLAGS += -Wunreachable-code
#CFLAGS += -Wundef
all: lib proj
# Use a friendly C dialect
CPPFLAGS += -fno-strict-aliasing
CPPFLAGS += -fwrapv
again: clean all
#---------------- C++ Compiler Options ----------------
#
CXXFLAGS += $(OPT)
CXXFLAGS += -ffunction-sections
CXXFLAGS += -fdata-sections
CXXFLAGS += -Wall
# Flash the STM32F4
burn: main.elf
st-flash --reset write $(PROJ_NAME).bin 0x08010000
#---------------- Assembler Options ----------------
# -Wa,... tell GCC to pass this to the assembler
#
btburn: main.elf
#---------------- Linker Options ----------------
# -Wl,... tell GCC to pass this to linker
# -Map create map file
# --cref add cross reference to map file
#
LDFLAGS += $(OPT)
LDFLAGS += -lm
LDFLAGS += -Wl,-Map=$(TARGET).map,--cref
LDFLAGS += -Wl,--gc-sections
# LDFLAGS += -specs=nano.specs -u _printf_float -u _scanf_float
LDFLAGS += -T$(LDSCRIPT)
#============================================================================
# Define programs and commands
#
TOOLCHAIN = arm-none-eabi-
CC = $(TOOLCHAIN)gcc
OBJCOPY = $(TOOLCHAIN)objcopy
OBJDUMP = $(TOOLCHAIN)objdump
SIZE = $(TOOLCHAIN)size
NM = $(TOOLCHAIN)nm
MKDIR = mkdir
POSTLD = Tools/add_version_info.py # -q
# Compiler flags to generate dependency files
#
GENDEPFLAGS = -MMD -MP
# Combine all necessary flags and optional flags
# Add target processor to flags.
#
CPU = -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16
CFLAGS += $(CPU)
CXXFLAGS += $(CPU)
ASFLAGS += $(CPU)
LDFLAGS += $(CPU)
# Default target
#
all: hv gccversion boot hv build showsize
build: elf hex bin lss sym
elf: $(TARGET).elf
hex: $(TARGET).hex
bin: $(TARGET).bin
lss: $(TARGET).lss
sym: $(TARGET).sym
boot:
$(MAKE) -f bootloader/Makefile
boot_clean:
$(MAKE) -f bootloader/Makefile clean
boot_flash: boot
$(MAKE) -f bootloader/Makefile flash
boot_btflash: boot
$(MAKE) -f bootloader/Makefile btflash
hv:
$(MAKE) -f stm32f103/Makefile
hv_firmware.o: hv
arm-none-eabi-objcopy --rename-section .data=.hv_firmware -I binary obj_hv/hv.bin -B arm -O elf32-littlearm hv_firmware.o
# Display compiler version information
#
gccversion:
@$(CC) --version
# Show the final program size
#
showsize: build
@echo
@$(SIZE) $(TARGET).elf 2>/dev/null
# Flash the device
#
btburn: build showsize
#change this to your device
printf "bootloader\r" > `ls /dev/cu.usbmodem*` || true
printf "bootloader\r" > `ls /dev/ttyACM*` || true
sleep 1
dfu-util -a 0 -d 0483:df11 -s 0x08010000:leave -D main.bin
# Create tags; assumes ctags exists
ctags:
ctags -R --exclude=*cm0.h --exclude=*cm3.h .
lib:
$(MAKE) -C lib
proj: $(PROJ_NAME).elf
hv_firmware.o: stm32f103/main.bin
arm-none-eabi-objcopy --rename-section .data=.hv_firmware -I binary stm32f103/main.bin -B arm -O elf32-littlearm hv_firmware.o
stm32f103/main.bin:
make -C stm32f103/ all
$(PROJ_NAME).elf: $(SRCS) hv_firmware.o
$(CC) $(CFLAGS) $^ -o $@ -Llib -lstm32f4 -Wl,--gc-sections -Wl,-Map -Wl,$(PROJ_NAME).map
tools/add_version_info.py $(PROJ_NAME).elf
$(OBJCOPY) -O binary --gap-fill 0xFF $(PROJ_NAME).elf $(PROJ_NAME).bin
tools/checkcrc.py $(PROJ_NAME).bin
arm-none-eabi-size $(PROJ_NAME).elf
dfu-util -a 0 -d 0483:df11 -s 0x08010000:leave -D $(TARGET).bin
# Target: clean project
#
clean:
rm -f *.o *.i
rm -f $(PROJ_NAME).elf
rm -f $(PROJ_NAME).hex
rm -f $(PROJ_NAME).bin
@echo Cleaning project:
rm -rf hv_firmware.o
rm -rf $(OBJDIR)
@$(MAKE) -f bootloader/Makefile clean
@$(MAKE) -f stm32f103/Makefile clean
# Include the base rules
#
include base.mak
# Include the dependency files
#
-include $(OBJECTS:.o=.d)
# Listing of phony targets
#
.PHONY: all build flash clean \
boot boot_clean boot_flash btburn boot_btflash boot_flash\
elf lss sym \
showsize gccversion

65
base.mak Normal file
View File

@@ -0,0 +1,65 @@
# Link: create ELF output file from object files
#
$(TARGET).elf: $(OBJECTS) $(LDSCRIPT)
@echo
@echo Linking: $@
@$(MKDIR) -p $(dir $@)
$(CC) $(OBJECTS) $(LDFLAGS) --output $(basename $@).tmp
@echo
@echo Post-processing: $@
$(POSTLD) $(basename $@).tmp $@
# Create extended listing file from ELF output file
#
%.lss: %.elf
@echo
@echo Creating Extended Listing: $@
@$(MKDIR) -p $(dir $@)
$(OBJDUMP) -h -S -z $< > $@
# Create a symbol table from ELF output file
#
%.sym: %.elf
@echo
@echo Creating Symbol Table: $@
@$(MKDIR) -p $(dir $@)
$(NM) -n $< > $@
# Create final output files from ELF output file.
#
%.hex: %.elf
@echo
@echo Creating hex file: $@
@$(MKDIR) -p $(dir $@)
$(OBJCOPY) -O ihex $< $@
# Create binary output file from ELF output file.
#
%.bin: %.elf
@echo
@echo Creating bin file: $@
@$(MKDIR) -p $(dir $@)
$(OBJCOPY) -O binary --gap-fill 0xFF $< $@
# Compile: create object files from C source files
#
$(OBJDIR)/%.o : %.c
@echo
@echo Compiling C: $<
@$(MKDIR) -p $(dir $@)
$(CC) -c $(CPPFLAGS) $(CFLAGS) $(GENDEPFLAGS) $< -o $@
$(OBJDIR)/%.o : %.cpp
@echo
@echo Compiling C++: $<
@$(MKDIR) -p $(dir $@)
$(CC) -c $(CPPFLAGS) $(CXXFLAGS) $(GENDEPFLAGS) $< -o $@
# Assemble: create object files from assembler source files
#
$(OBJDIR)/%.o : %.s
@echo
@echo Assembling: $<
@$(MKDIR) -p $(dir $@)
$(CC) -c $(CPPFLAGS) $(ASFLAGS) $(GENDEPFLAGS) $< -o $@

View File

@@ -1,86 +1,192 @@
# put your *.o targets here, make should handle the rest!
#TODO
#dependency files
#ld gcollection
#komische flags
# Optimization level, can be [0, 1, 2, 3, s].
# 0 = turn off optimization. s = optimize for size.
#
OPT = -O1 -flto
# OPT = -O1 # for debugging
SRCS = main.c stm32f4xx_it.c system_stm32f4xx.c version.c ../shared/crc32.c
# Object files directory
# Warning: this will be removed by make clean!
#
OBJDIR = obj_boot
# all the files will be generated with this name (main.elf, main.bin, main.hex, etc)
# Target file name (without extension)
TARGET = $(OBJDIR)/blboot
PROJ_NAME=main
# Define all C source files (dependencies are generated automatically)
INCDIRS += inc
INCDIRS += bootloader/src
INCDIRS += shared
# Put your stlink folder here so make burn will work.
SOURCES += bootloader/src/main.c
SOURCES += bootloader/src/version.c
SOURCES += bootloader/src/stm32f4xx_it.c
SOURCES += bootloader/src/system_stm32f4xx.c
#STLINK=/mnt/share/Programming/embedded/stm32/stlink
SOURCES += shared/crc32.c
# that's it, no need to change anything below this line!
# Standard peripheral library
CPPFLAGS += -DUSE_STDPERIPH_DRIVER
#CPPFLAGS += -DUSE_FULL_ASSERT
###################################################
INCDIRS += lib/inc/peripherals
INCDIRS += lib/inc
INCDIRS += lib/inc/core
CC=arm-none-eabi-gcc
OBJCOPY=arm-none-eabi-objcopy
#CCDIR = /Users/rene/Downloads/gcc-arm-none-eabi-4_7-2013q3/bin
SOURCES += lib/src/peripherals/stm32f4xx_adc.c
SOURCES += lib/src/peripherals/stm32f4xx_dma.c
SOURCES += lib/src/peripherals/stm32f4xx_flash.c
SOURCES += lib/src/peripherals/stm32f4xx_gpio.c
SOURCES += lib/src/peripherals/stm32f4xx_pwr.c
SOURCES += lib/src/peripherals/stm32f4xx_rcc.c
SOURCES += lib/src/peripherals/stm32f4xx_tim.c
SOURCES += lib/src/peripherals/stm32f4xx_usart.c
SOURCES += lib/src/peripherals/misc.c
CFLAGS = -g -Wall -Tstm32_flash.ld -std=gnu99 -fno-builtin -CC -fdiagnostics-color=always
CFLAGS += -mlittle-endian -mthumb -mcpu=cortex-m4 -mthumb-interwork -nostartfiles
CFLAGS += -mfloat-abi=hard -mfpu=fpv4-sp-d16 -nostartfiles -fsingle-precision-constant
CFLAGS += -ffunction-sections -fdata-sections -O1
SOURCES += lib/startup_stm32f4xx.s
CFLAGS += -I../lib/inc/core -I../lib/inc/peripherals -I../shared
#CPPFLAGS += -DSTM32F40_41xxx
LDSCRIPT = bootloader/stm32_flash.ld
###################################################
#============================================================================
OBJECTS += $(addprefix $(OBJDIR)/,$(addsuffix .o,$(basename $(SOURCES))))
CPPFLAGS += $(addprefix -I,$(INCDIRS))
vpath %.c src
vpath %.a lib
#---------------- Preprocessor Options ----------------
# -fsingle... make better use of the single-precision FPU
# -g generate debugging information
# -save-temps preserve .s and .i-files
#
CPPFLAGS += -fsingle-precision-constant
CPPFLAGS += -g
# CPPFLAGS += -save-temps=obj
ROOT=$(shell pwd)
#---------------- C Compiler Options ----------------
# -O* optimization level
# -f... tuning, see GCC documentation
# -Wall... warning level
#
CFLAGS += $(OPT)
CFLAGS += -std=gnu11
CFLAGS += -ffunction-sections
CFLAGS += -fdata-sections
CFLAGS += -Wall
CFLAGS += -fno-builtin ## from old
CFLAGS += -nostartfiles
#CFLAGS += -Wstrict-prototypes
#CFLAGS += -Wextra
#CFLAGS += -Wpointer-arith
#CFLAGS += -Winline
#CFLAGS += -Wunreachable-code
#CFLAGS += -Wundef
CFLAGS += -I../inc -I../lib -I../lib/inc -I../stm32f103/inc
CFLAGS += -I../lib/inc/core -I../lib/inc/peripherals
# Use a friendly C dialect
CPPFLAGS += -fno-strict-aliasing
CPPFLAGS += -fwrapv
SRCS += ../lib/startup_stm32f4xx.s # add startup file to build
#---------------- C++ Compiler Options ----------------
#
CXXFLAGS += $(OPT)
CXXFLAGS += -ffunction-sections
CXXFLAGS += -fdata-sections
CXXFLAGS += -Wall
OBJS = $(SRCS:.c=.o)
#---------------- Assembler Options ----------------
# -Wa,... tell GCC to pass this to the assembler
#
###################################################
#---------------- Linker Options ----------------
# -Wl,... tell GCC to pass this to linker
# -Map create map file
# --cref add cross reference to map file
#
LDFLAGS += $(OPT)
LDFLAGS += -lm
LDFLAGS += -Wl,-Map=$(TARGET).map,--cref
LDFLAGS += -Wl,--gc-sections
.PHONY: lib proj
# LDFLAGS += -specs=nano.specs -u _printf_float -u _scanf_float
LDFLAGS += -T$(LDSCRIPT)
all: lib proj
#============================================================================
again: clean all
# Define programs and commands
#
TOOLCHAIN = arm-none-eabi-
CC = $(TOOLCHAIN)gcc
OBJCOPY = $(TOOLCHAIN)objcopy
OBJDUMP = $(TOOLCHAIN)objdump
SIZE = $(TOOLCHAIN)size
NM = $(TOOLCHAIN)nm
MKDIR = mkdir
POSTLD = Tools/add_version_info.py # -q
# Flash the STM32F4
burn: main.elf
st-flash --reset write $(PROJ_NAME).bin 0x08000000
# Compiler flags to generate dependency files
#
GENDEPFLAGS = -MMD -MP
btburn: main.elf
# Combine all necessary flags and optional flags
# Add target processor to flags.
#
CPU = -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16
CFLAGS += $(CPU)
CXXFLAGS += $(CPU)
ASFLAGS += $(CPU)
LDFLAGS += $(CPU)
# Default target
#
all: gccversion build showsize
build: elf hex bin lss sym
elf: $(TARGET).elf
hex: $(TARGET).hex
bin: $(TARGET).bin
lss: $(TARGET).lss
sym: $(TARGET).sym
# Display compiler version information
#
gccversion:
@$(CC) --version
# Show the final program size
#
showsize: build
@echo
@$(SIZE) $(TARGET).elf 2>/dev/null
# Flash the device
#
btflash: build showsize
#change this to your device
printf "bootloader\r" > `ls /dev/cu.usbmodem*` || true
printf "bootloader\r" > `ls /dev/ttyACM*` || true
sleep 1
dfu-util -a 0 -d 0483:df11 -s 0x08000000:leave -D main.bin
dfu-util -a 0 -d 0483:df11 -s 0x08000000:leave -D $(TARGET).bin
# Create tags; assumes ctags exists
ctags:
ctags -R --exclude=*cm0.h --exclude=*cm3.h .
lib:
$(MAKE) -C ../lib
proj: $(PROJ_NAME).elf
$(PROJ_NAME).elf: $(SRCS)
$(CC) $(CFLAGS) $^ -o $@ -L../lib -lstm32f4 -Wl,--gc-sections -Wl,-Map -Wl,$(PROJ_NAME).map
../tools/add_version_info.py $(PROJ_NAME).elf
$(OBJCOPY) -O binary --gap-fill 0xFF $(PROJ_NAME).elf $(PROJ_NAME).bin
../tools/checkcrc.py $(PROJ_NAME).bin
arm-none-eabi-size main.elf
flash: build showsize
st-flash --reset write $(TARGET).bin 0x08000000
# Target: clean project
#
clean:
rm -f *.o *.i
rm -f $(PROJ_NAME).elf
rm -f $(PROJ_NAME).hex
rm -f $(PROJ_NAME).bin
@echo Cleaning project:
rm -rf $(OBJDIR)
# Include the base rules
#
include base.mak
# Include the dependency files
#
-include $(OBJECTS:.o=.d)
# Listing of phony targets
#
.PHONY: all build flash btfash clean \
boot boot_clean boot_flash \
elf lss sym \
showsize gccversion

View File

@@ -1,6 +1,6 @@
#include "version.h"
const struct version_info version_info = {
volatile const struct version_info version_info = {
.product_name = "STMBL-Bootloader",
.major = 0,
.minor = 9,

View File

@@ -23,4 +23,4 @@ struct version_info {
int patch;
};
extern const struct version_info version_info __attribute__((section(".version_info")));
extern volatile const struct version_info version_info __attribute__((section(".version_info")));

View File

@@ -1,40 +0,0 @@
CC=arm-none-eabi-gcc
AR=arm-none-eabi-ar
#CCDIR = /Users/rene/Downloads/gcc-arm-none-eabi-4_7-2013q3/bin
###########################################
vpath %.c src src/peripherals
CFLAGS = -g -O2 -Wall
CFLAGS += -mlittle-endian -mthumb -mcpu=cortex-m4 -mthumb-interwork
CFLAGS += -mfloat-abi=hard -mfpu=fpv4-sp-d16
CFLAGS += -ffreestanding -nostdlib
CFLAGS += -Iinc -Iinc/core -Iinc/peripherals
#SRCS = stm32f4_discovery.c
SRCS = misc.c stm32f4xx_dma.c stm32f4xx_rcc.c stm32f4xx_adc.c \
stm32f4xx_exti.c stm32f4xx_rng.c stm32f4xx_can.c stm32f4xx_flash.c \
stm32f4xx_rtc.c stm32f4xx_crc.c stm32f4xx_fsmc.c stm32f4xx_sdio.c \
stm32f4xx_cryp_aes.c stm32f4xx_gpio.c stm32f4xx_spi.c \
stm32f4xx_cryp.c stm32f4xx_hash.c stm32f4xx_syscfg.c \
stm32f4xx_cryp_des.c stm32f4xx_hash_md5.c stm32f4xx_tim.c \
stm32f4xx_cryp_tdes.c stm32f4xx_hash_sha1.c stm32f4xx_usart.c \
stm32f4xx_dac.c stm32f4xx_i2c.c stm32f4xx_wwdg.c \
stm32f4xx_dbgmcu.c stm32f4xx_iwdg.c \
stm32f4xx_dcmi.c stm32f4xx_pwr.c
OBJS = $(SRCS:.c=.o)
.PHONY: libstm32f4.a
all: libstm32f4.a
%.o : %.c
$(CC) $(CFLAGS) -c -o $@ $^
libstm32f4.a: $(OBJS)
$(AR) -r $@ $(OBJS)
clean:
rm -f $(OBJS) libstm32f4.a

View File

@@ -1,221 +0,0 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXFileReference section */
A77439171647362D00739B82 /* .DS_Store */ = {isa = PBXFileReference; lastKnownFileType = file; path = .DS_Store; sourceTree = "<group>"; };
A77439181647362D00739B82 /* inc */ = {isa = PBXFileReference; lastKnownFileType = folder; path = inc; sourceTree = "<group>"; };
A77439191647362D00739B82 /* lib.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = lib.xcodeproj; sourceTree = "<group>"; };
A774391C1647362D00739B82 /* libstm32f4.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libstm32f4.a; sourceTree = "<group>"; };
A774391D1647362D00739B82 /* Makefile */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = "<group>"; };
A774391E1647362D00739B82 /* misc.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = misc.o; sourceTree = "<group>"; };
A774391F1647362D00739B82 /* src */ = {isa = PBXFileReference; lastKnownFileType = folder; path = src; sourceTree = "<group>"; };
A77439201647362D00739B82 /* startup_stm32f4xx.s */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.asm; path = startup_stm32f4xx.s; sourceTree = "<group>"; };
A77439211647362D00739B82 /* stm32f4xx_adc.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = stm32f4xx_adc.o; sourceTree = "<group>"; };
A77439221647362D00739B82 /* stm32f4xx_can.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = stm32f4xx_can.o; sourceTree = "<group>"; };
A77439231647362D00739B82 /* stm32f4xx_crc.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = stm32f4xx_crc.o; sourceTree = "<group>"; };
A77439241647362D00739B82 /* stm32f4xx_cryp.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = stm32f4xx_cryp.o; sourceTree = "<group>"; };
A77439251647362D00739B82 /* stm32f4xx_cryp_aes.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = stm32f4xx_cryp_aes.o; sourceTree = "<group>"; };
A77439261647362D00739B82 /* stm32f4xx_cryp_des.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = stm32f4xx_cryp_des.o; sourceTree = "<group>"; };
A77439271647362D00739B82 /* stm32f4xx_cryp_tdes.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = stm32f4xx_cryp_tdes.o; sourceTree = "<group>"; };
A77439281647362D00739B82 /* stm32f4xx_dac.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = stm32f4xx_dac.o; sourceTree = "<group>"; };
A77439291647362D00739B82 /* stm32f4xx_dbgmcu.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = stm32f4xx_dbgmcu.o; sourceTree = "<group>"; };
A774392A1647362D00739B82 /* stm32f4xx_dcmi.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = stm32f4xx_dcmi.o; sourceTree = "<group>"; };
A774392B1647362D00739B82 /* stm32f4xx_dma.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = stm32f4xx_dma.o; sourceTree = "<group>"; };
A774392C1647362D00739B82 /* stm32f4xx_exti.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = stm32f4xx_exti.o; sourceTree = "<group>"; };
A774392D1647362D00739B82 /* stm32f4xx_flash.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = stm32f4xx_flash.o; sourceTree = "<group>"; };
A774392E1647362D00739B82 /* stm32f4xx_fsmc.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = stm32f4xx_fsmc.o; sourceTree = "<group>"; };
A774392F1647362D00739B82 /* stm32f4xx_gpio.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = stm32f4xx_gpio.o; sourceTree = "<group>"; };
A77439301647362D00739B82 /* stm32f4xx_hash.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = stm32f4xx_hash.o; sourceTree = "<group>"; };
A77439311647362D00739B82 /* stm32f4xx_hash_md5.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = stm32f4xx_hash_md5.o; sourceTree = "<group>"; };
A77439321647362D00739B82 /* stm32f4xx_hash_sha1.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = stm32f4xx_hash_sha1.o; sourceTree = "<group>"; };
A77439331647362D00739B82 /* stm32f4xx_i2c.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = stm32f4xx_i2c.o; sourceTree = "<group>"; };
A77439341647362D00739B82 /* stm32f4xx_iwdg.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = stm32f4xx_iwdg.o; sourceTree = "<group>"; };
A77439351647362D00739B82 /* stm32f4xx_pwr.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = stm32f4xx_pwr.o; sourceTree = "<group>"; };
A77439361647362D00739B82 /* stm32f4xx_rcc.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = stm32f4xx_rcc.o; sourceTree = "<group>"; };
A77439371647362D00739B82 /* stm32f4xx_rng.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = stm32f4xx_rng.o; sourceTree = "<group>"; };
A77439381647362D00739B82 /* stm32f4xx_rtc.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = stm32f4xx_rtc.o; sourceTree = "<group>"; };
A77439391647362D00739B82 /* stm32f4xx_sdio.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = stm32f4xx_sdio.o; sourceTree = "<group>"; };
A774393A1647362D00739B82 /* stm32f4xx_spi.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = stm32f4xx_spi.o; sourceTree = "<group>"; };
A774393B1647362D00739B82 /* stm32f4xx_syscfg.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = stm32f4xx_syscfg.o; sourceTree = "<group>"; };
A774393C1647362D00739B82 /* stm32f4xx_tim.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = stm32f4xx_tim.o; sourceTree = "<group>"; };
A774393D1647362D00739B82 /* stm32f4xx_usart.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = stm32f4xx_usart.o; sourceTree = "<group>"; };
A774393E1647362D00739B82 /* stm32f4xx_wwdg.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = stm32f4xx_wwdg.o; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXGroup section */
A774390F1647362D00739B82 = {
isa = PBXGroup;
children = (
A77439171647362D00739B82 /* .DS_Store */,
A77439181647362D00739B82 /* inc */,
A77439191647362D00739B82 /* lib.xcodeproj */,
A774391C1647362D00739B82 /* libstm32f4.a */,
A774391D1647362D00739B82 /* Makefile */,
A774391E1647362D00739B82 /* misc.o */,
A774391F1647362D00739B82 /* src */,
A77439201647362D00739B82 /* startup_stm32f4xx.s */,
A77439211647362D00739B82 /* stm32f4xx_adc.o */,
A77439221647362D00739B82 /* stm32f4xx_can.o */,
A77439231647362D00739B82 /* stm32f4xx_crc.o */,
A77439241647362D00739B82 /* stm32f4xx_cryp.o */,
A77439251647362D00739B82 /* stm32f4xx_cryp_aes.o */,
A77439261647362D00739B82 /* stm32f4xx_cryp_des.o */,
A77439271647362D00739B82 /* stm32f4xx_cryp_tdes.o */,
A77439281647362D00739B82 /* stm32f4xx_dac.o */,
A77439291647362D00739B82 /* stm32f4xx_dbgmcu.o */,
A774392A1647362D00739B82 /* stm32f4xx_dcmi.o */,
A774392B1647362D00739B82 /* stm32f4xx_dma.o */,
A774392C1647362D00739B82 /* stm32f4xx_exti.o */,
A774392D1647362D00739B82 /* stm32f4xx_flash.o */,
A774392E1647362D00739B82 /* stm32f4xx_fsmc.o */,
A774392F1647362D00739B82 /* stm32f4xx_gpio.o */,
A77439301647362D00739B82 /* stm32f4xx_hash.o */,
A77439311647362D00739B82 /* stm32f4xx_hash_md5.o */,
A77439321647362D00739B82 /* stm32f4xx_hash_sha1.o */,
A77439331647362D00739B82 /* stm32f4xx_i2c.o */,
A77439341647362D00739B82 /* stm32f4xx_iwdg.o */,
A77439351647362D00739B82 /* stm32f4xx_pwr.o */,
A77439361647362D00739B82 /* stm32f4xx_rcc.o */,
A77439371647362D00739B82 /* stm32f4xx_rng.o */,
A77439381647362D00739B82 /* stm32f4xx_rtc.o */,
A77439391647362D00739B82 /* stm32f4xx_sdio.o */,
A774393A1647362D00739B82 /* stm32f4xx_spi.o */,
A774393B1647362D00739B82 /* stm32f4xx_syscfg.o */,
A774393C1647362D00739B82 /* stm32f4xx_tim.o */,
A774393D1647362D00739B82 /* stm32f4xx_usart.o */,
A774393E1647362D00739B82 /* stm32f4xx_wwdg.o */,
);
sourceTree = "<group>";
};
A774391A1647362D00739B82 /* Products */ = {
isa = PBXGroup;
children = (
);
name = Products;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXLegacyTarget section */
A77439161647362D00739B82 /* lib */ = {
isa = PBXLegacyTarget;
buildArgumentsString = "$(ACTION)";
buildConfigurationList = A77439431647362D00739B82 /* Build configuration list for PBXLegacyTarget "lib" */;
buildPhases = (
);
buildToolPath = /usr/bin/make;
buildWorkingDirectory = "/Users/rene/stm23f4/stm32f4-templates/lib";
dependencies = (
);
name = lib;
passBuildSettingsInEnvironment = 1;
productName = lib;
};
/* End PBXLegacyTarget section */
/* Begin PBXProject section */
A77439111647362D00739B82 /* Project object */ = {
isa = PBXProject;
buildConfigurationList = A77439141647362D00739B82 /* Build configuration list for PBXProject "lib 2" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
);
mainGroup = A774390F1647362D00739B82;
projectDirPath = "";
projectReferences = (
{
ProductGroup = A774391A1647362D00739B82 /* Products */;
ProjectRef = A77439191647362D00739B82 /* lib.xcodeproj */;
},
);
projectRoot = "";
targets = (
A77439161647362D00739B82 /* lib */,
);
};
/* End PBXProject section */
/* Begin XCBuildConfiguration section */
A77439121647362D00739B82 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
COPY_PHASE_STRIP = NO;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx10.6;
};
name = Debug;
};
A77439131647362D00739B82 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
COPY_PHASE_STRIP = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
SDKROOT = macosx10.6;
};
name = Release;
};
A77439441647362D00739B82 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
COPY_PHASE_STRIP = NO;
DEBUGGING_SYMBOLS = YES;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_FIX_AND_CONTINUE = YES;
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
OTHER_CFLAGS = "";
OTHER_LDFLAGS = "";
PRODUCT_NAME = lib;
};
name = Debug;
};
A77439451647362D00739B82 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_ENABLE_FIX_AND_CONTINUE = NO;
OTHER_CFLAGS = "";
OTHER_LDFLAGS = "";
PRODUCT_NAME = lib;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
A77439141647362D00739B82 /* Build configuration list for PBXProject "lib 2" */ = {
isa = XCConfigurationList;
buildConfigurations = (
A77439121647362D00739B82 /* Debug */,
A77439131647362D00739B82 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
A77439431647362D00739B82 /* Build configuration list for PBXLegacyTarget "lib" */ = {
isa = XCConfigurationList;
buildConfigurations = (
A77439441647362D00739B82 /* Debug */,
A77439451647362D00739B82 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = A77439111647362D00739B82 /* Project object */;
}

View File

@@ -1,59 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0450"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "A77439161647362D00739B82"
BuildableName = "lib"
BlueprintName = "lib"
ReferencedContainer = "container:lib 2.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
<Testables>
</Testables>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
allowLocationSimulation = "YES">
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
buildConfiguration = "Release"
debugDocumentVersioning = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View File

@@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>lib.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>2</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>A77439161647362D00739B82</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
</plist>

View File

@@ -1,206 +0,0 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXFileReference section */
A77438D0164735C500739B82 /* .DS_Store */ = {isa = PBXFileReference; lastKnownFileType = file; path = .DS_Store; sourceTree = "<group>"; };
A77438D1164735C500739B82 /* inc */ = {isa = PBXFileReference; lastKnownFileType = folder; path = inc; sourceTree = "<group>"; };
A77438D2164735C500739B82 /* libstm32f4.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libstm32f4.a; sourceTree = "<group>"; };
A77438D3164735C500739B82 /* Makefile */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = "<group>"; };
A77438D4164735C500739B82 /* misc.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = misc.o; sourceTree = "<group>"; };
A77438D5164735C500739B82 /* src */ = {isa = PBXFileReference; lastKnownFileType = folder; path = src; sourceTree = "<group>"; };
A77438D6164735C500739B82 /* startup_stm32f4xx.s */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.asm; path = startup_stm32f4xx.s; sourceTree = "<group>"; };
A77438D7164735C500739B82 /* stm32f4xx_adc.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = stm32f4xx_adc.o; sourceTree = "<group>"; };
A77438D8164735C500739B82 /* stm32f4xx_can.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = stm32f4xx_can.o; sourceTree = "<group>"; };
A77438D9164735C500739B82 /* stm32f4xx_crc.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = stm32f4xx_crc.o; sourceTree = "<group>"; };
A77438DA164735C500739B82 /* stm32f4xx_cryp.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = stm32f4xx_cryp.o; sourceTree = "<group>"; };
A77438DB164735C500739B82 /* stm32f4xx_cryp_aes.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = stm32f4xx_cryp_aes.o; sourceTree = "<group>"; };
A77438DC164735C500739B82 /* stm32f4xx_cryp_des.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = stm32f4xx_cryp_des.o; sourceTree = "<group>"; };
A77438DD164735C500739B82 /* stm32f4xx_cryp_tdes.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = stm32f4xx_cryp_tdes.o; sourceTree = "<group>"; };
A77438DE164735C500739B82 /* stm32f4xx_dac.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = stm32f4xx_dac.o; sourceTree = "<group>"; };
A77438DF164735C500739B82 /* stm32f4xx_dbgmcu.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = stm32f4xx_dbgmcu.o; sourceTree = "<group>"; };
A77438E0164735C500739B82 /* stm32f4xx_dcmi.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = stm32f4xx_dcmi.o; sourceTree = "<group>"; };
A77438E1164735C500739B82 /* stm32f4xx_dma.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = stm32f4xx_dma.o; sourceTree = "<group>"; };
A77438E2164735C500739B82 /* stm32f4xx_exti.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = stm32f4xx_exti.o; sourceTree = "<group>"; };
A77438E3164735C500739B82 /* stm32f4xx_flash.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = stm32f4xx_flash.o; sourceTree = "<group>"; };
A77438E4164735C500739B82 /* stm32f4xx_fsmc.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = stm32f4xx_fsmc.o; sourceTree = "<group>"; };
A77438E5164735C500739B82 /* stm32f4xx_gpio.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = stm32f4xx_gpio.o; sourceTree = "<group>"; };
A77438E6164735C500739B82 /* stm32f4xx_hash.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = stm32f4xx_hash.o; sourceTree = "<group>"; };
A77438E7164735C500739B82 /* stm32f4xx_hash_md5.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = stm32f4xx_hash_md5.o; sourceTree = "<group>"; };
A77438E8164735C500739B82 /* stm32f4xx_hash_sha1.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = stm32f4xx_hash_sha1.o; sourceTree = "<group>"; };
A77438E9164735C500739B82 /* stm32f4xx_i2c.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = stm32f4xx_i2c.o; sourceTree = "<group>"; };
A77438EA164735C500739B82 /* stm32f4xx_iwdg.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = stm32f4xx_iwdg.o; sourceTree = "<group>"; };
A77438EB164735C500739B82 /* stm32f4xx_pwr.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = stm32f4xx_pwr.o; sourceTree = "<group>"; };
A77438EC164735C500739B82 /* stm32f4xx_rcc.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = stm32f4xx_rcc.o; sourceTree = "<group>"; };
A77438ED164735C500739B82 /* stm32f4xx_rng.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = stm32f4xx_rng.o; sourceTree = "<group>"; };
A77438EE164735C500739B82 /* stm32f4xx_rtc.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = stm32f4xx_rtc.o; sourceTree = "<group>"; };
A77438EF164735C500739B82 /* stm32f4xx_sdio.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = stm32f4xx_sdio.o; sourceTree = "<group>"; };
A77438F0164735C500739B82 /* stm32f4xx_spi.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = stm32f4xx_spi.o; sourceTree = "<group>"; };
A77438F1164735C500739B82 /* stm32f4xx_syscfg.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = stm32f4xx_syscfg.o; sourceTree = "<group>"; };
A77438F2164735C500739B82 /* stm32f4xx_tim.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = stm32f4xx_tim.o; sourceTree = "<group>"; };
A77438F3164735C500739B82 /* stm32f4xx_usart.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = stm32f4xx_usart.o; sourceTree = "<group>"; };
A77438F4164735C500739B82 /* stm32f4xx_wwdg.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = stm32f4xx_wwdg.o; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXGroup section */
A77438C8164735C500739B82 = {
isa = PBXGroup;
children = (
A77438D0164735C500739B82 /* .DS_Store */,
A77438D1164735C500739B82 /* inc */,
A77438D2164735C500739B82 /* libstm32f4.a */,
A77438D3164735C500739B82 /* Makefile */,
A77438D4164735C500739B82 /* misc.o */,
A77438D5164735C500739B82 /* src */,
A77438D6164735C500739B82 /* startup_stm32f4xx.s */,
A77438D7164735C500739B82 /* stm32f4xx_adc.o */,
A77438D8164735C500739B82 /* stm32f4xx_can.o */,
A77438D9164735C500739B82 /* stm32f4xx_crc.o */,
A77438DA164735C500739B82 /* stm32f4xx_cryp.o */,
A77438DB164735C500739B82 /* stm32f4xx_cryp_aes.o */,
A77438DC164735C500739B82 /* stm32f4xx_cryp_des.o */,
A77438DD164735C500739B82 /* stm32f4xx_cryp_tdes.o */,
A77438DE164735C500739B82 /* stm32f4xx_dac.o */,
A77438DF164735C500739B82 /* stm32f4xx_dbgmcu.o */,
A77438E0164735C500739B82 /* stm32f4xx_dcmi.o */,
A77438E1164735C500739B82 /* stm32f4xx_dma.o */,
A77438E2164735C500739B82 /* stm32f4xx_exti.o */,
A77438E3164735C500739B82 /* stm32f4xx_flash.o */,
A77438E4164735C500739B82 /* stm32f4xx_fsmc.o */,
A77438E5164735C500739B82 /* stm32f4xx_gpio.o */,
A77438E6164735C500739B82 /* stm32f4xx_hash.o */,
A77438E7164735C500739B82 /* stm32f4xx_hash_md5.o */,
A77438E8164735C500739B82 /* stm32f4xx_hash_sha1.o */,
A77438E9164735C500739B82 /* stm32f4xx_i2c.o */,
A77438EA164735C500739B82 /* stm32f4xx_iwdg.o */,
A77438EB164735C500739B82 /* stm32f4xx_pwr.o */,
A77438EC164735C500739B82 /* stm32f4xx_rcc.o */,
A77438ED164735C500739B82 /* stm32f4xx_rng.o */,
A77438EE164735C500739B82 /* stm32f4xx_rtc.o */,
A77438EF164735C500739B82 /* stm32f4xx_sdio.o */,
A77438F0164735C500739B82 /* stm32f4xx_spi.o */,
A77438F1164735C500739B82 /* stm32f4xx_syscfg.o */,
A77438F2164735C500739B82 /* stm32f4xx_tim.o */,
A77438F3164735C500739B82 /* stm32f4xx_usart.o */,
A77438F4164735C500739B82 /* stm32f4xx_wwdg.o */,
);
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXLegacyTarget section */
A77438CF164735C500739B82 /* lib */ = {
isa = PBXLegacyTarget;
buildArgumentsString = "$(ACTION)";
buildConfigurationList = A77438F5164735C500739B82 /* Build configuration list for PBXLegacyTarget "lib" */;
buildPhases = (
);
buildToolPath = /usr/bin/make;
buildWorkingDirectory = "/Users/rene/stm23f4/stm32f4-templates/lib";
dependencies = (
);
name = lib;
passBuildSettingsInEnvironment = 1;
productName = lib;
};
/* End PBXLegacyTarget section */
/* Begin PBXProject section */
A77438CA164735C500739B82 /* Project object */ = {
isa = PBXProject;
buildConfigurationList = A77438CD164735C500739B82 /* Build configuration list for PBXProject "lib" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
);
mainGroup = A77438C8164735C500739B82;
projectDirPath = "";
projectRoot = "";
targets = (
A77438CF164735C500739B82 /* lib */,
);
};
/* End PBXProject section */
/* Begin XCBuildConfiguration section */
A77438CB164735C500739B82 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
COPY_PHASE_STRIP = NO;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx10.6;
};
name = Debug;
};
A77438CC164735C500739B82 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
COPY_PHASE_STRIP = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
SDKROOT = macosx10.6;
};
name = Release;
};
A77438F6164735C500739B82 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
COPY_PHASE_STRIP = NO;
DEBUGGING_SYMBOLS = YES;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_FIX_AND_CONTINUE = YES;
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
OTHER_CFLAGS = "";
OTHER_LDFLAGS = "";
PRODUCT_NAME = lib;
};
name = Debug;
};
A77438F7164735C500739B82 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_ENABLE_FIX_AND_CONTINUE = NO;
OTHER_CFLAGS = "";
OTHER_LDFLAGS = "";
PRODUCT_NAME = lib;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
A77438CD164735C500739B82 /* Build configuration list for PBXProject "lib" */ = {
isa = XCConfigurationList;
buildConfigurations = (
A77438CB164735C500739B82 /* Debug */,
A77438CC164735C500739B82 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
A77438F5164735C500739B82 /* Build configuration list for PBXLegacyTarget "lib" */ = {
isa = XCConfigurationList;
buildConfigurations = (
A77438F6164735C500739B82 /* Debug */,
A77438F7164735C500739B82 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = A77438CA164735C500739B82 /* Project object */;
}

View File

@@ -1,59 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0450"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "A77438CF164735C500739B82"
BuildableName = "lib"
BlueprintName = "lib"
ReferencedContainer = "container:lib.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
<Testables>
</Testables>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
allowLocationSimulation = "YES">
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
buildConfiguration = "Release"
debugDocumentVersioning = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View File

@@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>lib.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>1</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>A77438CF164735C500739B82</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
</plist>

View File

@@ -323,7 +323,7 @@ NRT(
printf_("Compiled %s %s ",bt_version_info->build_date, bt_version_info->build_time);
printf_("by %s on %s\n",bt_version_info->build_user, bt_version_info->build_host);
printf_("start:%p ,size:%p ,end%p \n",&_binary_stm32f103_main_bin_start,&_binary_stm32f103_main_bin_size,&_binary_stm32f103_main_bin_end);
printf_("start:%p ,size:%p ,end%p \n",&_binary_obj_hv_hv_bin_start,&_binary_obj_hv_hv_bin_size,&_binary_obj_hv_hv_bin_end);
}
void start(){

View File

@@ -56,9 +56,9 @@ void disable_frt(){
TIM_ITConfig(TIM2, TIM_IT_Update, DISABLE);
}
extern char _binary_stm32f103_main_bin_start;
extern char _binary_stm32f103_main_bin_size;
extern char _binary_stm32f103_main_bin_end;
extern char _binary_obj_hv_hv_bin_start;
extern char _binary_obj_hv_hv_bin_size;
extern char _binary_obj_hv_hv_bin_end;
//20kHz
void TIM2_IRQHandler(void){

View File

@@ -1,7 +1,7 @@
#include "version.h"
volatile const struct version_info* bt_version_info = (void*)0x08000188;
const struct version_info version_info = {
volatile const struct version_info version_info = {
.product_name = "STMBL",
.major = 0,
.minor = 9,

View File

@@ -23,5 +23,5 @@ struct version_info {
int patch;
};
extern const struct version_info version_info __attribute__((section(".version_info")));
extern volatile const struct version_info version_info __attribute__((section(".version_info")));
extern volatile const struct version_info* bt_version_info;

View File

@@ -1 +0,0 @@
all:

View File

@@ -1,18 +0,0 @@
# Make all libraries
export
CFLAGS := $(patsubst -I%,-I../../%,$(CFLAGS))
SUBDIRS := $(shell ls -F|grep /|grep -v CVS)
.PHONY: subdirs $(SUBDIRS)
.PHONY: clean
subdirs: ${SUBDIRS}
${SUBDIRS}:
${MAKE} -C $@
clean:
find . -name *.a -delete
find . -name *.o -delete

View File

@@ -1,18 +0,0 @@
# Compile the STM32F10x Standard Peripheral Library
export
LIB_OUT = libstm32fw.a
SRCS := $(shell find . -name *.[cs])
LIB_OBJS = $(sort $(patsubst %.c,%.o,$(SRCS)))
.PHONY: all
all: $(LIB_OUT)
$(LIB_OUT): $(LIB_OBJS)
$(AR) $(ARFLAGS) $@ $(LIB_OBJS)
.PHONY: clean
clean:
-rm -f $(LIB_OBJS) $(LIB_OUT)

247
stm32f103/Makefile Executable file → Normal file
View File

@@ -1,98 +1,183 @@
export
# Optimization level, can be [0, 1, 2, 3, s].
# 0 = turn off optimization. s = optimize for size.
#
OPT = -O1 -flto
# OPT = -O1 # for debugging
DEVICE_FAMILY = STM32F10x
DEVICE_TYPE = STM32F10X_LD
STARTUP_FILE = stm32f10x_ld
SYSTEM_FILE = stm32f10x
# Object files directory
# Warning: this will be removed by make clean!
#
OBJDIR = obj_hv
CMSIS = Libraries/CMSIS
CMSIS_DEVSUP = $(CMSIS)/CM3/DeviceSupport/ST/$(DEVICE_FAMILY)/
CMSIS_OPT = -D$(DEVICE_TYPE) -DUSE_STDPERIPH_DRIVER
OTHER_OPT = "-D__weak=__attribute__((weak))" "-D__packed=__attribute__((__packed__))"
# Target file name (without extension)
TARGET = $(OBJDIR)/hv
# Define all C source files (dependencies are generated automatically)
INCDIRS += stm32f103/inc
INCDIRS += shared
SOURCES += stm32f103/src/main.c
SOURCES += shared/common.c
# Standard peripheral library
CPPFLAGS += -DUSE_STDPERIPH_DRIVER
#CPPFLAGS += -DUSE_FULL_ASSERT
INCDIRS += stm32f103/Libraries/CMSIS/CM3/CoreSupport/
INCDIRS += stm32f103/Libraries/STM32F10x_StdPeriph_Driver/inc/
INCDIRS += stm32f103/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x/
SOURCES += stm32f103/Libraries/STM32F10x_StdPeriph_Driver/src/misc.c
SOURCES += stm32f103/Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_rcc.c
SOURCES += stm32f103/Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_adc.c
SOURCES += stm32f103/Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_dma.c
SOURCES += stm32f103/Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_gpio.c
SOURCES += stm32f103/Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_tim.c
SOURCES += stm32f103/Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_flash.c
SOURCES += stm32f103/Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_usart.c
SOURCES += stm32f103//Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x/system_stm32f10x.c
SOURCES += stm32f103//Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x/startup/TrueSTUDIO/startup_stm32f10x_ld.s
CPPFLAGS += -DSTM32F10X_LD
LDSCRIPT = stm32f103/stm32_flash.ld
#============================================================================
OBJECTS += $(addprefix $(OBJDIR)/,$(addsuffix .o,$(basename $(SOURCES))))
CPPFLAGS += $(addprefix -I,$(INCDIRS))
#---------------- Preprocessor Options ----------------
# -fsingle... make better use of the single-precision FPU
# -g generate debugging information
# -save-temps preserve .s and .i-files
#
CPPFLAGS += -fsingle-precision-constant
CPPFLAGS += -g
# CPPFLAGS += -save-temps=obj
#---------------- C Compiler Options ----------------
# -O* optimization level
# -f... tuning, see GCC documentation
# -Wall... warning level
#
CFLAGS += $(OPT)
CFLAGS += -std=gnu11
CFLAGS += -ffunction-sections
CFLAGS += -fdata-sections
CFLAGS += -Wall
CFLAGS += -fno-builtin ## from old
CFLAGS += -nostartfiles
#CFLAGS += -Wstrict-prototypes
#CFLAGS += -Wextra
#CFLAGS += -Wpointer-arith
#CFLAGS += -Winline
#CFLAGS += -Wunreachable-code
#CFLAGS += -Wundef
# Use a friendly C dialect
CPPFLAGS += -fno-strict-aliasing
CPPFLAGS += -fwrapv
#---------------- C++ Compiler Options ----------------
#
CXXFLAGS += $(OPT)
CXXFLAGS += -ffunction-sections
CXXFLAGS += -fdata-sections
CXXFLAGS += -Wall
#---------------- Assembler Options ----------------
# -Wa,... tell GCC to pass this to the assembler
#
#---------------- Linker Options ----------------
# -Wl,... tell GCC to pass this to linker
# -Map create map file
# --cref add cross reference to map file
#
LDFLAGS += $(OPT)
LDFLAGS += -lm
LDFLAGS += -Wl,-Map=$(TARGET).map,--cref
LDFLAGS += -Wl,--gc-sections
# LDFLAGS += -specs=nano.specs -u _printf_float -u _scanf_float
LDFLAGS += -T$(LDSCRIPT)
#============================================================================
# Define programs and commands
#
TOOLCHAIN = arm-none-eabi-
CC = $(TOOLCHAIN)gcc
OBJCOPY = $(TOOLCHAIN)objcopy
OBJDUMP = $(TOOLCHAIN)objdump
SIZE = $(TOOLCHAIN)size
NM = $(TOOLCHAIN)nm
MKDIR = mkdir
#POSTLD = Tools/add_version_info.py # -q
POSTLD = cp
# Compiler flags to generate dependency files
#
GENDEPFLAGS = -MMD -MP
# Combine all necessary flags and optional flags
# Add target processor to flags.
#
CPU = -mthumb -mcpu=cortex-m3
SYSTEM = arm-none-eabi
LDSCRIPT = "stm32_flash.ld"
CFLAGS += $(CPU)
CXXFLAGS += $(CPU)
ASFLAGS += $(CPU)
LDFLAGS += $(CPU)
SRCDIR := src/
INCDIR := inc/
# Default target
#
all: gccversion build showsize
LIBDIR := Libraries/
build: elf hex bin lss sym
LIBINC := -Iinc
LIBINC += -ILibraries/STM32F10x_StdPeriph_Driver/inc
LIBINC += -ILibraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x
LIBINC += -ILibraries/CMSIS/CM3/CoreSupport
elf: $(TARGET).elf
hex: $(TARGET).hex
bin: $(TARGET).bin
lss: $(TARGET).lss
sym: $(TARGET).sym
LIBS := ./$(LIBDIR)/STM32F10x_StdPeriph_Driver/libstm32fw.a
# Display compiler version information
#
gccversion:
@$(CC) --version
LIBS += -lm
CC = $(SYSTEM)-gcc
CCDEP = $(SYSTEM)-gcc
LD = $(SYSTEM)-gcc
AR = $(SYSTEM)-ar
AS = $(SYSTEM)-gcc
OBJCOPY = $(SYSTEM)-objcopy
OBJDUMP = $(SYSTEM)-objdump
GDB = $(SYSTEM)-gdb
SIZE = $(SYSTEM)-size
# INCLUDES = -I$(SRCDIR) $(LIBINC)
INCLUDES = $(LIBINC) -I../shared
CFLAGS = $(CPU) $(CMSIS_OPT) $(OTHER_OPT) -Wall -fno-common -fno-strict-aliasing -O2 $(INCLUDES) -g -Wfatal-errors -g -std=c99 -fdiagnostics-color=always
ASFLAGS = $(CFLAGS) -x assembler-with-cpp
LDFLAGS = -Wl,--gc-sections,-Map=$*.map,-cref -T $(LDSCRIPT) $(CPU)
ARFLAGS = cr
OBJCOPYFLAGS = -Obinary
OBJDUMPFLAGS = -S
# Show the final program size
#
showsize: build
@echo
@$(SIZE) $(TARGET).elf 2>/dev/null
STARTUP_OBJ = $(CMSIS_DEVSUP)/startup/TrueSTUDIO/startup_$(STARTUP_FILE).o
SYSTEM_OBJ = $(CMSIS_DEVSUP)/system_$(SYSTEM_FILE).o
# Flash the device
#
BIN = main.bin
OBJS = $(sort \
$(patsubst %.c,%.o,$(wildcard src/*.c)) \
$(patsubst %.s,%.o,$(wildcard src/*.s)) \
$(STARTUP_OBJ) \
$(SYSTEM_OBJ) \
../shared/common.o)
all: $(BIN)
burn: $(BIN)
st-flash --reset write $(BIN) 0x8000000
$(BIN): main.out
$(OBJCOPY) $(OBJCOPYFLAGS) main.out $(BIN)
$(OBJDUMP) $(OBJDUMPFLAGS) main.out > main.list
$(SIZE) main.out
@echo Make finished
main.out: $(LIBS) $(OBJS)
$(LD) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
$(LIBS): libs
libs:
@$(MAKE) -C $(LIBDIR)
libclean: clean
@$(MAKE) -C $(LIBDIR) clean
btburn: build showsize
#change this to your device
printf "bootloader\r" > `ls /dev/cu.usbmodem*` || true
printf "bootloader\r" > `ls /dev/ttyACM*` || true
sleep 1
dfu-util -a 0 -d 0483:df11 -s 0x08010000:leave -D $(TARGET).bin
# Target: clean project
#
clean:
-rm -f $(OBJS)
-rm -f main.list main.out main.hex main.map main.bin .depend
@echo Cleaning project:
rm -rf $(OBJDIR)
depend dep: .depend
# Include the base rules
#
include base.mak
include .depend
# Include the dependency files
#
-include $(OBJECTS:.o=.d)
.depend: src/*.c
$(CCDEP) $(CFLAGS) -MM $^ | sed -e 's@.*.o:@src/&@' > .depend
.c.o:
$(CC) $(CFLAGS) -c -o $@ $<
.s.o:
$(AS) $(ASFLAGS) -c -o $@ $<
# Listing of phony targets
#
.PHONY: all build flash clean \
elf lss sym \
showsize gccversion