Fix problems with older BeRTOS versions.
authorbatt <batt@38d2e660-2303-0410-9eaa-f027e97ec537>
Tue, 27 Apr 2010 10:52:44 +0000 (10:52 +0000)
committerbatt <batt@38d2e660-2303-0410-9eaa-f027e97ec537>
Tue, 27 Apr 2010 10:52:44 +0000 (10:52 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3536 38d2e660-2303-0410-9eaa-f027e97ec537

wizard/BProject.py
wizard/bertos_utils.py
wizard/mktemplates/template.mk
wizard/mktemplates/template_user.mk

index b3116d70390044b23c6a202e3153f74977bfa96e..79e4477fe57fbed51da28c3561497faec3290195 100644 (file)
@@ -86,8 +86,7 @@ class BProject(object):
         # 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
             
index c0dc0867b0088095bc27a64a0e7afdc56f33b55a..493ffbe21c64bc8653994a1b1d8fc69dda68e620 100644 (file)
@@ -283,12 +283,13 @@ def findModuleFiles(module, project_info):
     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"):
index ca87743f103fd1f70c5f70fe97126c18f86bcd2a..3fff12943b8ec93a70df040a0d530e647baffa35 100644 (file)
@@ -1,11 +1,6 @@
 #
-# 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
index 230efd586ebf8808233ae870a431a0cde45cfab7..d0a8724212095c2aef8eb851beecc035528ed828 100644 (file)
@@ -1,11 +1,6 @@
 #
-# 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
@@ -46,5 +41,3 @@ $pname_USER_CPPFLAGS = \
        -fno-strict-aliasing \
        -fwrapv \
        #
-
-# Include the mk file generated by the wizard