--- a/LPCArch.py Wed Oct 04 11:19:27 2023 +0200
+++ b/LPCArch.py Wed Oct 04 11:20:43 2023 +0200
@@ -5,7 +5,101 @@
SVG_GOT_modules = ['GOT_012', 'LHC2_GOT_012']
MC9_modules = ['MC9', 'MW1']
SOM28_modules = MC9_modules + WX_GOT_modules
-SOM6_modules = SVG_GOT_modules + ['MM1']
+# Temporary until preempt merge in all som6 modules +PREEMPTSOM6_modules = ['MM1', 'MM2'] +SOM6_modules = SVG_GOT_modules + PREEMPTSOM6_modules +product_descriptions = { + ("On Board", "uC_OnBoard"), + ("Devices", "uC_Devices")] + ("Right", "SOM28_Right"), + ("On Board", "SOM_OnBoard"), + ("Devices", "SOM_Devices")] + ("Right", "SOM28_Right"), + ("On Board", "SOM_OnBoard"), + ("Devices", "SOM_Devices")] + ("On Board", "SOM_OnBoard"), + ("Devices", "SOM_Devices")] + ("Right", "SOM28_Right"), + ("On Board", "SOM_OnBoard"), + ("Devices", "SOM_Devices")] + ("Right", "SOM28_Right"), #TODO check if True + ("On Board", "SOM_OnBoard"), + ("Devices", "SOM_Devices")] + "header": "LHC2_GOT100", + ("Right", "SOM28_Right"), #TODO check if True + ("On Board", "SOM_OnBoard"), + ("Devices", "SOM_Devices")] + ("On Board", "SOM_OnBoard"), + ("Devices", "SOM_Devices")] + ("On Board", "SOM_OnBoard"), + ("Devices", "SOM_Devices")] + # "LDFLAGS": '"' + os.path.join(RightPath, "i2c_smt_lib.a") + '"', + ("Right", "SOM6_Right"), + ("On Board", "SOM_OnBoard"), + ("Devices", "SOM_Devices")] + # "LDFLAGS": '"' + os.path.join(RightPath, "i2c_smt_lib.a") + '"', + ("Right", "SOM6_Right"), + ("On Board", "SOM_OnBoard"), + ("Devices", "SOM_Devices")], @@ -14,15 +108,22 @@
+def GetLPCProductDesc(): + global product, product_descriptions + return product_descriptions[product] if product in SOM28_modules:
if product in SOM6_modules:
if product in SOM28_modules:
elif product in SOM6_modules:
--- a/LPCBus.py Wed Oct 04 11:19:27 2023 +0200
+++ b/LPCBus.py Wed Oct 04 11:20:43 2023 +0200
@@ -1,7 +1,7 @@
from __future__ import absolute_import
-from LPCArch import GetLPCArch, GetLPCProduct, SOM28_modules
+from LPCArch import GetLPCArch, GetLPCProduct, SOM28_modules, GetLPCProductDesc import util.paths as paths
from plcopen.structures import LOCATIONDATATYPES
@@ -9,6 +9,7 @@
LOCATION_VAR_INPUT, LOCATION_VAR_OUTPUT, LOCATION_VAR_MEMORY
product = GetLPCProduct()
+product_desc = GetLPCProductDesc() modpath = os.path.split(__file__)[0]
LPCBusSourcePath = os.path.join(modpath,"LPCBus")
@@ -16,88 +17,7 @@
return open(os.path.join(LPCBusSourcePath,fname)).read()
-product_descriptions = {
- ("On Board", "uC_OnBoard"),
- ("Devices", "uC_Devices")]
- ("Right", "SOM28_Right"),
- ("On Board", "SOM_OnBoard"),
- ("Devices", "SOM_Devices")]
- ("Right", "SOM28_Right"),
- ("On Board", "SOM_OnBoard"),
- ("Devices", "SOM_Devices")]
- ("On Board", "SOM_OnBoard"),
- ("Devices", "SOM_Devices")]
- ("Right", "SOM28_Right"),
- ("On Board", "SOM_OnBoard"),
- ("Devices", "SOM_Devices")]
- ("Right", "SOM28_Right"), #TODO check if True
- ("On Board", "SOM_OnBoard"),
- ("Devices", "SOM_Devices")]
- "header": "LHC2_GOT100",
- ("Right", "SOM28_Right"), #TODO check if True
- ("On Board", "SOM_OnBoard"),
- ("Devices", "SOM_Devices")]
- ("On Board", "SOM_OnBoard"),
- ("Devices", "SOM_Devices")]
- ("On Board", "SOM_OnBoard"),
- ("Devices", "SOM_Devices")]
- # "LDFLAGS": '"' + os.path.join(RightPath, "i2c_smt_lib.a") + '"',
- ("Right", "SOM6_Right"),
- ("On Board", "SOM_OnBoard"),
- ("Devices", "SOM_Devices")]
-product_desc = product_descriptions[product]
LOCATION_TYPES = {"I": LOCATION_VAR_INPUT,
"Q": LOCATION_VAR_OUTPUT,
"M": LOCATION_VAR_MEMORY}
--- a/LPCExtension.py Wed Oct 04 11:19:27 2023 +0200
+++ b/LPCExtension.py Wed Oct 04 11:20:43 2023 +0200
@@ -8,7 +8,7 @@
from POULibrary import SimplePOULibraryFactory
-from LPCArch import GetLPCProduct, GetLPCSOM, WX_GOT_modules, SOM28_modules, SOM6_modules, SVG_GOT_modules, GetLPCArch
+from LPCArch import GetLPCProduct, GetLPCSOM, WX_GOT_modules, SOM28_modules, SOM6_modules, SVG_GOT_modules, GetLPCArch, PREEMPTSOM6_modules # _lpcmanager_path, arch, etc are defined here because
# globals() of LPCManager.py are passed to extentions
@@ -78,7 +78,7 @@
# added for MM1 dev, TODO merge with SOM6
+ if product in PREEMPTSOM6_modules: --- a/LPCProjectController.py Wed Oct 04 11:19:27 2023 +0200
+++ b/LPCProjectController.py Wed Oct 04 11:20:43 2023 +0200
@@ -11,7 +11,7 @@
from HostFirmwareUpdater import HostFirmwareUpdater
from plcopen.types_enums import ComputeConfigurationResourceName
-from LPCArch import GetLPCProduct
+from LPCArch import GetLPCProductDesc @@ -155,7 +155,7 @@
ProjectController.LoadProject(self, ProjectPath, BuildPath)
- if GetLPCProduct() != "MM1":
+ if GetLPCProductDesc().get("CAN", True): canopen_child = self.GetChildByName("CanOpen")
if canopen_child is None:
canopen = self.CTNAddChild("CanOpen", "CanOpen", 0)