Move serial driver to a port different from the debug one.
[bertos.git] / examples / stm32p103 / stm32p103.mk
1 # Copyright 2010 Develer S.r.l. (http://www.develer.com/)
2 #
3 # Makefile for the stm32p103 board example.
4 #
5 # Author: Andrea Righi <arighi@develer.com>
6
7 # Set to 1 for debug builds
8 stm32p103_DEBUG = 1
9
10 include bertos/fonts/fonts.mk
11
12 # Our target application
13 TRG += stm32p103
14
15 stm32p103_CSRC = \
16         bertos/mware/formatwr.c \
17         bertos/mware/hex.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 \
23         bertos/kern/proc.c \
24         bertos/drv/timer.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
33
34 stm32p103_CPPASRC = \
35         bertos/cpu/cortex-m3/hw/vectors_cm3.S \
36         bertos/cpu/cortex-m3/hw/crt_cm3.S \
37         #
38
39 # This is an hosted application
40 stm32p103_PREFIX = arm-none-eabi-
41
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
45
46 stm32p103_CPU = cortex-m3
47
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
54
55 ifeq ($(stm32p103_DEBUG),0)
56         # Production options
57         stm32p103_CFLAGS += -O0
58         stm32p103_CXXFLAGS += -O0
59 else
60         # Debug options
61         stm32p103_CPPAFLAGS += -g -gdwarf-2
62         stm32p103_CPPFLAGS += -O0 -g3 -gdwarf-2 -fverbose-asm
63 endif