CCES:2.9.2 - "error: function call is not allowed in a constant expression"


We are using ADSP21569 for our application programming and IDE version are mentioned below,


Version : 2.9.2.

In that while doing link port operation, we are registering callback with the function adi_linkport_RegisterCallback() which gives the following error,

cc0059:  error: function call is not allowed in a constant expression

Kindly provide feedback to proceed further.....

Thanks in advance,


  • 0
    •  Analog Employees 
    on Jul 13, 2021 1:56 PM

    Hi Vignesh,

    We have tried to simulate your issue with our example BSP project, But we didn't see any issues with our example code.

    As you are facing "cc0059 error", which indicates a function call has appeared within a constant expressions. Could you please check in your application whether functions are called in constant expression. If so, to rectify this error, please make sure Function calls are not allowed in constant expressions. Therefore, either make the expression non-constant or do not use a function call in it.

    Please refer the "Linkport" example from ADSP-21569 BSP installation path. You can refer and modify the example based on your requirement.

    You can download and install ADSP-21569 BSP from the link:

    After the installation, you can find the Linkport examples from the below path and also we recommend to refer Readme file available inside the each of the example projects to know more details about specific examples of the BSP.
    <Installation>\Analog Devices\ADSP-2156x_EZ-KIT-Rel1.0.1\ADSP-2156x_EZ-KIT\Examples\drivers\linkport

    Can you please confirm whether you are using the same example code. If you are using your own application, please share the project which replicates this issue with steps to reproduce. So that we can assist you better.


  • Hello santha,

    Thanks for your reply,

    Have tried with the link that you have provided in the reply, seems to be working fine.



Reply Children
No Data