--- a/canfestival/canfestival.py Tue Mar 05 20:12:51 2013 +0900
+++ b/canfestival/canfestival.py Tue Mar 05 20:14:12 2013 +0900
@@ -400,7 +400,6 @@
<xsd:element name="CanFestivalInstance">
<xsd:attribute name="CAN_Driver" type="xsd:string" use="optional" default="%(CAN_Driver)s"/>
- <xsd:attribute name="Debug_mode" type="xsd:boolean" use="optional" default="false"/>
@@ -419,19 +418,11 @@
- def GetCanDriver(self):
+ def CTNGenerate_C(self, buildpath, locations): can_driver = self.CanFestivalInstance.getCAN_Driver()
- if sys.platform == 'win32':
- if self.CanFestivalInstance.getDebug_mode() and os.path.isfile(os.path.join("%s"%(can_driver + '_DEBUG.dll'))):
- can_driver += '_DEBUG.dll'
- def CTNGenerate_C(self, buildpath, locations):
format_dict = {"locstr" : "_".join(map(str,self.GetCurrentLocation())),
- "candriver" : self.GetCanDriver(),
+ "candriver" : can_driver, @@ -522,7 +513,13 @@
f = open(cf_main_path,'w')
- return [(cf_main_path, local_canfestival_config.getCFLAGS(CanFestivalPath))],local_canfestival_config.getLDFLAGS(CanFestivalPath), True
+ res = [(cf_main_path, local_canfestival_config.getCFLAGS(CanFestivalPath))],local_canfestival_config.getLDFLAGS(CanFestivalPath), True + can_drv_ext = self.GetCTRoot().GetBuilder().extension + can_driver_path = os.path.join(CanFestivalPath,"drivers",can_driver,"libcanfestival_"+can_driver+can_drv_ext) + if os.path.exists(can_driver_path): + res += ((can_driver+can_drv_ext, file(can_driver_path,"rb")),)