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
16 bertos/mware/formatwr.c \
18 bertos/mware/sprintf.c \
19 bertos/mware/event.c \
20 bertos/struct/heap.c \
21 bertos/kern/signal.c \
22 bertos/kern/monitor.c \
25 bertos/cpu/cortex-m3/drv/kdebug_stm32.c \
26 bertos/cpu/cortex-m3/drv/gpio_stm32.c \
27 bertos/cpu/cortex-m3/drv/clock_stm32.c \
28 bertos/cpu/cortex-m3/drv/timer_cm3.c \
29 bertos/cpu/cortex-m3/drv/irq_cm3.c \
30 bertos/cpu/cortex-m3/hw/switch_ctx_cm3.c \
31 bertos/cpu/cortex-m3/hw/init_cm3.c \
32 examples/stm32p103/main.c
35 bertos/cpu/cortex-m3/hw/vectors_cm3.S \
36 bertos/cpu/cortex-m3/hw/crt_cm3.S \
39 # This is an hosted application
40 stm32p103_PREFIX = arm-none-eabi-
42 stm32p103_CPPAFLAGS = -mthumb
43 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
44 stm32p103_LDFLAGS = -nostartfiles -T bertos/cpu/cortex-m3/scripts/stm32p103_rom.ld -Wl,--no-warn-mismatch -mthumb
46 stm32p103_CPU = cortex-m3
48 stm32p103_PROGRAMMER_CPU = stm32
49 stm32p103_PROGRAMMER_TYPE = jtag-tiny
50 stm32p103_FLASH_SCRIPT = bertos/prg_scripts/arm/flash-stm32.sh
51 stm32p103_STOPFLASH_SCRIPT = bertos/prg_scripts/arm/stopopenocd.sh
52 stm32p103_DEBUG_SCRIPT = bertos/prg_scripts/arm/debug.sh
53 stm32p103_STOPDEBUG_SCRIPT = bertos/prg_scripts/arm/stopopenocd.sh
55 ifeq ($(stm32p103_DEBUG),0)
57 stm32p103_CFLAGS += -O0
58 stm32p103_CXXFLAGS += -O0
61 stm32p103_CPPAFLAGS += -g -gdwarf-2
62 stm32p103_CPPFLAGS += -O0 -g3 -gdwarf-2 -fverbose-asm