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.

[MCSDK 2.x, 3.x] endianness support ?

Hello,

One of my customer wants to confirm endianness support for both MCSDK 2.x and MCSDK3.x.
They are considering to use either Keystone1 or Keystone2 with Big Endian.

The user guides say the following software components are supported with little endian only.
Please take a look at the latest version of MCSDK manuals:

MCSDK 2.1
BiosMulticoreSDK_2.1_UserGuide.pdf
- Platform Library
- Network Interface Management Unit
- OpenMP Run-Time Library
- Image processing Library
- Multicore System Analyzer

MCSDK 3.x
MCSDK_User_Guide.pdf
- Platform Library
- Network Interface Management Unit
- Image processing Library
- Multicore System Analyzer

For example, PDK for C66x (one of the components of MCSDK2.x for keystone1) shows :

As you see, there is no description about big endian.

Could you please let us confirm whether these software components really does not support big endian or not.
I looked over the directories under related software components and found the most software components have the big endian version of libraries (*.ae66e),
but I could not find the one for OpenMP.

Best Regards,
Naoki Kawada

  • Hi,
    I think, we might have tested with only little endian and uploaded the projects with little enidan support.

    Also I tried to run NDK client example code build with big endian support, its working with out any issues.
    I will also check with factory team for that.

    e2e.ti.com/.../441498
  • Hello Titus S.,

    Thank you for your reply and experiments about NDK with big-endian.
    Please check the supportability with your team for the software components.
    We are waiting for your reply.

    Best Regards,
    Naoki Kawada

  • Hi Naoki,

    By default, the software demos / examples of MCSDK, the mode of Endian used is little Endian.
    The user has an option to change the project properties to Big endian and try building it.

    Not sure whether all the examples work with a Mode Change directly as its dependencies such as libraries are also to be the same endian.. I mean, the libraries needs to be rebuilt with the same Endian mode.

    And also, make sure that the hardware setup is done correctly on the board to support appropriate Little/big endian.
    For example, the C6678 EVM has SW3 switch settings Pin 1 : value 0 - Little and value 1 - Big Endian.

    -----
  • Hi Shankari G,

    Thanks for your reply. 
    To summarize your answers, I understand users need to check by themselves if the samples provided by MCSDK work correctly with BigEndian mode.
    Correct ?

    In HW point of view, Keystone1/2 should support both endianess. And most software packages have prebuilt static libraries for both endianness.
    Can I understand users can have your supports (via E2E) if provided samples does not work with BigEndian mode ? 

    I think, the important software components for my customer are 
    - PDK (platform library and peripheral dirvers such like sRIO)
    - NDK 
    - IPC (MessageQ with QMSS Transport)
    As for NDK, it seems you have some experiments with BigEndian mode. And from my trial, IPC (MessageQ with QMSS Transport) looks working with BigEndian mode correctly on C6678 EVM.
    So how about PDK, especially sRIO driver ? If you have any experiments/suggestions/concerns, please let me know. 

    Best Regards,
    Naoki Kawada

  • Hi Naoki,

    Naoki said:
    understand users need to check by themselves if the samples provided by MCSDK work correctly with BigEndian mode.

    yes.

    Naoki said:
    In HW point of view, Keystone1/2 should support both endianess. And most software packages have prebuilt static libraries for both endianness.
    Can I understand users can have your supports (via E2E) if provided samples does not work with BigEndian mode ?

    Yes, exactly...

    Naoki said:
    So how about PDK, especially sRIO driver ? If you have any experiments/suggestions/concerns, please let me know.

    Get back or open up a new post for queries on SRIO driver. So far I don't think any body would of tried SRIO by changing to big endian mode.

    ---

  • Hello Shankari G ,

    Thanks for your answers. I understood. As for PDK, especially sRIO driver, I'll ask to the another thread.

    So last confirmation. As I mentioned, it seems there is no big-endian mode library in OpenMP software component. Can I understand TI does not support OpenMP runtime with Big-Endian ? I could not build OpenMP example project (omp_matvec) with big-endian mode -- I think It is a matter of course because big endian mode library is not existing in OMP package.

    Best Regards,
    Naoki Kawada

  • Hi Naoki,

    Thanks for suggesting my answer.

    When we build OpenMP project in big endian mode, it will throw some errors on incompatibility of its dependencies
    .
    For OpenMP, able to find the source code of sofware components at path "..\ti\imglib_c66x_3_1_1_0\components"
    This library is one of the dependencies for openMP. This library should be built in big endian mode and then build the openMP project.

    -----
  • Hi Shankari,

    Thanks for your quick response.

    I'm referring to OMP sample project, which is bundled in OMP package, and it can be automatically generated via CCS New Project.
    And here is a snip from its build properties:

    As you see, there is no dependency to imglib, right ?

    Next, I got some link errors when I built the project with Big-Endian mode. Please note I could build the project with little-endian mode successfully.

    undefined first referenced 
    symbol in file 
    --------- ---------------- 
    GOMP_barrier ./omp_matvec.obj 
    GOMP_critical_end ./omp_matvec.obj 
    GOMP_critical_start ./omp_matvec.obj 
    GOMP_parallel_end ./omp_matvec.obj 
    GOMP_parallel_start ./omp_matvec.obj 
    _system_pre_init C:\Users\139432\Desktop\openmp_test\omptest\Debug\configPkg\package\cfg\omp_config_pe66e.oe66e
    omp_get_num_threads ./omp_matvec.obj 
    omp_get_thread_num ./omp_matvec.obj 
    siu_ibl_download_core C:\Users\139432\Desktop\openmp_test\omptest\Debug\configPkg\package\cfg\omp_config_pe66e.oe66e
    ti_omp_utils_HeapOMP_Instance_init__F C:\Users\139432\Desktop\openmp_test\omptest\Debug\configPkg\package\cfg\omp_config_pe66e.oe66e
    ti_omp_utils_HeapOMP_alloc__E C:\Users\139432\Desktop\openmp_test\omptest\Debug\configPkg\package\cfg\omp_config_pe66e.oe66e
    ti_omp_utils_HeapOMP_free__E C:\Users\139432\Desktop\openmp_test\omptest\Debug\configPkg\package\cfg\omp_config_pe66e.oe66e
    ti_omp_utils_HeapOMP_getStats__E C:\Users\139432\Desktop\openmp_test\omptest\Debug\configPkg\package\cfg\omp_config_pe66e.oe66e
    ti_omp_utils_HeapOMP_isBlocking__F C:\Users\139432\Desktop\openmp_test\omptest\Debug\configPkg\package\cfg\omp_config_pe66e.oe66e
    ti_omp_utils_OpenMP_masterTask__I C:\Users\139432\Desktop\openmp_test\omptest\Debug\configPkg\package\cfg\omp_config_pe66e.oe66e
    ti_omp_utils_OpenMP_setProcId__I C:\Users\139432\Desktop\openmp_test\omptest\Debug\configPkg\package\cfg\omp_config_pe66e.oe66e
    ti_omp_utils_ThreadLocalStorage_createFxn__F C:\Users\139432\Desktop\openmp_test\omptest\Debug\configPkg\package\cfg\omp_config_pe66e.oe66e
    ti_omp_utils_ThreadLocalStorage_deleteFxn__F C:\Users\139432\Desktop\openmp_test\omptest\Debug\configPkg\package\cfg\omp_config_pe66e.oe66e
    ti_omp_utils_ThreadLocalStorage_registerFxn__F C:\Users\139432\Desktop\openmp_test\omptest\Debug\configPkg\package\cfg\omp_config_pe66e.oe66e
    ti_omp_utils_ThreadLocalStorage_switchFxn__F C:\Users\139432\Desktop\openmp_test\omptest\Debug\configPkg\package\cfg\omp_config_pe66e.oe66e
    ti_omp_utils_ThreadLocal_createFxn__F C:\Users\139432\Desktop\openmp_test\omptest\Debug\configPkg\package\cfg\omp_config_pe66e.oe66e
    ti_omp_utils_ThreadLocal_exitFxn__F C:\Users\139432\Desktop\openmp_test\omptest\Debug\configPkg\package\cfg\omp_config_pe66e.oe66e
    ti_omp_utils_ThreadLocal_registerFxn__F C:\Users\139432\Desktop\openmp_test\omptest\Debug\configPkg\package\cfg\omp_config_pe66e.oe66e

    Again, it looks there is no error related to imglib dependency and unresolved symbols of ti_omp_utils_XXXXX should be resolved by OMP runtime library.
    What I want to say is, these errors should be caused by the lack of OMP library for big-endian mode.
    In fact, I could not find any static library for big-endian in OMP package (*.ae66e).

    So my question in other words, there is no OMP library in OMP package (omp_1_02_00_05), how can we create big-endian library? or Can I understand TI does not support OMP with big-endian mode ?

    Best Regards,
    Naoki Kawada

  • Hi Naoki,

    The following are the steps.

    1. Import OpenMP project, change it to big endian mode and build. You will get errors something like below. This error is due to
    incompatibility of endian mode of IMGlib.

    fatal error #16001: object files have incompatible byte orderings
    ("C:/ti/imglib_c66x_3_1_1_0/lib/imglib.ae66<IMG_sobel_3x3_8.obj>" = little
    endian,
    "C:\ti\mcsdk_2_01_02_06\demos\image_processing\openmp\evmc6678l\Debug\config
    Pkg\package\cfg\image_processing_openmp_evmc6678l_pe66e.oe66e" = big
    endian)

    2. So, now to eradicate the error, import IMGLIB and change the project properties to big endian. Open up the makefile and do the following changes.

    Project path: C:\ti\imglib_c66x_3_1_1_0\lib

    Makefile path: C:\ti\imglib_c66x_3_1_1_0\packages\ti\imglib\makefile

    Ex:
    export CCSCGTVER ?= 7.4.4 # check out your version and change accordingly.
    export CCSV5_INSTALL_DIR ?= C:/ti/ccsv5 # check out the path and change accordingly.

    3. Now rebuild the IMGLIB.


    ------------------------------
  • Hi Shankari,

    Ok, you are using the demo project underlying C:\ti\mcsdk_2_01_02_06\demos\image_processing\openmp. I'm still wondering why you did not see any errors about the unresolved symbols related to OpenMP runtime with big-endian mode, but anyway, I'll try to build the demo project with big-endian and to see what happens. I'm off during the next week, so the update would be delayed.

    Best regards,
    Naoki Kawada

  • Hi Shankari,

    In the demo project you suggested, in fact, it is not required to rebuild imglib, but you can just specify big-endian library in the project properties.

    You can change library name from imglib.ae66 to imglib.ae66e, which is the image library for big endian mode, and you will pass the error related to the endianess, BUT after that, I saw the same error I reported, i.e., 

     undefined                                      first referenced                                                                                                                        
      symbol                                            in file                                                                                                                             
     ---------                                      ----------------                                                                                                                        
     GOMP_atomic_end                                ./src/mcip_process.obj                                                                                                                  
     GOMP_atomic_start                              ./src/mcip_process.obj                                                                                                                  
     GOMP_barrier                                   ./src/mcip_process.obj                                                                                                                  
     GOMP_parallel_end                              ./src/mcip_process.obj                                                                                                                  
     GOMP_parallel_start                            ./src/mcip_process.obj                                                                                                                  
     IMG_sobel_3x3_8                                ./src/mcip_core.obj                                                                                                                     
     IMG_thr_le2min_8                               ./src/mcip_core.obj                                                                                                                     
     _system_pre_init                               C:\ti\mcsdk_2_01_02_06\demos\image_processing\openmp\evmc6678l\Debug\configPkg\package\cfg\image_processing_openmp_evmc6678l_pe66e.oe66e
     omp_get_num_threads                            ./src/mcip_process.obj                                                                                                                  
     omp_get_thread_num                             ./src/mcip_process.obj                                                                                                                  
     siu_ibl_download_core                          C:\ti\mcsdk_2_01_02_06\demos\image_processing\openmp\evmc6678l\Debug\configPkg\package\cfg\image_processing_openmp_evmc6678l_pe66e.oe66e
     ti_omp_utils_HeapOMP_Instance_init__F          C:\ti\mcsdk_2_01_02_06\demos\image_processing\openmp\evmc6678l\Debug\configPkg\package\cfg\image_processing_openmp_evmc6678l_pe66e.oe66e
     ti_omp_utils_HeapOMP_alloc__E                  C:\ti\mcsdk_2_01_02_06\demos\image_processing\openmp\evmc6678l\Debug\configPkg\package\cfg\image_processing_openmp_evmc6678l_pe66e.oe66e
     ti_omp_utils_HeapOMP_free__E                   C:\ti\mcsdk_2_01_02_06\demos\image_processing\openmp\evmc6678l\Debug\configPkg\package\cfg\image_processing_openmp_evmc6678l_pe66e.oe66e
     ti_omp_utils_HeapOMP_getStats__E               C:\ti\mcsdk_2_01_02_06\demos\image_processing\openmp\evmc6678l\Debug\configPkg\package\cfg\image_processing_openmp_evmc6678l_pe66e.oe66e
     ti_omp_utils_HeapOMP_isBlocking__F             C:\ti\mcsdk_2_01_02_06\demos\image_processing\openmp\evmc6678l\Debug\configPkg\package\cfg\image_processing_openmp_evmc6678l_pe66e.oe66e
     ti_omp_utils_OpenMP_masterTask__I              C:\ti\mcsdk_2_01_02_06\demos\image_processing\openmp\evmc6678l\Debug\configPkg\package\cfg\image_processing_openmp_evmc6678l_pe66e.oe66e
     ti_omp_utils_OpenMP_setProcId__I               C:\ti\mcsdk_2_01_02_06\demos\image_processing\openmp\evmc6678l\Debug\configPkg\package\cfg\image_processing_openmp_evmc6678l_pe66e.oe66e
     ti_omp_utils_ThreadLocalStorage_createFxn__F   C:\ti\mcsdk_2_01_02_06\demos\image_processing\openmp\evmc6678l\Debug\configPkg\package\cfg\image_processing_openmp_evmc6678l_pe66e.oe66e
     ti_omp_utils_ThreadLocalStorage_deleteFxn__F   C:\ti\mcsdk_2_01_02_06\demos\image_processing\openmp\evmc6678l\Debug\configPkg\package\cfg\image_processing_openmp_evmc6678l_pe66e.oe66e
     ti_omp_utils_ThreadLocalStorage_registerFxn__F C:\ti\mcsdk_2_01_02_06\demos\image_processing\openmp\evmc6678l\Debug\configPkg\package\cfg\image_processing_openmp_evmc6678l_pe66e.oe66e
    
     ti_omp_utils_ThreadLocalStorage_switchFxn__F   C:\ti\mcsdk_2_01_02_06\demos\image_processing\openmp\evmc6678l\Debug\configPkg\package\cfg\image_processing_openmp_evmc6678l_pe66e.oe66e
    >> Compilation failure
     ti_omp_utils_ThreadLocal_createFxn__F          C:\ti\mcsdk_2_01_02_06\demos\image_processing\openmp\evmc6678l\Debug\configPkg\package\cfg\image_processing_openmp_evmc6678l_pe66e.oe66e
     ti_omp_utils_ThreadLocal_exitFxn__F            C:\ti\mcsdk_2_01_02_06\demos\image_processing\openmp\evmc6678l\Debug\configPkg\package\cfg\image_processing_openmp_evmc6678l_pe66e.oe66e
     ti_omp_utils_ThreadLocal_registerFxn__F        C:\ti\mcsdk_2_01_02_06\demos\image_processing\openmp\evmc6678l\Debug\configPkg\package\cfg\image_processing_openmp_evmc6678l_pe66e.oe66e

    So, I need to ask the same question again. What I want to say is, these errors should be caused by the lack of OMP library for big-endian mode. In fact, I could not find any static library for big-endian in OMP package (*.ae66e). So my question in other words, there is no OMP library in OMP package (omp_1_02_00_05), how can we create big-endian library? or Can I understand TI does not support OMP with big-endian mode ?

    Best Regards,
    Naoki Kawada

  • Hi,
    Naoki said:
    So, I need to ask the same question again. What I want to say is, these errors should be caused by the lack of OMP library for big-endian mode. In fact, I could not find any static library for big-endian in OMP package (*.ae66e). So my question in other words, there is no OMP library in OMP package (omp_1_02_00_05), how can we create big-endian library? or Can I understand TI does not support OMP with big-endian mode ?


    For big endian mode, there is no IMGLIB readily available. The user may have to build and get it. The source of IMGLIB is given in MCSDK.
    To build packages of MCSDK in big endian mode, follow this wiki, in which a sample example is taken and steps are given for building a project in big endian.

    processors.wiki.ti.com/.../BIOS_MCSDK_2.0_User_Guide


    --
  • Hello Shankari,

    I'm wondering if you could understand my question correctly... I'm not asking about IMGLIB at all. I'm asking OMP supportability for big-endian mode.

    Best Regards,
    Naoki Kawada

  • Hi Naoki,

    Naoki said:
    I'm wondering if you could understand my question correctly... I'm not asking about IMGLIB at all



    I hope, I can understand. As far as I know, IMGLIB is one of the dependencies for OMP. Since you said that you are getting errors even with the ready made big endian version of IMGLIB ( imglib.ae66), I asked you to re-build it witht the source provided. I hope it is clear for you now!!!..

    OMP_1_01_03_02 has little endian runtime supported only.

    From the OMP user guide, to rebuild the OMP runtime, the followings are required. It doesn’t seem to be a trivial effort to build big-endian OMP runtime.

    SYS/BIOS 6
    • XDCTools
    • IPC
    software-dl.ti.com/.../index.html
    • PDK, C667x MCSDK
    software-dl.ti.com/.../index_FDS.html

    -----
  • Hi Shankari,

    Thanks for your reply.
    As for the fact that TI would not provide ready made OMP library for big-endian, i understood. That is answer to my question.

    But still, I believe OMP runtime has no relationship to IMGLIB. I close the thread but let me explain a bit more (no need to reply).

    Why did you see IMGLIB errors during the build when using demo project bundled in MCSDK ? -- The answer should be the that... demo application (image processing demo) is just using IMGLIB API (for example, IMG_sobel_3x3_8 etc... ) to work with OMP runtime ,and the linker could not resolve any IMGLIB symbols from IMGLIB static library when using big-endian build option to the project. That is so natural -- because you did not use big-endian IMGLIB library during the build. Please note 
    - *.ae66 ==> That is little endian library.
    - *.ae66e ==> That is big endian library.

    So you needed to specify *.ae66e library,rather than *.ae66 when using big-endian build option. Please note *.ae66e is present in IMGLIB pacakge. So it should not be required for uses to rebuild IMGLIB library for big-endian mode. Using ready made big endian library, that's it!
    And now when we specify the build option to use big-endian IMGLIB, now some linker starts to raise some errors because the linker could not resolve the symbols related to OMP. This is also natural -- because OMP does not have ready made library for big-endian mode in OMP package.
    So I asked you the questions -- How can we rebuild the OMP static library for big-endian or Can we understand TI does not support OMP with big-endian mode....

    Another fact. As I mentioned in the previous post, I tried to build matrix application with OMP runtime, which CCS project could be generated automatically from OMP runtime package with CCS. Application is just doing matrix processing WITHOUT IMGLIB. This also proves that OMP does not relate to IMGLIB.  

    Best Regards,
    Naoki Kawada

  • Hi Naoki,

    Just to make the community members clear, repeating the answer here.

    OMP_1_01_03_02 has little endian runtime supported only.

    From the OMP user guide, to rebuild the OMP runtime, the followings are required. It doesn’t seem to be a trivial effort to build big-endian OMP runtime.

    SYS/BIOS 6

    • XDCTools

    • IPC

    software-dl.ti.com/.../index.html

    • PDK, C667x MCSDK

    software-dl.ti.com/.../index_FDS.html

    -----