• AVR Freaks

Hot!Unable to include FREERTOS in Harmony configuration

Author
Maldus
Starting Member
  • Total Posts : 50
  • Reward points : 0
  • Joined: 2016/08/17 09:55:57
  • Location: 0
  • Status: offline
2019/05/06 05:11:23 (permalink)
0

Unable to include FREERTOS in Harmony configuration

Hello everyone,
I'm starting to experiment on a PIC32MZ starter kit. For now I would just like to blink an LED but using FREERTOS instead of going bare metal.
Apparently the task is too complicated for Harmony and MPLAB. I am running on a fresh install of both MPLAB X (v5.15) and Harmony Configuratior 3. I installed all the required frameworks (I believe), and added the FREERTOS component to the project graph. When I click on generate code, however, I am met with the following error:
 

<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: C:\Users\Maldus\HarmonyFramework\core\templates\system\system_rtos_definitions.h.ftl
<FreeMarker>[Error]: freemarker.core.InvalidReferenceException: The following has evaluated to null or missing:
==> HarmonyCore  [in template "system_rtos_definitions.h.ftl" at line 1, column 6]

----
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)??
----

----
FTL stack trace ("~" means nesting-related):
    - Failed at: #if HarmonyCore.SELECT_RTOS == "FreeR...  [in template "system_rtos_definitions.h.ftl" at line 1, column 1]
----
<FreeMarker>[Error]:     - Failed at: #if HarmonyCore.SELECT_RTOS == "FreeR...  [in template "system_rtos_definitions.h.ftl" at line 1, column 1]
<Generate>[Info]: An exception occured during file preprocessing.
<MHC>[Info]: Stack trace filtered due to currently set log level.  See "C:\Users\Maldus\.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.

 
I have no idea how to read it, since it seems to refer to a missing "HarmonyCore" definition. The code is correctly generated if I remove the FREERTOS component.
What am I missing?
#1

3 Replies Related Threads

    qhb
    Superb Member
    • Total Posts : 9998
    • Reward points : 0
    • Joined: 2016/06/05 14:55:32
    • Location: One step ahead...
    • Status: offline
    Re: Unable to include FREERTOS in Harmony configuration 2019/05/06 06:17:02 (permalink)
    0
    Can't help with your error, but I'm curious about your comment:
    "For now I would just like to blink an LED but using FREERTOS instead of going bare metal."
    I would hardly call using Harmony as "going bare metal".
    Why not get a simple Harmony project (like your "flash an LED") working first, before getting fancy and squeezing in FREERTOS as well?
     

    Nearly there...
    #2
    Maldus
    Starting Member
    • Total Posts : 50
    • Reward points : 0
    • Joined: 2016/08/17 09:55:57
    • Location: 0
    • Status: offline
    Re: Unable to include FREERTOS in Harmony configuration 2019/05/06 06:35:53 (permalink)
    0
    I am not exactly sure what Harmony is yet; my best guess is some more advanced version of MCC, is it close enough?
    In that case, considering I have only used it to configure the System Clock I am fairly confident in calling it "bare metal". Going any lower would just mean writing a linker script and implementing my own exception vector, something I see no reason to do.
    Regardless, I have already succeeded in blinking an LED without using FreeRTOS. Thank you anyway for assuming my ignorance while boasting around yours.
     
    In the meantime I more or less figured out the problem: the FreeRTOS component was complaining the lack of "HarmonyCore", which I can only guess is some component at the same time "core" but not important enough to be included by default. After finding it among the other components in the GUI and adding it it worked. The the fact that most of Harmony documentation refers to old versions with a completely different GUI structure and the raw error report didn't help me in finding it out.
    post edited by Maldus - 2019/05/06 06:50:09
    #3
    Deenayd
    Super Member
    • Total Posts : 905
    • Reward points : 0
    • Joined: 2004/09/08 06:15:13
    • Location: Poland
    • Status: offline
    Re: Unable to include FREERTOS in Harmony configuration 2019/05/09 05:38:30 (permalink)
    0
    Not sure if it's related to your problem but in my HarmonyFramework folder, folder CMSIS-FreeRTOS only contains .git subfolder. Looks like .pack file was not unpacked after downloading. I guess it would cause problems when trying to compile with FreeRTOS.

    Slawek Piotrowski
    Rejestracja Czasu Pracy Ewidencja Czasu Pracy
    #4
    Jump to:
    © 2019 APG vNext Commercial Version 4.5