Commit 98579be7 authored by Michael Büsch's avatar Michael Büsch

Load library code before user code

The user code might create instance-DBs for lib-FBs.
So libs must be loaded first.
Signed-off-by: Michael Büsch's avatarMichael Buesch <m@bues.ch>
parent aed8d2ef
......@@ -205,10 +205,10 @@ def run(inputFile):
writeStdout("Initializing CPU...\n")
for symTable in symTables:
s.loadSymbolTable(symTable)
for parseTree in parseTrees:
s.load(parseTree)
for libSel in project.getLibSelections():
s.loadLibraryBlock(libSel)
for parseTree in parseTrees:
s.load(parseTree)
s.startup()
writeStdout("[Initialization finished - CPU is executing user code]\n")
try:
......@@ -303,10 +303,10 @@ def runWithServerBackend(inputFile):
writeStdout("Initializing CPU...\n")
for symTabSrc in project.getSymTabSources():
client.loadSymbolTable(symTabSrc)
for awlSrc in project.getAwlSources():
client.loadCode(awlSrc)
for libSel in project.getLibSelections():
client.loadLibraryBlock(libSel)
for awlSrc in project.getAwlSources():
client.loadCode(awlSrc)
client.setRunState(True)
# Run the client-side event loop
......
......@@ -278,10 +278,10 @@ class CpuWidget(QWidget):
client.loadHardwareModule("dummy")
for symTabSource in symTabSources:
client.loadSymbolTable(symTabSource)
for awlSource in awlSources:
client.loadCode(awlSource)
for libSel in libSelections:
client.loadLibraryBlock(libSel)
for awlSource in awlSources:
client.loadCode(awlSource)
client.setRunState(True)
except AwlParserError as e:
self.__setState(self.STATE_EXCEPTION)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment