Keil Logo

C166: Error 167 (Declaration/Activation Error) for _mmov_ Intrinsic


Information in this article applies to:

  • C166

SYMPTOMS

I have written the following code to call the intrinsic _mmov_ function in order to use the ST10 MAC unit:

#include

void GetRasters(unsigned int near *pfont, unsigned int near *pCharcell, unsigned int Height)
{
  _mmov_((void near *)pCharcell,(void near *) pfont, Height);
}

I get the following error:

*** ERROR 167 .\STD.C: intrinsic '_mmov_': declaration/activation error

CAUSE

There are a couple of restrictions on the mmov instruction:

  • The parameters need to be pointers to word aligned elemements (typically int)
  • The count parameter needs to be a constant

RESOLUTION

Here are the two ways the _mmov_ function may be called:

#include
#include

void main(void)
{
  unsigned int *s, *p;

  _mmov_(s, p, 2);
  while(1);
}

void GetRasters(unsigned int near *pfont, unsigned int near *pCharcell, unsigned int Height)  {
  _mmov_((void near *)pCharcell,(void near *) pfont, 10);
}

MORE INFORMATION

SEE ALSO


Last Reviewed: Thursday, February 25, 2021


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.