lpcmanager

Parents c9b717d8fc23
Children e825a9e4e899
Added per LPCBus type LDFLAGS, specially for Modbut RTU, links with libary generated in libmbrtu buildroot package
  • +6 -2
    LPCBus.py
  • --- a/LPCBus.py Thu Jan 22 18:12:42 2015 +0100
    +++ b/LPCBus.py Fri Jan 23 14:06:59 2015 +0100
    @@ -5,13 +5,17 @@
    def GetLocalCode(fname):
    return open(os.path.join(modpath,"LPCBus",fname)).read()
    +Busses = [ "Right", "On Board", "Devices" ]
    +
    bus_template_code = { plc:GetLocalCode(plc+".c") for plc in ["MC8", "MC9"] }
    bus_code = { "MC9:%s"%bus :
    { section :
    GetLocalCode("%s_%s_%s.c"%("MC9",''.join(bus.split()),section))
    for section in ["decl", "init", "retrieve", "publish", "cleanup"]}
    - for bus in [ "Right", "On Board", "Devices"]}
    + for bus in Busses}
    +
    +LPCBusLDFLAGS = { "MC9:On Board" : "-lmbrtu" }
    # to be overloaded at import
    LPCarch = None
    @@ -278,5 +282,5 @@
    module.close()
    matiec_flags = '"-I%s" -Wno-unused-function'%os.path.abspath(self.GetCTRoot().GetIECLibPath())
    - return [(Gen_Module_path, matiec_flags)],"",True
    + return [(Gen_Module_path, matiec_flags)], LPCBusLDFLAGS.get(BusName, ""), True