• AVR Freaks

Hot!MH3 fails to generate code

Author
M. G. Christensen
New Member
  • Total Posts : 5
  • Reward points : 0
  • Joined: 2011/10/19 00:29:00
  • Location: 0
  • Status: offline
2019/06/23 16:19:37 (permalink)
0

MH3 fails to generate code

PIC32MX270F256B, MPLABX v5.20, Harmony v3.3.0, Fedora Linux.  Using MPLABX I generate a new Harmony 3 project.  Using the MHC, I add FreeRTOS, Core, TIME, TMR2.  DFP and SYSTEM are already present.  I connect TMR2 TMR to TIME TMR.  This gives a "Satisfied Direct Capability" for TMR2, and a "Satisfied Direct Dependancy" for TIME TMR. There is no consumer defined for TIME SYS_TIME.  When I generate code, I get this error:
 
<Generate>[Info]: 
<Generate>[Info]: *** Generating Configuration ***
<Generate>[Info]:
<Generate>[Info]: Validating file list.
<Generate>[Info]: Processing file list.
<FreeMarker>[Error]: An exception was thrown while attempting to markup a template file: /home/m/Microchip-MPLAB-Harmony.github.io/core/system/time/templates/system/system_initialize_data.c.ftl
<FreeMarker>[Error]: freemarker.core.InvalidReferenceException: The following has evaluated to null or missing:
==> .vars["${SYS_TIME_PLIB?lower_case}"].COMPARE_SET_API_NAME [in template "system_initialize_data.c.ftl" at line 10, column 53]

----
Tip: It's the step after the last dot that caused this error, not those before it.
----
Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
----
Tip: It has been noticed that you are using ${...} as the sole content of a quoted string. That does nothing but forcably converts the value inside ${...} to string (as it inserts it into the enclosing string). If that's not what you meant, just remove the quotation marks, ${ and }; you don't need them. If you indeed wanted to convert to string, use myExpression?string instead.
----

----
FTL stack trace ("~" means nesting-related):
 - Failed at: ${.vars["${SYS_TIME_PLIB?lower_case}"... [in template "system_initialize_data.c.ftl" at line 10, column 51]
----
<FreeMarker>[Error]: - Failed at: ${.vars["${SYS_TIME_PLIB?lower_case}"... [in template "system_initialize_data.c.ftl" at line 10, column 51]
<Generate>[Info]: An exception occured during file preprocessing.
<MHC>[Info]: Stack trace filtered due to currently set log level. See "/home/m/.mh3/mhc.log" for full details.
<MHC>[Info]: To change log level filter see Tools->Options->Harmony in MPLABX
<Generate>[Error]: Aborting project generation. Your project has not been modified.

 
The log file included a java stack trace:
 
FTL stack trace ("~" means nesting-related):
 - Failed at: ${.vars["${SYS_TIME_PLIB?lower_case}"... [in template "system_initialize_data.c.ftl" at line 10, column 51]
----

Java stack trace (for programmers):
----
freemarker.core.InvalidReferenceException: [... Exception message was already printed; see it above ...]
 at freemarker.core.InvalidReferenceException.getInstance(InvalidReferenceException.java:131)
 at freemarker.core.EvalUtil.coerceModelToString(EvalUtil.java:355)
 at freemarker.core.Expression.evalAndCoerceToString(Expression.java:82)
 at freemarker.core.DollarVariable.accept(DollarVariable.java:41)
 at freemarker.core.Environment.visit(Environment.java:324)
 at freemarker.core.MixedContent.accept(MixedContent.java:54)
 at freemarker.core.Environment.visit(Environment.java:324)
 at freemarker.core.Environment.process(Environment.java:302)
 at freemarker.template.Template.process(Template.java:325)
 at com.microchip.mh3.markup.Freemarker.markupFile(Freemarker.java:68)
 at com.microchip.mh3.generate.GenerateCommon.preprocessFileToString(GenerateCommon.java:90)
 at com.microchip.mh3.generate.engine.mplabx.GenerateEngineMPLABX.generate(GenerateEngineMPLABX.java:114)
 at com.microchip.mh3.generate.Generate$2.run(Generate.java:335)
 at java.lang.Thread.run(Thread.java:748)
INFO [org.netbeans.ui.indexing]: Indexing finished, indexing took 26 ms.

 
Something is missing, Iam not sure what it is.
 
Anyone else encounter this?
 
 
#1

1 Reply Related Threads

    M. G. Christensen
    New Member
    • Total Posts : 5
    • Reward points : 0
    • Joined: 2011/10/19 00:29:00
    • Location: 0
    • Status: offline
    Re: MH3 fails to generate code 2019/06/24 20:50:15 (permalink)
    0
    Additional data:  I note that if I remove TMR2 from the project graph and insert the peripheral Core Timer, MH3 accepts that and generates code.'
     
    Isn't the core timer part of the MIPS CPUand not a peripheral?
     
    So, immediate problem solved but I have no idea why.
    #2
    Jump to:
    © 2019 APG vNext Commercial Version 4.5