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.

CCS program execute problem with OMAPL137/C6747

Hi  I am a newbie on DSP & CCS development.

Currently I am working at a project using CCS3 and OMAPL137.

I am writing a program which need to do a lot of floating point operation and may need a relatively large memory.

The board with OMAPL137 has 64M bytes SDRAM which is quite enough for my application.

Now the question is when I add one function call in my code the program or DSP halted.

and when I comment (delete) the function call the program runs well.

but the question is that the function just do nothing, it has only one line "return 1;"

I suspect if there is any limitation of the code size ?

I setup the stack size to 0x20000, it does not help.

I setup the mem-mode:data=far, it dose not help either.

sorry for my poor english.

your help is greatly appreciated!

Thank you!

hugo

  • Hello hugo,

    If I understand correctly, by adding an additional function call to your code (of which the function returns right away) it will somehow halt execution of the program? Where in the program are you halted? After returning from the function call?

    As for limitation on code size, if you are placing your code in a section defined too small in your linker command file, that could be a problem. But you would get a build error indicating this.

    It's hard to figure out the exact cause of this. A reproducable test case is definately the best way for us to investigate the issue if you can provide one.

    Thanks

    ki

  • Hello Ki

    Thanks for your quick reply :)

    Let me describe the problem in more detail.

    My program open uart1 and uart2 after start, then read and parse the data arrived. I use interrupt to handle uart data events including both sending and receiving.

    All runs pretty well. but when I just added some code or functions in one of my .c or .cpp files of my project. then it will crash or halt. 

    when halt is occured, I cannot catch up where is it. and the uart interrupt never occurs. the interrrup handler could not be called then. 

    I should emphasize that not the exact function (containing only "return 1;") cause this problem. but it is possible any more code complied into can cause this problem.

    Could you understand me? 

    If you cannot understand well, let me name another example:

    All runs pretty well, but program crash or halt when I just add one line code. Although the code is simply doing a addtion of two doubles.

     

    I suspect the CCS or DSP has messed up all my code ?  I used .c and .cpp mixed  and sometimes the local variable of some function might larger than 32K.

    I am very confused.

    Thank you again!

    Hugo

  • Hugo,

    I think I understand. Basically your application all works fine. But then when you add some more code to it (like a small function), it stops working.when you halt, looks like you are off in the weeds (some uninitialized memory or something). Pointer gets mangled or something. In cases like that, often there is something related to the code itself.

    It is hard for me to figure out what the cause is without some more details... there can be many potential issues. Basically I need some sort of test case where I can reproduce the issue. I don't know if it is possible for you to send me your environment.

    ki

  • Hello KI

    So I will try to crop my code as small as possible to make it feasible to send them to you ? :)

    BTW I am using CCS 3.3 with DSP/BIOS 5.41.

    And I have another problem with this development environment which I encountered long ago but found no why:

    When running my program, I mean I clicked F5 to starting running, the CCS quickly lose reponse in a few seconds if I open the RTS Message log windows.

    I am using LOG_printf to show some debug info.  but CCS works fine if I do open any other windows. such as cpu exectuion graph etc.

    I mean the CCS is completely dead, and I have to kill it by task manager, and then re-power on the DSP560 and the OMAPL137 board. and re-open CCS.

    If still there are some error remains, I even have to restart my computer.

    Is this normal ? what is the reason?

    Thank you!

    Hugo

     

  • sorry, I made a mistake in the previous post.

    should be as follow:

    I am using LOG_printf to show some debug info.  but CCS works fine if I do NOT open  any other windows. such as cpu exectuion graph etc.

  • another one hint:

    I am porting my program from windows to DSP.

    The program under windows have large amount of  new/delete or malloc operations.

    I changed all of these memory allocation operations into fixed size array.

    Best regards

    Hugo

  • you must be using DSP/BIOS.  Is your code being run in a TASK?  Make sure the heap size of your task is large enough.  Sounds like your stack is already big enough.  You can also use the kernel viewer to help diagnose the problem.  Build the largest code you can that will run and after it runs for a few seconds, halt and open the kernel viewer to make sure your not running out of memory anywhere.

    Mike

  • Hi, Yes I am using DSP/BIOS. My code is running in a TASK ( tsk_main)

    I do not use dynamic heap. and I set up a large stack in my .TCF configuration file.

    Mike, I followed what you suggested me to do . And I open kernel viewer when the program halted.

    I found the task stack of tsk_main is FULL!!!  It has only 0x400 size.

    Now I changed it to a really big value : 0x100000.

    ALL WORK FINE NOW :-)

    So the CCS allow every task has its own stack ?

    Thanks for all your kind help!

    Thank you KI! Thank you Mike!

    BTW: there is still one problem remains, when I open the Message log window, the CCS crashs in a few seconds. So I cannot use LOG_printf to print debug info. but I can see debug info through uart output.

    Hugo

  • zhangyg said:
    So the CCS allow every task has its own stack ?

    Yes, tasks do. SWI do not.

    zhangyg said:
    BTW: there is still one problem remains, when I open the Message log window, the CCS crashs in a few seconds. So I cannot use LOG_printf to print debug info. but I can see debug info through uart output.

    If CCS crashed, there may be a crash dump file. Can you attach it to this thread? See: http://tiexpressdsp.com/wiki/index.php?title=CCStudio_FAQ#Q:_What_are_these_.2A.dmp_files_generated_by_CCStudio_.282.30.2B.29.3F for where the crash dump file is.

  • Also please provide exact version of CCS and DSP/BIOS(5.41.xx.xx). Use 'Help->About...' menu in CCS to get this information.

    Thanks

    ki

     

     

     

  • Ki-Soo Lee said:

    If CCS crashed, there may be a crash dump file. Can you attach it to this thread? See: http://tiexpressdsp.com/wiki/index.php?title=CCStudio_FAQ#Q:_What_are_these_.2A.dmp_files_generated_by_CCStudio_.282.30.2B.29.3F for where the crash dump file is.

    Hi Ki

    I dont know how to attach a .dmp file into the thread ?

    where is the function ?

    thanks!

    Hugo

  • The function for attachments is available under the 'Options' section:

  • I have uploaded the dmp file

    thanks

    ccapp20100305014520.zip
  • Hi Lee

    Would please tell me what is the reason the CCS crashed if I open "Message/Log Window" while running my program?

     

    Your help would be greate appreciated!

    Thank you!

    Hugo

  • Hugo,

    I took a look your dump file. Other than that it did indeed crash in the log view, there is no other information to help us find the root cause. If you can provide the outfile to me, that would help a lot. Would that be possible?

    Thanks

    ki