How do I deal with arithmetic addressing when using "iar" or "keil" dialects in PolySpace (R2008a)?

2 views (last 30 days)
I have C code with bit keyword and absolute addressing using "@" or "=" (both of which are used by a compiler/processor specific header file to declare special function registers etc.)
Setting the "-dialect" option to "iar" or "keil" deals with the bit keyword and some of the "@" (=) constructs, however, the only way I have found to deal with the rest of the "@" constructs is to use PostPreprocessingScript.pl via the "-post-preprocessing-command" option. This allows processing to proceed beyond the compilation phase but shortly afterwards it fails whether using server or client-side processing.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 8 Jan 2010
This enhancement has been incorporated in Release 2009b (R2009b). For previous product releases, read below for any possible workarounds:
The "-post-preprocessing-command" (ppc) option is the right way to deal with arithmetic addressing when using "iar" or "keil" dialects. The attached ppc script will allow PolySpace to accept constructs like:
volatile bit MYREG@ ((unsigned)®*8)+4;
sfr MYNEWREG = 0x400+ 1; IAR

More Answers (0)

Products


Release

No release entered yet.

Community Treasure Hunt

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

Start Hunting!