Getting Parameter mismatch error while running Poly space

1 view (last 30 days)
I am using a PolySpace R2021b to get static analysis of our project in which we are using TI c2000 (C2000Ware_4_00_00_00) based TMS320F280025C controller.
While we try to build our code in Polysapce, We are getting error as below,
declaration is incompatible with "long __euclidean_div_i32byu32(long, unsigned long, unsigned long)" (declared at line 33 of "C:\Program Files\Polyspace\R2021b\polyspace\verifier\extensions\ti\tmw_builtins\c28x.h") __euclidean_div_i32byu32(long numerator, unsigned long denominator); "(declared at C:\ti\ccs1040\ccs\tools\compiler\ti-cgt-c2000_20.2.5.LTS\include\stdlib.h)"
It seems stdlib.h of location(C:\ti\ccs1040\ccs\tools\compiler\ti-cgt-c2000_20.2.5.LTS\include\stdlib.h) conatins two parameter(long numerator, unsigned long denominator) for that function and c28x.h of location("C:\Program Files\Polyspace\R2021b\polyspace\verifier\extensions\ti\tmw_builtins\c28x.h") contains three paramter (long, unsigned long, unsigned long) for that function. Due to this my polyspace is unable to build completely and it is stuck.

Answers (1)

Arka
Arka on 9 Aug 2023
Hi Sakshi,
From what I understand, there is a conflict in the definition of the function in the two header files mentioned in the error.
I would advise you to change the definition of the function inside the file c28x.h to match it with the definition of the file stdlib.h. This will help you in resolving the error.
Thanks.
  2 Comments
Sakshi Vaidya
Sakshi Vaidya on 14 Aug 2023
Hi Arka,
The C28x.h is polyspace intalled file. Can we do changes in that file? I tried resolving in this way but it didn't work.
We noticed that, this function definition is bypassed with some "if condition" in Polyspace R2022b and also not present in R2019b version. It is only present in file of C28x.h file of Polyspace R2021b.
Arka
Arka on 17 Aug 2023
Hi Sakshi,
Try re-opening Polyspace after making the changes. It should then load the new version of c28x.h, and your analysis should work.
You can change the c28x.h file in R2021b to look like the c28x.h file in R2022b. The snippet of the code from the file c28x.h from R2022b is attached below.
Thanks.

Sign in to comment.

Categories

Find more on Troubleshooting in Polyspace Products for Ada in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!