Merge from trunk.
[bertos.git] / bertos / cpu / arm / info / at91sam7.common
index c305d5ed394a30f5c2cd0b99af892c76d96dbb7e..00f3277b9330ea70901268f6df5b129d7c469ba3 100644 (file)
@@ -54,25 +54,33 @@ TOOLCHAIN = "arm"
 # If we use the GCC compiler we should pass some flags.
 CORE_CPU = "arm7tdmi"
 
+# CPU type used for flashing/debugging
+MK_PROGRAMMER_CPU = "at91sam7"
+
+# Name of the flag used by the build system to pass to the compiler the CPU type.
+MK_CPU = CORE_CPU
+
+# CPU default clock frequency
+CPU_DEFAULT_FREQ = "48023000UL"
+
+# Special CPU related tags.
+CPU_TAGS = ["at91", CORE_CPU]
+
 # Where are locate the bertos directories
-SCRIPT_DIR = CPU_DIR + "arm/script/"
+SCRIPT_DIR = CPU_DIR + "arm/scripts/"
 HW_DIR = CPU_DIR + "arm/hw/"
-DRV_DIR = CPU_DIR + "arm/drv/"
+
+MK_FLASH_SCRIPT = PRG_SCRIPTS_DIR + "arm/flash.sh"
+MK_STOPFLASH_SCRIPT = PRG_SCRIPTS_DIR + "arm/stopopenocd.sh"
+MK_DEBUG_SCRIPT = PRG_SCRIPTS_DIR + "arm/debug.sh"
+MK_STOPDEBUG_SCRIPT = PRG_SCRIPTS_DIR + "arm/stopopenocd.sh"
+
+GDB_INIT_SCRIPT = PRG_SCRIPTS_DIR + "arm/openocd/gdbinit-sam7"
 
 # Common GCC flags.
-C_FLAGS = ["-I" + CPU_DIR + "arm/"]
-CPPA_FLAGS = [ "-O0", "-g -gdwarf-2", "-g -gen-debug" ]
-CPP_FLAGS = [ "-O0", "-g3 -gdwarf-2", "-fverbose-asm" ]
-LD_FLAGS = [ "-nostartfiles", "-Wl,--no-warn-mismatch" ]
-# CRT file.
-CPPA_SRC = [ HW_DIR + "crtat91sam7_rom.S"]
+MK_CPU_CPPAFLAGS = "-g -gdwarf-2"
+MK_CPU_CPPFLAGS = "-O0 -g3 -gdwarf-2 -fverbose-asm -I" + CPU_DIR + "arm/"
+MK_CPU_LDFLAGS = "-nostartfiles -Wl,--no-warn-mismatch"
 
-# For this cpu core BeRTOS supports these drivers:
-SUPPORTED_DRV = [ "adc",
-                 "kdebug",
-                 "pwm",
-                 "ser",
-                 "stepper",
-                 "timer",
-                 "twi" ]
-       
+# CRT file.
+MK_CPU_CPPASRC = HW_DIR + "crtat91sam7_rom.S"