Keil™, An ARM® Company

Technical Support

C166: ERROR 167 (DECLARATION/ACTIVATION ERROR) FOR _MMOV_


Information in this article applies to:

  • C166 Version 4.03

SYMPTOMS

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

#include "reg262.h"
#include <st10mac.h>

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 <reg167.h>
#include <st10mac.h>

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

C166: MAC UNIT SUPPORT

Last Reviewed: Tuesday, January 31, 2006


Did this article provide the answer you needed?
 
Yes
No
Not Sure