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.

why does Log_info() API call make this code run continuously?

Other Parts Discussed in Thread: SYSBIOS

Hi,TI expert!

I encounter a strange case,if I cancel red  comments, and add log_info call, the code is working continuously. and the raw log can be displayed if I stop the emulator.

   

But if I comment Log_info call, build  and download again, when I stop emulator, raw log only display several log info, and resume the code and stop again, the raw log cannot be refreshed and also HvState:78 is error.

it seems the code is halted. it stops at Clock.c and cannot return. but in my project. I don't use Clock thread at all.

In fact, I encounter this error at first, I see HvState value 78 is error, so I add log_info1 call after 

  Ret = Mailbox_pend(MainTaskMBX,&Msg, MAIN_TASK_TIMEOUT);//BIOS_WAIT_FOREVER

and run again. ahahahahah. it is working fine, Hvstate value is OK ,and the code also can work continuously.

I don't know why this log_info call can solve this problem. so I attach my project(F28069 based). this code don't need any special device, just a bare F28069 board. it is very easy to test this code on any F28069 board. all threads are created statically.

CCS5.3 and CCS5.4

SYS BIOS 6.34.2.18

XDCTools 3.24.6.63

5226.My code.zip

  • Any TI Expert can test this code and give me some proposal?

    I know there must be some wrong usage in my code.

    Thanks!

  • Hi,

    I ran your program on my F28069 but did not see what you are seeing.  I only see 5 records printed in the Raw Logs and it stays that way.  I don't get anymore logs printed after the 5.

    Judah

  • Hi,judahvang !

    Thank your reply. I also get the same screen as you if log_info is commented by //. it will jump into Clock.c(SYS BIOS Clock module)and cannot return again.

     But if you un-comment the log_info after Mailbox_pend(), the code is running continuously and seems OK.

    Do you un-comment this red code?

    Thanks.

  • I took your attach project.  It looked like the code was uncommented already?

    I tried rebuidling but it didn't work for me.  Can you tell me what version of CCS, SYSBIOS, XDCTOOLS you use?  I can give it another shot if I know what your setup is.  Or maybe attach a version that is running vs not-running here.

    Judah

  • About CCS ,SYS BIOS version .See previous message.

    CCS5.3 CCS5.4 also have same issue.

    Maybe you can re-configure include and path setting. and make rebuild. it shall be OK.

    Thanks for your help.

      

  • Decai,

    I tried rebuilding with the new include paths but there were build errors. The following is a snippet of error messages:

    "<PATH>/workspace_v5_4/HVGP_FRAMEWORK/HVGP_F28069/include/F2806x_Gpio.h", line 23: error #20: identifier "Uint16" is undefined
    "<PATH>/workspace_v5_4/HVGP_FRAMEWORK/HVGP_F28069/include/F2806x_Gpio.h", line 24: error #20: identifier "Uint16" is undefined
    "<PATH>/workspace_v5_4/HVGP_FRAMEWORK/HVGP_F28069/include/F2806x_Gpio.h", line 25: error #20: identifier "Uint16" is undefined
    "<PATH>/workspace_v5_4/HVGP_FRAMEWORK/HVGP_F28069/include/F2806x_Gpio.h", line 26: error #20: identifier "Uint16" is undefined
    "<PATH>/workspace_v5_4/HVGP_FRAMEWORK/HVGP_F28069/include/F2806x_Gpio.h", line 30: error #20: identifier "Uint32" is undefined

    Are there some other settings that I am missing?

    Can you give us the latest build-able version of your project? Also, please list out the extra steps (if any) needed to build the project.

    Thanks,

    Vikram

  • Uint32,Uint16 is defined in std.h

    this is xdc runtime include file, it doesn't need any special setting. 

    and allF28069  *.h files are copied from TI examples. 

    Maybe you can add the following into F2806x_Gpio.h

    #include <xdc/std.h>

  • There are still build issues after making the changes as per your suggestion. Please send us a build-able project with all the necessary set-up steps to build the project.

    Vikram