Revision 649f2bd1dbc5702edbc4cbacf44d25ba3ccd8cc9 authored by Felix Ruess on 09 July 2013, 09:34:43 UTC, committed by Felix Ruess on 09 July 2013, 19:17:16 UTC
- krooz: don't use TIM2 for PWM
- change to 6 ticks per usec to fit all frequencies
- on the F1 we assume to run at 72MHz for HCLK and both timer clocks
  TIM1 -> APB2 = HCLK = 72MHz
  TIM2 -> 2 * APB1 = 2 * 36MHz = 72MHz
- on the F4 we assume 2 * AHB clock:
  TIM1 -> 2 * APB2 = 168MHz
  TIM2 -> 2 * APB1 = 84MHz
1 parent 60a6d89
Raw File
Makefile.arm-embedded
# Hey Emacs, this is a -*- makefile -*-
#
# Copyright (C) 2012 Felix Ruess <felix.ruess@gmail.com>


#
# This is the common Makefile for finding the arm compiler and OpenOcd
# for bare metal systems like on the ARM7TDMI, cortex M3/4

# include the common ARM makefiles to print the commands and find the toolchain
include $(PAPARAZZI_SRC)/conf/Makefile.arm-common
include $(PAPARAZZI_SRC)/conf/Makefile.arm-embedded-toolchain

# Display size of file.
HEXSIZE = $(SIZE) --target=$(FORMAT) $(OBJDIR)/$(TARGET).hex
ELFSIZE = $(SIZE) -A -x $(OBJDIR)/$(TARGET).elf
sizebefore:
	@if [ -f $(OBJDIR)/$(TARGET).elf ]; then echo; echo "Previous size:"; $(ELFSIZE); fi

sizeafter:
	@if [ -f $(OBJDIR)/$(TARGET).elf ]; then echo; echo "Current size:"; $(ELFSIZE); fi

# Target: clean project.
clean: clean_list

clean_list :
	@echo
	$(RM) $(OBJDIR)/$(TARGET).hex
	$(RM) $(OBJDIR)/$(TARGET).obj
	$(RM) $(OBJDIR)/$(TARGET).elf
	$(RM) $(OBJDIR)/$(TARGET).map
	$(RM) $(OBJDIR)/$(TARGET).obj
	$(RM) $(OBJDIR)/$(TARGET).a90
	$(RM) $(OBJDIR)/$(TARGET).sym
	$(RM) $(OBJDIR)/$(TARGET).lnk
	$(RM) $(OBJDIR)/$(TARGET).lss
	$(RM) $(COBJ)
	$(RM) $(AOBJ)
	$(RM) $(COBJARM)
	$(RM) $(AOBJARM)
	$(RM) $(LST)
	$(RM) $(SRC:.c=.s)
	$(RM) $(SRC:.c=.d)
	$(RM) $(SRCARM:.c=.s)
	$(RM) $(SRCARM:.c=.d)
	$(RM) .dep/*
	$(RM) *~

.PHONY : sizebefore sizeafter clean clean_list

#
# Find OpenOCD
#
# first try in the path
OOCD = $(shell which openocd)
#if OpenOCD could not be found in the path, try the toolchain dir (for backwards compatibility)
ifeq ($(OOCD),)
ifneq ($(TOOLCHAIN),)
OOCD = $(shell if test -e $(TOOLCHAIN_DIR)/bin/openocd ; then echo $(TOOLCHAIN_DIR)/bin/openocd ; else echo "Warning: OpenOCD not found"; fi)
endif
endif
back to top