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-toolchain
# 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

#
# try to pick up the compiler from the path
#
CC   = $(shell which arm-none-eabi-gcc)
LD   = $(shell which arm-none-eabi-gcc)
AR   = $(shell which arm-none-eabi-ar)
CP   = $(shell which arm-none-eabi-objcopy)
DMP  = $(shell which arm-none-eabi-objdump)
NM   = $(shell which arm-none-eabi-nm)
SIZE = $(shell which arm-none-eabi-size)
GDB  = $(shell which arm-none-eabi-gdb)
TOOLCHAIN_DIR=$(shell dirname `which arm-none-eabi-gcc`)
GCC_LIB_DIR=$(TOOLCHAIN_DIR)/../arm-none-eabi/lib

#
# if not found in path, try the paparazzi toolchain in /opt
#
ifeq ($(CC),)
TOOLCHAIN=$(shell find -L /opt/paparazzi/arm-multilib -maxdepth 1 -type d -name arm-none-eabi 2>/dev/null | head -n 1)
ifneq ($(TOOLCHAIN),)
TOOLCHAIN_DIR=$(shell dirname $(TOOLCHAIN))
GCC_BIN_DIR=$(TOOLCHAIN_DIR)/bin
GCC_LIB_DIR=$(TOOLCHAIN_DIR)/arm-none-eabi/lib

# Define programs and commands.
GCC_BIN_PREFIX=$(GCC_BIN_DIR)/arm-none-eabi
CC   = $(GCC_BIN_PREFIX)-gcc
LD   = $(GCC_BIN_PREFIX)-gcc
AR   = $(GCC_BIN_PREFIX)-ar
CP   = $(GCC_BIN_PREFIX)-objcopy
DMP  = $(GCC_BIN_PREFIX)-objdump
NM   = $(GCC_BIN_PREFIX)-nm
SIZE = $(GCC_BIN_PREFIX)-size
GDB  = $(GCC_BIN_PREFIX)-gdb
else
# toolchain not found...
endif
endif


# some general commands
RM = rm
back to top