1 # Copyright 2010 Develer S.r.l. (http://www.develer.com/)
3 # Makefile for the stm32p103 board example.
5 # Author: Andrea Righi <arighi@develer.com>
7 # Set to 1 for debug builds
10 include bertos/fonts/fonts.mk
12 # Our target application
18 bertos/cpu/cortex-m3/drv/gpio_stm32.c \
19 bertos/cpu/cortex-m3/drv/clock_stm32.c \
20 bertos/cpu/cortex-m3/drv/timer_cm3.c \
21 bertos/cpu/cortex-m3/drv/irq_cm3.c \
22 bertos/cpu/cortex-m3/hw/switch_ctx_cm3.c \
23 bertos/cpu/cortex-m3/hw/init_cm3.c \
24 examples/stm32p103/main.c
27 bertos/cpu/cortex-m3/hw/vectors_cm3.S \
28 bertos/cpu/cortex-m3/hw/crt_cm3.S \
31 # This is an hosted application
32 stm32p103_PREFIX = arm-none-eabi-
34 stm32p103_CPPAFLAGS = -mthumb
35 stm32p103_CPPFLAGS = -D'ARCH=0' -D__ARM_STM32P103__ -D'CPU_FREQ=(72000000L)' -D'WIZ_AUTOGEN' -mthumb -Iexamples/stm32p103 -Ibertos/cpu/cortex-m3 -fno-strict-aliasing -fwrapv
36 stm32p103_LDFLAGS = -nostartfiles -T bertos/cpu/cortex-m3/scripts/stm32p103_rom.ld -Wl,--no-warn-mismatch -mthumb
38 stm32p103_CPU = cortex-m3
40 stm32p103_PROGRAMMER_CPU = stm32
41 stm32p103_PROGRAMMER_TYPE = jtag-tiny
42 stm32p103_FLASH_SCRIPT = bertos/prg_scripts/arm/flash-stm32.sh
43 stm32p103_STOPFLASH_SCRIPT = bertos/prg_scripts/arm/stopopenocd.sh
44 stm32p103_DEBUG_SCRIPT = bertos/prg_scripts/arm/debug.sh
45 stm32p103_STOPDEBUG_SCRIPT = bertos/prg_scripts/arm/stopopenocd.sh
47 ifeq ($(stm32p103_DEBUG),0)
49 stm32p103_CFLAGS += -O0
50 stm32p103_CXXFLAGS += -O0
53 stm32p103_CPPAFLAGS += -g -gdwarf-2
54 stm32p103_CPPFLAGS += -O0 -g3 -gdwarf-2 -fverbose-asm