This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Compiler/TMS570LS3137-EP: Link Problem with HALCoGen Generated FreeRTOS

Part Number: TMS570LS3137-EP
Other Parts Discussed in Thread: HALCOGEN

Tool/software: TI C/C++ Compiler

Hello,

I've created a FreeRTOS project with HALCoGen 04.07.00 and CCS 7.1.0.00016.  Without adding any of my own source code/files, the project successfully compiles.  The problem is that whenever I add any FreeRTOS calls, I get linker errors saying the symbols are unresolved.  Does the linker need to be configured for FreeRTOS, not sure how to procedede

  • I was able to build the example FreeRTOS project with no issues, but have no more experience than that. The HALCoGen
    Help->Help Topics->FreeRTOS page points to this link: www.freertos.org/FreeRTOS-quick-start-guide.html
  • Thanks for the reply.

    That link isn't really relevant, I'm not looking for help on how to "use" FreeRTOS, or building FreeRTOS from the source available on FreeRTOS.org, or doing my own port.  I'm trying to figure out why I get linker errors whenever I try to add FreeRTOS calls in my project that was generated using the latest version of HALCoGen (currently 04.07.00).  Also, all the HACoGen generated FreeRTOS source files do compile without error, and if I don't make any FreeRTOS calls in my program, it compiles fine, but as soon as I add any FreeRTOS function call, the linker can't seem to resolve it.  If I re-create my project the exact same way using HALCoGen version 04.05.01 to generate the files everything works fine.

    Which demo project are you referring to? One of the TI examples? which tools/version are you using?

  • Could you please share the linker errors.
    If I send you a CCS Sample project using HALCoGen 4.07.00 with FreeRTOS, will that help?
  • I'll take a sample project if you have one.  Here is the linker error:

    error #10234-D: unresolved symbols remain
    error #10010: errors encountered during linking; "FreeRTOStest.out" not built

    Description Resource Path Location Type
    unresolved symbol xQueueCreateMutexStatic, first referenced in ./source/os_mpu_wrappers.obj FreeRTOStest C/C++ Problem

    Here is the sys_main.c source

    SemaphoreHandle_t test_Mutex;
    
    int main(void)
    {
    /* USER CODE BEGIN (3) */
    
        // Create a mutex
        test_Mutex = xSemaphoreCreateMutex();
    
    /* USER CODE END */
    
        return 0;
    }

  • Are you enable gcc?
  • No I don't believe I had gcc extensions enabled, I looked in the area that the HALCoGen help tells you to enable gcc "CCS project (Project properties -> Build -> ARM Compiler -> Advanced options -> Language options -> Enable support for gcc extensions)" but I don't see anywhere to enable the option in there.  I tried manual adding the flag using the "Edit Flags..." feature in the (Project properties -> Build -> ARM Compiler) section, which seems to have worked, but the link error still remains.

  • Hi Michael,

    This is a known issue in HALCoGen. We have already raised a ticket on the same. The fix would be part of the next release.

    As a workaround, please use the attached file and replace the mpu_wrapper.c file present in HALCoGen\drivers\FreeRTOS\portable\CCS\Cortex-R47450.mpu_wrappers.c

    Thanks and Regards,

    Veena