3088ccff24e2f4769b9140ca43afec2182b1225a
[bertos.git] / bertos / cpu / arm / info / at91sam7.common
1 #
2 #-*- coding: utf-8 -*-
3 #
4 # \file
5 # <!--
6 # This file is part of BeRTOS.
7 #
8 # Bertos is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2 of the License, or
11 # (at your option) any later version.
12 #
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 # GNU General Public License for more details.
17 #
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, write to the Free Software
20 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
21 #
22 # As a special exception, you may use this file as part of a free software
23 # library without restriction.  Specifically, if other files instantiate
24 # templates or use macros or inline functions from this file, or you compile
25 # this file and link it with other files to produce an executable, this
26 # file does not by itself cause the resulting executable to be covered by
27 # the GNU General Public License.  This exception does not however
28 # invalidate any other reasons why the executable file might be covered by
29 # the GNU General Public License.
30 #
31 # Copyright 2008 Develer S.r.l. (http://www.develer.com/)
32 #
33 # -->
34 #
35 # General CPU info denfinition for AT91SAM7 family.
36 #
37 # This file contain all info for the BeRTOS wizard.
38 #
39 # \author Daniele Basile <asterix@develer.com>
40 #
41 #
42
43 # Import the common settings for the path.
44 include("../../path.common")
45
46 # Short description of the cpu.
47 CPU_DESC = ["ATMEL AT91 ARM",
48           "ARMTDMI ARM Thumb Processor",
49           "32-bit RISC Architecture"]
50
51 # Type of the toolchain we should use to compile the source for this CPU.
52 TOOLCHAIN = "arm"
53
54 # If we use the GCC compiler we should pass some flags.
55 CORE_CPU = "arm7tdmi"
56
57 # CPU type used for flashing/debugging
58 MK_PROGRAMMER_CPU = "at91sam7"
59
60 # Name of the flag used by the build system to pass to the compiler the CPU type.
61 MK_CPU = CORE_CPU
62
63 # CPU default clock frequency
64 CPU_DEFAULT_FREQ = "48023000UL"
65
66 # Special CPU related tags.
67 CPU_TAGS = ["at91", CORE_CPU]
68
69 # Where are locate the bertos directories
70 SCRIPT_DIR = CPU_DIR + "arm/scripts/"
71 HW_DIR = CPU_DIR + "arm/hw/"
72
73 MK_FLASH_SCRIPT = PRG_SCRIPTS_DIR + "arm/flash.sh"
74 MK_STOPFLASH_SCRIPT = PRG_SCRIPTS_DIR + "arm/stopopenocd.sh"
75 MK_DEBUG_SCRIPT = PRG_SCRIPTS_DIR + "arm/debug.sh"
76 MK_STOPDEBUG_SCRIPT = PRG_SCRIPTS_DIR + "arm/stopopenocd.sh"
77
78 GDB_INIT_SCRIPT = PRG_SCRIPTS_DIR + "arm/openocd/gdbinit-sam7"
79
80 # Common GCC flags.
81 MK_CPU_CPPAFLAGS = "-O0 -g -gdwarf-2 -g -gen-debug"
82 MK_CPU_CPPFLAGS = "-O0 -g3 -gdwarf-2 -fverbose-asm -I" + CPU_DIR + "arm/"
83 MK_CPU_LDFLAGS = "-nostartfiles -Wl,--no-warn-mismatch"
84
85 # CRT file.
86 MK_CPU_CPPASRC = HW_DIR + "crtat91sam7_rom.S"