Fix comments and add the wizard info.
[bertos.git] / examples / triface / triface.mk
1 #
2 # $Id$
3 # Copyright 2006 Develer S.r.l. (http://www.develer.com/)
4 # All rights reserved.
5 #
6 # Makefile fragment for DevLib triface application.
7 #
8 # Author: Bernie Innocenti <bernie@codewiz.org>
9 #
10 #
11
12 # Set to 1 for debug builds
13 triface_DEBUG = 1
14
15 # Our target application
16 TRG += triface
17 CPU = atmega1281
18 BOOT_ADDR_START = 0x1E000
19
20 triface_CROSS = avr-
21
22 ifeq ($(CPU), atmega1281)
23 triface_hfuse = 0x98
24 triface_lfuse = 0x3d
25 triface_efuse = 0x7f
26 triface_lock = 0x2f
27 else
28 triface_hfuse = 0x88
29 triface_lfuse = 0xff
30 triface_efuse = 0xff
31 triface_lock = 0x2f
32 endif
33
34 triface_MCU = $(CPU)
35
36 triface_CSRC = \
37         examples/triface/triface.c \
38         examples/triface/protocol.c \
39         examples/triface/hw/hw_adc.c \
40         bertos/drv/timer.c \
41         bertos/drv/ser.c \
42         bertos/drv/buzzer.c \
43         bertos/cpu/avr/drv/ser_avr.c \
44         bertos/cpu/avr/drv/sipo.c \
45         bertos/mware/formatwr.c \
46         bertos/mware/hex.c \
47         bertos/struct/hashtable.c \
48         bertos/mware/readline.c \
49         bertos/mware/parser.c \
50         bertos/mware/event.c \
51         bertos/kern/kfile.c \
52         bertos/net/keytag.c \
53         #
54
55 triface_PCSRC += bertos/mware/formatwr.c
56
57
58 triface_CFLAGS = -O2 -D'ARCH=(ARCH_TRIFACE)' -fno-strict-aliasing -Iexamples/triface -Ibertos/cpu/avr
59 triface_LDFLAGS = -Wl
60
61
62 # Set to 1 for debug builds
63 boot_DEBUG = 0
64
65 # Our target application
66 TRG += boot
67
68 boot_MCU = $(CPU)
69 boot_CSRC = \
70         examples/triface/boot/main.c \
71         bertos/net/xmodem.c \
72         bertos/drv/ser.c \
73         bertos/cpu/avr/drv/ser_avr.c \
74         bertos/cpu/avr/drv/flash_avr.c \
75         bertos/drv/timer.c \
76         bertos/algo/crc.c \
77         bertos/mware/hex.c \
78         bertos/kern/kfile.c \
79         #
80 boot_CROSS = avr-
81 boot_CPPFLAGS = -D'ARCH=(ARCH_TRIFACE|ARCH_BOOT)' -Iexamples/triface/boot -Ibertos/cpu/avr
82 boot_CFLAGS = -Os -mcall-prologues
83 boot_LDFLAGS = -Wl,--relax -Wl,--section-start=.text=$(BOOT_ADDR_START)
84
85