# NOTE: this can throw an Exception if the user has changed the directory containing the project
self.infos["PROJECT_NAME"] = project_data.get("PROJECT_NAME", os.path.basename(project_dir))
self.infos["PROJECT_PATH"] = os.path.dirname(project_file)
- project_src_path = project_data.get("PROJECT_SRC_PATH", None)
- project_src_path = os.path.join(project_dir, project_data.get("PROJECT_SRC_PATH", None))
+ project_src_path = os.path.join(project_dir, project_data.get("PROJECT_SRC_PATH", project_data["PROJECT_NAME"]))
if project_src_path:
self.infos["PROJECT_SRC_PATH"] = project_src_path
try:
version_string = bertosVersion(project_info.info("BERTOS_PATH"))
version_list = [int(i) for i in version_string.split()[-1].split('.')]
- if version_list < [2, 5]:
- # For older versions of BeRTOS add the toolchain to the tags
- tags.append(project_info.info("CPU_INFOS")["TOOLCHAIN"])
except ValueError:
- # If the version file hasn't a valid version number do nothing
- pass
+ # If the version file hasn't a valid version number assume it's an older
+ # project.
+ version_list = [0, 0]
+ if version_list < [2, 5]:
+ # For older versions of BeRTOS add the toolchain to the tags
+ tags.append(project_info.info("CPU_INFOS")["TOOLCHAIN"])
for tag in tags:
for filename, path in project_info.searchFiles(module + "_" + tag + ".c"):
#
-# Copyright 2009 Develer S.r.l. (http://www.develer.com/)
-# All rights reserved.
-#
-# Makefile template for BeRTOS wizard.
-#
-# Author: Lorenzo Berni <duplo@develer.com>
-#
+# Wizard autogenerated makefile.
+# DO NOT EDIT, use the $pname_user.mk file instead.
#
# Constants automatically defined by the selected modules
#
-# Copyright 2009 Develer S.r.l. (http://www.develer.com/)
-# All rights reserved.
-#
-# Makefile template for BeRTOS wizard.
-#
-# Author: Lorenzo Berni <duplo@develer.com>
-#
+# User makefile.
+# Edit this file to change compiler options and related stuff.
#
# Programmer interface configuration, see http://dev.bertos.org/wiki/ProgrammerInterface for help
-fno-strict-aliasing \
-fwrapv \
#
-
-# Include the mk file generated by the wizard