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/TMS320F28388D: Regarding "__byte_peripheral_32" error while compiling F28388D CAN driver from the c2000 example on CCS 18.1.3 LTS with CCS1010

Part Number: TMS320F28388D
Other Parts Discussed in Thread: C2000WARE, CCSTUDIO

Tool/software: Code Composer Studio

Hi,

      We are trying to test the CAN driver of F28388D. While compiling with our testing tool using CCS 18.1.3 LTS compiler, we are getting below compilations issues:

                                                                "Illegal use of intrinsic:__byte_peripheral_32 "

      But the above mentioned error is not seen by our development team when compiling the same CAN driver of F28388D on CCS 1010 using CCS 18.1.3 LTS.

      We are using the same compilation flags as Design team, but we are getting the above mentioned error when used with our testing tool for this CAN driver .

     Please help in resolving this issue. If needed we can have WEBEX call.  This is a road blocker for us in Testing this CAN driver. Any help in this regard is much appreciated.

Thank You,

Golivi Suresh Kumar

  • Golivi,

    This issue sent to the tools team to take a look at.  Could you let me know which CAN driver example is showing this issue.

    I found a bunch of different ones.

    I have installed the 18.1.3 and I am working through building all of them but if you could point be to the one you are seeing the issue with that would help.

    Also what verison of C2000Ware are you using?  For me these examples are setup to use ELF which is not supported in 18.1.3.

    Regards,

    John

  • Golivi,

    I think you are attempting to use EABI with the 18.1.3 compiler.  Please note that this is not a documented or supported feature in this toolchain.  It should not be used to compile your application.  Please use a newer compiler where this feature is documented and supported such as 20.2.x LTS.

    Regards,

    John

  • Update: Customer is facing the issue with 20.x compiler as well.  

    Suresh,

    I assigned this thread to our CAN driver expert to help you further.

    Thanks and regards,
    Vamsi

  • This is not a compiler error. Eclipse bundles in static analyzer and sometimes it has difficulty resolving/finding definitions.

    You can either:

    1. delete the workspace and let the eclipse recreate it again (it does not help 100%)

    2. turn off the analyzer (Window/Preferences/"C/C++"/Code Analysis

  • As Mitja has correctly pointed out.

    Can you share what all are enabled in code analysis of CCS. Window -> preferences (Advanced Settings) -> C/C++ -> Code Analysis.

    Is the “Function cannot be resolved” Checked? If yes please uncheck and build it again. 

    __byte_peripheral_32 is compiler intrinsic to access data from byte peripheral and is not defined in C2000Ware . So Code analysis tool will not be able to locate the function definition resulting an error. 

    CAN is a byte peripheral. On the C2000, operations on 32-bit data are often broken up into two operations on 16-bit data because these are more efficient on the architecture. Accesses to 32-bit byte peripheral data cannot be broken up regularly into two 16-bit accesses because the starting offset for the second 16-bits will be incorrect. The __byte_peripheral_32 intrinsic can be used to access a 32-bit byte peripheral data address, preventing these accesses from being broken up.

    You can find more information on compiler intrinsic in the following document. https://www.ti.com/lit/ug/spru514v/spru514v.pdf

    Regards,

    Yashwant

     

  • Code Analysis is disabled in CCS by default.  There is more information on how to turn it off here.  As well as how to distinguish if the error is coming from the compiler or the code analysis tool.

    https://software-dl.ti.com/ccs/esd/documents/users_guide/ccs_project-management.html#code-analysis

  • Hi Mitja/ Yashwant ,

                          This issue  of  Illegal use of intrinsic:__byte_peripheral_32  is  observed when  we are doing the Unit testing of  Can driver compiled through Command line along with our VectorCAST test harness. It is not from CCS 1010 IDE.  

    The command we are using for compiling  is as shown below: 

     cl2000 -v28 -ml -mt --float_support=fpu32 -Ooff --include_path="C:/ti/ccs1010/ccs/tools/compiler/ti-cgt-c2000_18.12.0.LTS/include" --advice:performance=all -g --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --preproc_with_compile --abi=eabi

     

    Could you please help like what extra flags I need to set here in the above compiler command, so that it will  not throw that intrinsic error?

    I do not know how to set the unchecking of  "Function cannot be resolved"  through Command line.  Please guide me.

    We are facing this issue while testing  other source files also in our program where ever this bp_16 and bp_32 are used with the below type def

    typedef unsigned int bp_16 __attribute__((byte_peripheral));;
    typedef unsigned long bp_32 __attribute__((byte_peripheral));;

    Regards,

    Golivi Suresh.

  • Suresh,

    We are using the same command line with same flags which you have posted in the previously reply and a CAN example builds without error. It looks like the test tool which does code analysis has the issue.

    Regards,

    Yashwant

  • Are you really invoking the compiler from command line, or are you just running CCS from command line (e.g. C:\ti\ccs1011\ccs\eclipse\eclipsec.exe" -noSplash -data "Workspace_folder" -application com.ti.ccstudio.apps.projectBuild -ccs.projects Project_name -ccs.configuration Release)?