我在编译SPI工程的时候,在下面这个函数中执行到memset(chObj, 0, sizeof(SPI_v1_chObject));的时候提示缺少memset.c文件
static void MCSPI_init_v1(MCSPI_Handle mcHandle)
{
SPI_Handle handle;
SPI_v1_Object *object;
SPI_v1_chObject *chObj;
uint32_t chNum;
/* Input parameter validation */
if (mcHandle != NULL)
{
/* Get the pointer to the object and hwAttrs */
handle = mcHandle->handle;
chNum = mcHandle->chnNum;
object = (SPI_v1_Object*)handle->object;
chObj = &(object->chObject[chNum]);
/* reset channel object */
memset(chObj, 0, sizeof(SPI_v1_chObject));
chObj->isOpen = (bool)false;
}
}
Can't find a source file at "/db/ztree/library/trees/newlib/newlib-a00/src/linaro/gcc-arm-none-eabi-7-2017-q4-major/src/newlib/newlib/libc/string/memset.c"Locate the file or edit the source lookup path to include its location.
然后我使用Locate File在gcc-arm-none-eabi-7-2017-q4-major文件中没有找到memset.c怎么办?
user4839655:
我使用的是TI的SDK
Nancy Wang:
参考以下帖子给出的解决方案看一下是否有帮助。
e2e.ti.com/…/590316