You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Do not compile nonlinear/linear/mixed solvers unless the model uses
the solvers.
- Add support to compile a-files instead of so-files (--disable-shared
--enable-static).
- Added some preprocessor flags to disable more features in the run-time
(this should be improved; all logging functionality is included even
though the FMI runtime cannot access them, etc).
- Use global variables if pthreads is unavailable.
- Succesfully compiles to AVR CPUs now, but uses way too much SRAM to be
useful.
@@ -5505,7 +5521,7 @@ case SIMCODE(modelInfo=MODELINFO(__), makefileParams=MAKEFILE_PARAMS(__), simula
5505
5521
end match
5506
5522
case "gcc" then
5507
5523
match simCode
5508
-
case SIMCODE(modelInfo=MODELINFO(__), makefileParams=MAKEFILE_PARAMS(__), simulationSettingsOpt = sopt) then
5524
+
case SIMCODE(modelInfo=MODELINFO(varInfo=varInfo as VARINFO(__)), delayedExps=DELAYED_EXPRESSIONS(maxDelayedIndex=maxDelayedIndex), makefileParams=MAKEFILE_PARAMS(__), simulationSettingsOpt = sopt) then
5509
5525
let dirExtra = if modelInfo.directory then '-L"<%modelInfo.directory%>"' //else ""
5510
5526
let libsStr = (makefileParams.libs |> lib => lib ;separator=" ")
5511
5527
let libsPos1 = if not dirExtra then libsStr //else ""
@@ -5528,7 +5544,7 @@ case SIMCODE(modelInfo=MODELINFO(__), makefileParams=MAKEFILE_PARAMS(__), simula
5528
5544
DEBUG_FLAGS=<% if boolOr(acceptMetaModelicaGrammar(), Flags.isSet(Flags.GEN_DEBUG_SYMBOLS)) then "-O0 -g"%>
5529
5545
CFLAGS=$(CFLAGS_BASED_ON_INIT_FILE) $(DEBUG_FLAGS) <%makefileParams.cflags%> <%match sopt case SOME(s as SIMULATION_SETTINGS(__)) then '<%s.cflags%> ' /* From the simulate() command */%> <% if Flags.isSet(Flags.FMU_EXPERIMENTAL) then '-DFMU_EXPERIMENTAL' %>
5530
5546
<% if stringEq(Config.simCodeTarget(),"JavaScript") then 'OMC_EMCC_PRE_JS=<%makefileParams.omhome%>/lib/<%getTriple()%>/omc/emcc/pre.js<%\n%>'
5531
-
%>CPPFLAGS=<%makefileParams.includes ; separator=" "%> -I"<%makefileParams.omhome%>/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME<% if stringEq(Config.simCodeTarget(),"JavaScript") then " -DOMC_EMCC"%><% if Flags.isSet(Flags.OMC_RELOCATABLE_FUNCTIONS) then " -DOMC_GENERATE_RELOCATABLE_CODE"%>
5547
+
%>CPPFLAGS=<%makefileParams.includes ; separator=" "%> -I"<%makefileParams.omhome%>/include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME<% if stringEq(Config.simCodeTarget(),"JavaScript") then " -DOMC_EMCC"%><% if Flags.isSet(Flags.OMC_RELOCATABLE_FUNCTIONS) then " -DOMC_GENERATE_RELOCATABLE_CODE"%> -DOMC_MODEL_PREFIX=<%modelNamePrefix(simCode)%> -DOMC_NUM_MIXED_SYSTEMS=<%varInfo.numMixedSystems%> -DOMC_NUM_LINEAR_SYSTEMS=<%varInfo.numLinearSystems%> -DOMC_NUM_NONLINEAR_SYSTEMS=<%varInfo.numNonLinearSystems%> -DOMC_NDELAY_EXPRESSIONS=<%maxDelayedIndex%> -DOMC_NVAR_STRING=<%varInfo.numStringAlgVars%>
5532
5548
LDFLAGS=<%dirExtra%> <%
5533
5549
if stringEq(Config.simCodeTarget(),"JavaScript") then <<-L'<%makefileParams.omhome%>/lib/<%getTriple()%>/omc/emcc'-lblas-llapack-lexpat-lSimulationRuntimeC-sTOTAL_MEMORY=805306368-sOUTLINING_LIMIT=20000--pre-js$(OMC_EMCC_PRE_JS)>>
@@ -1184,7 +1191,7 @@ case SIMCODE(modelInfo=MODELINFO(__), makefileParams=MAKEFILE_PARAMS(__), simula
1184
1191
end match
1185
1192
case "gcc" then
1186
1193
match simCode
1187
-
case SIMCODE(modelInfo=MODELINFO(__), makefileParams=MAKEFILE_PARAMS(__), simulationSettingsOpt = sopt) then
1194
+
case SIMCODE(modelInfo=MODELINFO(varInfo=varInfo as VARINFO(__)), delayedExps=DELAYED_EXPRESSIONS(maxDelayedIndex=maxDelayedIndex), makefileParams=MAKEFILE_PARAMS(__), simulationSettingsOpt = sopt) then
1188
1195
let dirExtra = if modelInfo.directory then '-L"<%modelInfo.directory%>"' //else ""
1189
1196
let libsStr = (makefileParams.libs |> lib => lib ;separator=" ")
1190
1197
let libsPos1 = if not dirExtra then libsStr //else ""
@@ -1198,6 +1205,7 @@ case SIMCODE(modelInfo=MODELINFO(__), makefileParams=MAKEFILE_PARAMS(__), simula
1198
1205
<<
1199
1206
# Makefile generated by OpenModelica
1200
1207
CC=@CC@
1208
+
AR=@AR@
1201
1209
CFLAGS=@CFLAGS@
1202
1210
LD=$(CC) -shared
1203
1211
LDFLAGS=@LDFLAGS@ @LIBS@
@@ -1207,7 +1215,13 @@ case SIMCODE(modelInfo=MODELINFO(__), makefileParams=MAKEFILE_PARAMS(__), simula
1207
1215
FMIPLATFORM=@FMIPLATFORM@
1208
1216
# Note: Simulation of the fmu with dymola does not work with -finline-small-functions (enabled by most optimization levels)
1209
1217
CPPFLAGS=@CPPFLAGS@
1210
-
override CPPFLAGS += -Iinclude/ -Iinclude/fmi<%if isFMIVersion20(FMUVersion) then "2" else "1"%> -I. <%makefileParams.includes ; separator=" "%> <% if Flags.isSet(Flags.FMU_EXPERIMENTAL) then '-DFMU_EXPERIMENTAL'%>
0 commit comments