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.

sys_link errors led by different versions of HCG

Other Parts Discussed in Thread: TMS570LS3137, HALCOGEN

Hi,

I'm using the project downloaded from the forum, may be at that time(the project created) the HCG was not perfect, when I open the HCG file of the project in HCG 03.05.01 and click "Generate Codes" without any modifying, then complie the updated project, errors occures.

Besides some of the define errors, there are some errors just like below:

I noticed the sys_link file has changed a lot , some kernel descriptions has occured.I changed the new sys_link file to the old one ,but it doesn't work. Besides, the new project have a sys_vim.c file added compared to the old ones.

How can I use  the HAL3.05.01 to add some new functions to the old project?

2477.lwip_FreeRTOS_TMS570LS3137_HDK.rar

The attach files is the old project and the updated project.

Look for your answers.

Regards,

yong

  • Hello Yong,

    we are able to see some mistakes with the linker file, where two sections named Kernel and Flash0 are over lapping, apart from that both the functions which are missing belong to FreeRTOS(both the projects use a different version of FreeRTOS).

    One of our halcogen experts will get back to you on this with the recommended usage.

    BestRegards,

    Karthik.

  • Hi Yong,

    You are correct , HALCoGen version 3.05.00 has FreeRTOS V7.4.0 port with User Mode and MPU support. This requires clear memory segmentation hence linker command file was changed. Also there are bunch of other minor things you must take care to avoid compile error as per the HALCoGen project ( LWIP_03_05_01) file in the attached zip folder.

    Any project created on 3.05.xx will not have any issue you mentioned above. Sorry, Since your project was created on 3.03.00 which did not have this feature you must redo certain configurations.

    To help you I have taken your 3.03.00 HALCoGen project, looked at the configurations you made and converted it to 03.05.x project. Please find the attached Zip file. 0636.LWIP_03_05_01.zip

    Regards
    Prathap

  • Hi, Prathap

    Thanks very much for your help, but it seems the FreeRTOS cannot work correctly, the task1 cannot be created and operated as usual. Can you help me find why is that?

    Regards,

    yong

  • Hi Yong,

    I think the taks is created with user proviledge only. And you are trying to do EMAC init insde the task, hence it will not work.

    To run task in previledge state

    Replace    

    if (xTaskCreate(vTask1, (const signed char *)"Task1", 0x800, NULL, 1, &xTask1Handle) != pdTRUE)

    with  

    if (xTaskCreate(vTask1, (const signed char *)"Task1", 0x800, NULL, (1|portPRIVILEGE_BIT), &xTask1Handle) != pdTRUE)

    Regards
    Prathap

     

  • I have tried the way you mentioned above, but it's still not creating the task. When I change the stack size 0x800 to 0x700, the task can be created, but after the function vTaskStartScheduler();  the tasks were not operated once. The strange is when you creat one task only, it can enter the task(but in the task1, the scilinreg flg is always in busy mode).I wondered so much about that. 

    Would you have some suggestions to solve the problem?

  • Hi Yong,

    The Total stack used for Task1, Task2 and some used by OS must be well within limit "configTOTAL_HEAP_SIZE" which is configured via HALCoGen GUI.

    My suggestion

    1) If you really need a stack of 0x800 size ( interms of Words) , Increase configTOTAL_HEAP_SIZE ( This is interms of Char) in FreeRTOSConfig.h ( either using the HALCoGen GUI or Manually edit).

    or

    2) Try reducing the Task1 stack size further ( Say 0x400).. I am not sure how much is used.  

    Regards
    Prathap

  • Thanks so much for your professional advice, you help me a lot. Thank you!

    Regards,

    yong

  • Sorry to trobule you again, now the task1 and task2 can enter, but the EMAC init seems not work correctly in task1, after the function" hdkif_link_setup" is OK , the D1 LED on the tms570hdk turn to red. It indicates the nERROR happens about the TMS570. Does it means that errors about the memory space occur? How can I fix that?

    Regards,

    yong

  • I solve the problem, the vim RAM need to be fixed, 77 EMACCoreTxIsr and 79 EMACCoreTxIsr must be added, now the project works correct. Thank you very much!

    Regards,

    yong

  • Hi,
    I want to know how the attached project will be converted to Halcogen 4.05.01 ?..I want to do UDP communication with Free RTos. Please help me through this.