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.

C6678 JPEG Encoder problem

Other Parts Discussed in Thread: TMS320C6678

We tried to encode image using C66x_jpegenc_02_02_03_00_ELF on C6678 EVM (CCS Version: 5.2.1.00018) and got 2 problems:

1. We debug the program with emulator. We got a problem when loading the program after power on: for the first time we loaded the program, it never went into main(). However, after we reset the global environment, it worked. Every time we built the project and tried to load, we failed for the first time.

2. The similar problem happened after we burned the program into flash. It could boot from NOR flash but not for the first time after power on. Only after we did the soft reset, it could boot. And it cannot boot from NAND flash.

Before, we never encountered this problem when we didn't use C66x_jpegenc_02_02_03_00_ELF. It appeared after we used the encoder.

Do you have any idea to solve this?

Thank you in advance.

  • Welcome to the TI E2E forum. I hope you will find many good answers here and in the TI.com documents and in the TI Wiki Pages (for processor issues). Be sure to search those for helpful information and to browse for the questions others may have asked on similar topics (e2e.ti.com). Please read all the links below my signature.

    Please do not duplicate threads. I have deleted your other post. We will get back to you on the above query shortly. Thank you for your patience.

  • Hi Zhengyang, a couple of questions for better understanding your configuration and setlup
    - Are you using CCS TestAplication project which is included in Jpeg encoder package? (C66x_jpegenc_02_02_03_00_ELF\packages\ti\sdo\codecs\jpegenc\App\)
    - Are you using Shannon EVM + emulator?

    If above questions are yes, I just tried Jpeg encoder and it worked in my setup. So, I was wondering if in your case the board is not correctly initialized before running Jpeg encoder. For your reference, please take a look of tools versions I used and the steps I followed.

    Tools versions:
    BIOS_CG_ROOT= C:\TI\bios_6_33_06_50
    FRAMEWORK_ROOT= C:\TI\framework_components_3_23_02_16
    IPC_INSTALL_ROOT=C:\TI\ipc_1_24_03_32
    XDAIS_ROOT=C:\TI\xdais_7_23_00_06
    XDC_ROOT=C:\TI\xdctools_3_23_04_60
    CGT 7.4.0

    For running .out application:
    - Launch the target configuration
    - On Core 0: load the GEL file "<CCS_INSTALL_LOCATION>\ccsv5\ccs_base\emulation\boards\evmc6678l\gel\evmc6678l.gel" into CCS by selecting GEL Files under the Tools menu, and then select Load GEL.
    - Do system reset for Core 0 (via selecting Reset -> System Reset under the Target menu)
    - On Core 0, run the GEL file from the Scripts menu by selecting EVMC6678 Init Functions -> Global_Default_Setup. Wait until the following message is displayed: “C66xx_0: GEL Output: Global Default Setup... Done.”
    - Load the DSP image to Core 0 by selecting Load Program... under the Target menu.
    - Demo stops in main()
    - Run (F8)

    thank you,
    Paula
  • Hi Paula,

    Thank you for your quick reply. I'd like to make my problem more clear to you.

    1. We didn't use the CCS TestApplication project. We are using the JPEG Baseline Profile Encoder (v02.02.03) on C66x in our own project. But basically, we didn't change the main process -- Parameter Setup, Algorithm Instance Creation and Initialization, Process Call, Algorithm Instance Deletion. And we wrote our codes based on the TestApplication project. And besides the problem I mention below, it worked well.

    2. Yes, we'are using Shannon EVM + emulator,

    Tools versions are all the same. And we followed exactly the same 7 steps you offered.

    The problem is that when we did the 7 steps for the first time after power up, we got stuck in step 6 (Demo stops in main()). It didn't stop in main(). Then we restarted from step 3 (Do system reset for Core 0). It worked well and gave the right results.

    May I get some suggestions about how to fix it, like what might be the reason to such situation? I'm aware that it is not easy to solve the problem without actually reading our project. If you need, I could offer our codes.

    I really appreciate your help.

    Thanks,

    Zhengyang Wang

  • Hi Zhengyang, yes please send us your project so we can reproduce the issue.. one question, the first time you do "system reset" core0 address is 0x20B00000?

    I was checking other codecs .cfg files and I see some included xdc "startup" variable. Maybe it is something we could explore to add to your project. Below a couple of examples

    From Mpeg2vdecApp6678.cfg
    var Startup = xdc.useModule ("xdc.runtime.Startup");
    /* The following is for using BIOS IPC */
    /* specify startup first function that sets local MultiProc id */
    Startup.firstFxns.$add('&setLocalId');

    From h265vdec.cfg
    /* runtime startup module */
    var xdc_runtime_Startup = xdc.useModule('xdc.runtime.Startup');
    /* define startup reset function */
    xdc_runtime_Startup.resetFxn = "&startup_reset";

    Thank you,
    Paula
  • jpeg_multi_core_v1.rar

    Thanks, Paula. I've attached our project in this reply. Hope that we could figure it out.

    The purpose of our project is: Divide an image into 7 pieces and ask each core (0-6) to encode one piece (using OpenMP). Then we combine the pieces into the full image. We've checked that it works well. There might be some Chinese comments which you could ignore. They won't influence your understanding.

    For your question, I checked that after the first time I do "system reset", core0 address is 0x20B00000.

    And I tried to simply add what you pasted here to the .cfg file in our project, It didn't build successfully because undefined symbol setLocalId and startup_reset.

  • Hi Zhengyang, about XDC startup code I copied, it was just an example, the main idea is that you can add functions to init your board and call them before anything else runs. I found a page with a good explanation for your reference http://rtsc.eclipse.org/docs-tip/Using_xdc.runtime_Startup/TI 

    You can also select from were to run _c_int00, and example code below

    CCS command file example

    MEMORY
    {

        L2SRAM_BOOTCFG    (RWX) : org = 0x800000, len = 0x100
        MSMCSRAM1 (RWX) : org = 0xc000000, len = 0x100
        DDR3_MAILBOX_RESERVED (RW)   : org = 0x9FC00000, len = 0x8000

    }

     
    SECTIONS
    {
        .text_start > MSMCSRAM1
      {
        *(.text:_c_int00)
      }
        .boot_config > L2SRAM_BOOTCFG , type NOINIT
        .host2dspmailbox   >       DDR3_MAILBOX_RESERVED
        .dsp2hostmailbox   >       DDR3_MAILBOX_RESERVED
    }

    About your project, our codec experts are taking a look, they mentioned to me there were facing building errors. I was wondering if you could check that your project builds/runs on fresh setup, and if no, if you can help us to clean build errors. This sanity check in your side could help us to speed up debugging process..

    Thank you,

    Paula

  • Hi Paula. Sorry for the long delay and hope you had had a nice weekend.

    We've tried to solve the issue through xdc.runtime Startup but unfortunately made little progress.

    About our project, I'm sorry that I didn't provide all the information last time. I attach a new .rar file in this thread which includes all that you need to build the project.

    There're five pictures in it to help you check all the settings:

    Proj_info_1 & Proj_info_2 show the libraries with their versions we use, which are same as what TestAppEncoder uses. (Also note that we use the platform whose settings are shown in Proj_info_5) ;

    Proj_info_3 shows the device information, compiler version and output format;

    Proj_info_4 shows "#include search path";

    Proj_info_5 shows the platform settings. We use red rectangular to emphasize what we think important.

    With the updated project dir and platform dir, I believe the project would build/run well. 

    We really appreciate your help and patience!

    Sincerely,

    Zhengyang Wang

    7230.project.rar

  • Hi Zhengyang Wang,

    I am looking into this issue. Thanks for sharing the updated project.

    I have one quick question. As shown in the Proj_info_1 shared, I could not able to locate platform "omp_lwip_platform_master" at our end. Can please point us to that path? Also in Proj_info_5, Edit platform page2 of 2 was shared. Can you please share page 1of 2 ?

    Thanks,

    Praveen 

  • Hi Praveen,

    Thank you for your help. Here is the page1.

    I provided the platform directory in the .rar file. You could put it in the directory shown in page1.

    Thanks,

    Zhengyang Wang

  • Hi Zhengyang Wang,

    Thanks for sharing the requested information.

    We could not able to replicate the reported issue at our end.

    When we try to build the shared project as is we got couple build errors and after resolving those errors we could able to get the .out file.

    When we try to load the generated .out file on the C6678 EVM, it is going to infinite loop in IPC_attach() function and same is observed when we try to load multiple times.

    The below are the build errors we got while building the project as is,
    1) Buildfile generation error occurred..
    This project was created for a device-variant that is not currently recognized: TMS320C66XX.TMS320C6678. Please install the device-variant descriptor, or migrate the project to one of the supported device-variants by adjusting project properties.
    Build stopped..
    To remove this error: We have changed the Device variant type to - Generic C66x Device

    2)"../system/resourcemgr.c", line 797: error: argument of type "Cppi_GlobalConfigParams (*)[3]" is incompatible with parameter of type "Cppi_GlobalConfigParams *"
    To remove this error:
    result = Cppi_init (&cppiGblCfgParams);
    is changed to
    result = Cppi_init (&cppiGblCfgParams[0]);

    Can you please comment on our observations and help us to replicate the issue

    Thanks,
    Praveen