"32 Kbytes internal SRAM memory" ]
# GCC flags for this cpu.
-CPP_FLAGS += [ "-D__ARM_AT91SAM7S128__" ]
-LD_FLAGS += [ "-T " + SCRIPT_DIR + "at91sam7_128_rom.ld" ]
+MK_CPU_CPPFLAGS += " -D__ARM_AT91SAM7S128__"
+MK_LDFLAGS += " -T " + SCRIPT_DIR + "at91sam7_128_rom.ld"
"64 Kbytes internal SRAM memory" ]
# GCC flags for this cpu.
-CPP_FLAGS += [ "-D__ARM_AT91SAM7S256__" ]
-LD_FLAGS += [ "-T " + SCRIPT_DIR + "at91sam7_256_rom.ld" ]
+MK_CPU_CPPFLAGS += " -D__ARM_AT91SAM7S256__"
+MK_LDFLAGS += " -T " + SCRIPT_DIR + "at91sam7_256_rom.ld"
"64 Kbytes internal SRAM memory" ]
# GCC flags for this cpu.
-CPP_FLAGS += [ "-D__ARM_AT91SAM7S512__" ]
-LD_FLAGS += [ "-T " + SCRIPT_DIR + "at91sam7_512_rom.ld" ]
+MK_CPU_CPPFLAGS += " -D__ARM_AT91SAM7S512__"
+MK_LDFLAGS += " -T " + SCRIPT_DIR + "at91sam7_512_rom.ld"
"16 Kbytes internal SRAM memory" ]
# GCC flags for this cpu.
-CPP_FLAGS += [ "-D__ARM_AT91SAM7S64__" ]
-LD_FLAGS += [ "-T " + SCRIPT_DIR + "at91sam7_64_rom.ld" ]
+MK_CPU_CPPFLAGS += " -D__ARM_AT91SAM7S64__"
+MK_LDFLAGS += " -T " + SCRIPT_DIR + "at91sam7_64_rom.ld"
"32 Kbytes internal SRAM memory" ]
# GCC flags for this cpu.
-CPP_FLAGS += [ "-D__ARM_AT91SAM7X128__" ]
-LD_FLAGS += [ "-T " + SCRIPT_DIR + "at91sam7_128_rom.ld" ]
+MK_CPU_CPPFLAGS += " -D__ARM_AT91SAM7X128__"
+MK_LDFLAGS += " -T " + SCRIPT_DIR + "at91sam7_128_rom.ld"
"64 Kbytes internal SRAM memory" ]
# GCC flags for this cpu.
-CPP_FLAGS += [ "-D__ARM_AT91SAM7X256__" ]
-LD_FLAGS += [ "-T " + SCRIPT_DIR + "at91sam7_256_rom.ld" ]
+MK_CPU_CPPFLAGS += " -D__ARM_AT91SAM7X256__"
+MK_LDFLAGS += " -T " + SCRIPT_DIR + "at91sam7_256_rom.ld"
"64 Kbytes internal SRAM memory" ]
# GCC flags for this cpu.
-CPP_FLAGS += [ "-D__ARM_AT91SAM7X512__" ]
-LD_FLAGS += [ "-T " + SCRIPT_DIR + "at91sam7_512_rom.ld" ]
+MK_CPU_CPPFLAGS += " -D__ARM_AT91SAM7X512__"
+MK_LDFLAGS += " -T " + SCRIPT_DIR + "at91sam7_512_rom.ld"
CORE_CPU = "arm7tdmi"
# CPU type used for flashing/debugging
-PROGRAMMER_CPU = "at91sam7"
+MK_PROGRAMMER_CPU = "at91sam7"
# Name of the flag used by the build system to pass to the compiler the CPU type.
-CPU_FLAG_NAME = "CPU"
+MK_CPU = CORE_CPU
# CPU default clock frequency
CPU_DEFAULT_FREQ = "48023000UL"
# Special CPU related tags.
-CPU_TAGS = ["at91"]
+CPU_TAGS = ["at91", CORE_CPU]
# Where are locate the bertos directories
SCRIPT_DIR = CPU_DIR + "arm/scripts/"
HW_DIR = CPU_DIR + "arm/hw/"
-DRV_DIR = CPU_DIR + "arm/drv/"
+PROG_SCRIPT_DIR = "prog_scripts/arm/"
-FLASH_SCRIPT = SCRIPT_DIR + "flash.sh"
-DEBUG_SCRIPT = SCRIPT_DIR + "debug.sh"
-GDB_INIT_SCRIPT = SCRIPT_DIR + "openocd/gdbinit-sam7"
+MK_FLASH_SCRIPT = PROG_SCRIPT_DIR + "flash.sh"
+MK_DEBUG_SCRIPT = PROG_SCRIPT_DIR + "debug.sh"
+MK_GDB_INIT_SCRIPT = PROG_SCRIPT_DIR + "openocd/gdbinit-sam7"
# Common GCC flags.
-CPPA_FLAGS = [ "-O0", "-g -gdwarf-2", "-g -gen-debug" ]
-CPP_FLAGS = [ "-O0", "-g3 -gdwarf-2", "-fverbose-asm", "-I" + CPU_DIR + "arm/" ]
-LD_FLAGS = [ "-nostartfiles", "-Wl,--no-warn-mismatch" ]
-# CRT file.
-CPPA_SRC = [ HW_DIR + "crtat91sam7_rom.S"]
+MK_CPPAFLAGS = "-O0 -g -gdwarf-2 -g -gen-debug"
+MK_CPU_CPPFLAGS = "-O0 -g3 -gdwarf-2 -fverbose-asm -I" + CPU_DIR + "arm/"
+MK_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_CPPASRC = [ HW_DIR + "crtat91sam7_rom.S"]
# Type of the toolchain we should use to compile the source for this CPU.
TOOLCHAIN = "avr"
-# Name of the flag used by the build system to pass to the compiler the CPU type.
-CPU_FLAG_NAME = "MCU"
-
# CPU default clock frequency
CPU_DEFAULT_FREQ = "8000000UL"
# Where are locate the bertos directories
SCRIPT_DIR = CPU_DIR + "avr/scripts/"
-HW_DIR = CPU_DIR + "avr/hw/"
-DRV_DIR = CPU_DIR + "avr/drv/"
+PROG_SCRIPT_DIR = "prog_scripts/avr/"
-FLASH_SCRIPT = SCRIPT_DIR + "flash.sh"
-DEBUG_SCRIPT = SCRIPT_DIR + "debug.sh"
+MK_FLASH_SCRIPT = PROG_SCRIPT_DIR + "flash.sh"
+MK_DEBUG_SCRIPT = PROG_SCRIPT_DIR + "debug.sh"
# Common GCC flags.
-CPP_FLAGS = [ "-Os", "-fno-strict-aliasing", "-I" + CPU_DIR + "avr/"]
-
-SUPPORTED_DRV = [ "adc",
- "flash",
- "pwm",
- "ser",
- "sipo",
- "timer",
- "wdt",
- "ic2",
- "kdebug",
- "lcd_32122a" ]
+MK_CPU_CPPFLAGS = "-Os -fno-strict-aliasing -I" + CPU_DIR + "avr/"
# CPU type used for flashing
-PROGRAMMER_CPU = CORE_CPU
+MK_PROGRAMMER_CPU = CORE_CPU
+# Name of the flag used by the build system to pass to the compiler the CPU type.
+MK_MCU = CORE_CPU
+
+# Add CPU core to tags
+CPU_TAGS += [ CORE_CPU ]
self.pageContent.frequencySpinBox.setVisible(True)
infos = qvariant_converter.getDict(self.pageContent.cpuList.currentItem().data(Qt.UserRole))
for key, value in infos.items():
- if type(CPU_DEF[key]) == list:
- infos[key] = qvariant_converter.getStringList(value)
- if type(CPU_DEF[key]) == str or type(CPU_DEF) == unicode:
- infos[key] = qvariant_converter.getString(value)
+ if key in CPU_DEF:
+ if type(CPU_DEF[key]) == list:
+ infos[key] = qvariant_converter.getStringList(value)
+ if type(CPU_DEF[key]) == str or type(CPU_DEF) == unicode:
+ infos[key] = qvariant_converter.getString(value)
+ else:
+ del infos[key]
self.setProjectInfo("CPU_INFOS", infos)
self.setProjectInfo("CPU_NAME", unicode(self.pageContent.cpuList.currentItem().text()))
self.setProjectInfo("SELECTED_FREQ", unicode(long(self.pageContent.frequencySpinBox.value())))
tag_dict = self.projectInfo("ALL_CPU_TAGS")
for tag in tag_dict:
- if tag in infos["CPU_TAGS"] + [infos["CPU_NAME"], infos["CORE_CPU"], infos["TOOLCHAIN"]]:
+ if tag in infos["CPU_TAGS"] + [infos["CPU_NAME"], infos["TOOLCHAIN"]]:
tag_dict[tag] = True
else:
tag_dict[tag] = False
tag_dict[element] = False
infos = project_info.info("CPU_INFOS")
for tag in tag_dict:
- if tag in infos["CPU_TAGS"] + [infos["CPU_NAME"], infos["CORE_CPU"], infos["TOOLCHAIN"]]:
+ if tag in infos["CPU_TAGS"] + [infos["CPU_NAME"], infos["TOOLCHAIN"]]:
tag_dict[tag] = True
else:
tag_dict[tag] = False
mk_data = {}
mk_data["$pname"] = os.path.basename(project_info.info("PROJECT_PATH"))
mk_data["$cpuclockfreq"] = project_info.info("SELECTED_FREQ")
-
cpu_mk_parameters = []
for key, value in project_info.info("CPU_INFOS").items():
if key.startswith("MK_"):
- cpu_mk_parameters.append("%s = %s" %(key.replace("MK_", mk_data["$pname"]), value)
+ cpu_mk_parameters.append("%s = %s" %(key.replace("MK_", mk_data["$pname"]), value))
mk_data["$cpuparameters"] = "\n".join(cpu_mk_parameters)
mk_data["$csrc"], mk_data["$pcsrc"], mk_data["$cppasrc"], mk_data["$cxxsrc"], mk_data["$asrc"], mk_data["$constants"] = csrcGenerator(project_info)
mk_data["$prefix"] = replaceSeparators(project_info.info("TOOLCHAIN")["path"].split("gcc")[0])
mk_data["$suffix"] = replaceSeparators(project_info.info("TOOLCHAIN")["path"].split("gcc")[1])
mk_data["$main"] = os.path.basename(project_info.info("PROJECT_PATH")) + "/main.c"
- mk_data["$programmercpu"] = project_info.info("CPU_INFOS")["PROGRAMMER_CPU"]
- mk_data["$flashscript"] = project_info.info("CPU_INFOS")["FLASH_SCRIPT"]
- mk_data["$debugscript"] = project_info.info("CPU_INFOS")["DEBUG_SCRIPT"]
for key in mk_data:
while makefile.find(key) != -1:
makefile = makefile.replace(key, mk_data[key])
for cpu in cpu_info:
tag_set |= set([cpu["CPU_NAME"]])
tag_set |= set(cpu["CPU_TAGS"])
- tag_set |= set([cpu["CORE_CPU"]])
tag_set |= set([cpu["TOOLCHAIN"]])
return tag_set
"DEFINITION_PATH": "",
"TOOLCHAIN": "",
"CPU_TAGS": [],
- "CPU_FLAG_NAME": "",
- "CORE_CPU": "",
- "SCRIPT_DIR": "",
- "HW_DIR": "",
- "DRV_DIR": "",
- "C_FLAGS": [],
- "CPPA_FLAGS" : [],
- "CPP_FLAGS" : [],
- "CPPA_FLAGS": [],
- "CXX_FLAGS": [],
- "AS_FLAGS": [],
- "AR_FLAGS": [],
- "LD_FLAGS" : [],
"CPPA_SRC" : [],
"CXX_SRC": [],
"ASRC": [],
"C_SRC": [],
- "SUPPORTED_DRV" : [],
"PC_SRC" : [],
"CPU_DESC" : [],
"CPU_DEFAULT_FREQ": "1000000",
- "PROGRAMMER_CPU": "",
- "FLASH_SCRIPT": "",
- "DEBUG_SCRIPT": "",
"GDB_INIT_SCRIPT": "",
}
$pname_PROGRAMMER_TYPE = none
$pname_PROGRAMMER_PORT = none
-####### End of configurable section, do not edit the lines below! #######
-
-# Automatically generated by the wizard. PLEASE DO NOT EDIT!
-$pname_CSRC = $($pname_WIZARD_CSRC) $($pname_USER_CSRC)
-
-# Automatically generated by the wizard. PLEASE DO NOT EDIT!
-$pname_PCSRC = $($pname_WIZARD_PCSRC) $($pname_USER_PCSRC)
-
-# Automatically generated by the wizard. PLEASE DO NOT EDIT!
-$pname_CPPASRC = $($pname_WIZARD_CPPASRC) $($pname_USER_CPPASRC)
-
-# Automatically generated by the wizard. PLEASE DO NOT EDIT!
-$pname_CXXSRC = $($pname_WIZARD_CXXSRC) $($pname_USER_CXXSRC)
-
-# Automatically generated by the wizard. PLEASE DO NOT EDIT!
-$pname_ASRC = $($pname_WIZARD_ASRC) $($pname_USER_ASRC)
+$cpuparameters
$asrc
#
-$pname_CFLAGS = $cflags
-$pname_LDFLAGS = $ldflags
-$pname_CPPFLAGS = -D'CPU_FREQ=($cpuclockfreqUL)' -D'ARCH=(ARCH_DEFAULT)' -D'WIZ_AUTOGEN' -I$pname/ $cppflags
-$pname_CPPAFLAGS = $cppaflags
-$pname_CXXFLAGS = $cxxflags
-$pname_ASFLAGS = $asflags
-$pname_ARFLAGS = $arflags
-
-$pname_PROGRAMMER_CPU = $programmercpu
-$pname_FLASH_SCRIPT = $flashscript
-$pname_DEBUG_SCRIPT = $debugscript
+$pname_CPPFLAGS = -D'CPU_FREQ=($cpuclockfreqUL)' -D'ARCH=(ARCH_DEFAULT)' -D'WIZ_AUTOGEN' -I$pname/ $($pname_CPU_CPPFLAGS)
+
+# Automatically generated by the wizard. PLEASE DO NOT EDIT!
+$pname_CSRC = $($pname_WIZARD_CSRC) $($pname_USER_CSRC)
+
+# Automatically generated by the wizard. PLEASE DO NOT EDIT!
+$pname_PCSRC = $($pname_WIZARD_PCSRC) $($pname_USER_PCSRC)
+
+# Automatically generated by the wizard. PLEASE DO NOT EDIT!
+$pname_CPPASRC = $($pname_WIZARD_CPPASRC) $($pname_USER_CPPASRC)
+
+# Automatically generated by the wizard. PLEASE DO NOT EDIT!
+$pname_CXXSRC = $($pname_WIZARD_CXXSRC) $($pname_USER_CXXSRC)
+
+# Automatically generated by the wizard. PLEASE DO NOT EDIT!
+$pname_ASRC = $($pname_WIZARD_ASRC) $($pname_USER_ASRC)