--- a/canfestival/canfestival.py Mon Mar 11 14:49:17 2013 +0100
+++ b/canfestival/canfestival.py Wed Mar 13 12:34:25 2013 +0900
@@ -400,14 +400,22 @@
- can_driver = self.CanFestivalInstance.getCAN_Driver()
- can_driver = local_canfestival_config.DLL_LIST[0]
- can_drv_ext = self.GetCTRoot().GetBuilder().extension
- return "libcanfestival_" + can_driver + can_drv_ext
+ res = self.CanFestivalInstance.getCAN_Driver() def CTNGenerate_C(self, buildpath, locations):
- can_driver_name = self.GetCanDriver()
+ can_driver = self.GetCanDriver() + if can_driver is not None: + can_drivers = local_canfestival_config.DLL_LIST + if can_driver not in can_drivers : + can_driver = can_drivers[0] + can_drv_ext = self.GetCTRoot().GetBuilder().extension + can_driver_name = "libcanfestival_" + can_driver + can_drv_ext format_dict = {"locstr" : "_".join(map(str,self.GetCurrentLocation())),
"candriver" : can_driver_name,
@@ -504,7 +512,7 @@
res = [(cf_main_path, local_canfestival_config.getCFLAGS(CanFestivalPath))],local_canfestival_config.getLDFLAGS(CanFestivalPath), True
+ if can_driver is not None: can_driver_path = os.path.join(CanFestivalPath,"drivers",can_driver,can_driver_name)
if os.path.exists(can_driver_path):
res += ((can_driver_name, file(can_driver_path,"rb")),)