From: batt Date: Sat, 3 Apr 2010 10:35:20 +0000 (+0000) Subject: LPC2: add LPC2378 wizard definitions. X-Git-Tag: 2.5.0~522 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=8284fb65c8c8f9fd233da33fd08f1f81b64cb94b;p=bertos.git LPC2: add LPC2378 wizard definitions. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3386 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/bertos/cpu/arm/info/LPC2378.cdef b/bertos/cpu/arm/info/LPC2378.cdef new file mode 100644 index 00000000..461ee209 --- /dev/null +++ b/bertos/cpu/arm/info/LPC2378.cdef @@ -0,0 +1,56 @@ +# +#-*- coding: utf-8 -*- +# +# \file +# +# +# General CPU info denfinition for NXP LPC2 family. +# +# This file contain all info for the BeRTOS wizard. +# +# \author Francesco Sacchi +# +# + +# Import the common settings for the lpc2xxx family. +include("lpc2.common") + +# Short description of the cpu. +CPU_DESC += [ "512 Kbytes internal flash memory", + "32 Kbytes internal SRAM memory" ] + +# GCC flags for this cpu. +MK_CPU_CPPFLAGS += " -D__ARM_LPC2378__" +MK_CPU_LDFLAGS += " -T " + SCRIPT_DIR + "lpc2378.ld" + +# CPU type used for flashing/debugging +MK_PROGRAMMER_CPU = "lpc2378" + diff --git a/bertos/cpu/arm/info/lpc2.common b/bertos/cpu/arm/info/lpc2.common new file mode 100644 index 00000000..3e62b877 --- /dev/null +++ b/bertos/cpu/arm/info/lpc2.common @@ -0,0 +1,84 @@ +# +#-*- coding: utf-8 -*- +# +# \file +# +# +# General CPU info denfinition for NXP LPC2 family. +# +# This file contain all info for the BeRTOS wizard. +# +# \author Francesco Sacchi +# +# + +# Import the common settings for the path. +include("../../path.common") + +# Short description of the cpu. +CPU_DESC = ["NXP LPC2xxx ARM", + "ARMTDMI ARM Thumb Processor", + "32-bit RISC Architecture"] + +# Type of the toolchain we should use to compile the source for this CPU. +TOOLCHAIN = "arm" + +# If we use the GCC compiler we should pass some flags. +CORE_CPU = "arm7tdmi" + +# 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 = "72000000UL" + +# Special CPU related tags. +CPU_TAGS = ["lpc2", CORE_CPU] + +# Where are locate the bertos directories +SCRIPT_DIR = CPU_DIR + "arm/scripts/" +HW_DIR = CPU_DIR + "arm/hw/" + +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. +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" + +# CRT files. +MK_CPU_CPPASRC = HW_DIR + "crt_arm7tdmi.S " + HW_DIR + "vectors_lpc2.S" +MK_CPU_CSRC = HW_DIR + "init_lpc2.c"