This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
尊敬的社区:
我的问题: 在我的代码中、是否有头文件要包含或推荐的替代方法来使用 C2000Ware FPU 库中的 memcpy_fast_far ()函数?
我正在开发一些使用 memcpy_fast_far ()来访问 SDRAM 中的数据(通过 EMIF)的代码。 我注意到、在示例工程(c2000ware\device_support\f2837xs+ examples\cpu\emif1_16bit_sdam_far\cpu01)中、除了主代码外还有三个文件、即 fpu_vector.h、fpu_types.h 和 memcpy_fast_far.asm。
我可以在 C2000Ware 的 FPU 库中看到同名的文件、因此、为了避免在项目目录中手动复制库文件、我认为引用 FPU 库中的文件会更好。
但是、在此过程中、我注意到、虽然 memcpy_fast_far.asm 位于 FPU 库(c2000ware\libraries\dsp\fpu\c28\source\fpu32\utility)中、但 FPU 库(c2000ware\libraries\dsp\fpu\c28\include\fpu32\fpu_vector.h)中的 fpu_vector.h 不包含其函数原型。 我无法立即在 FPU 库中看到包含函数原型的头文件。
我可以手动添加行
extern void memcpy_fast_far (volatile void* dst、volatile const void* src、uint16_t N);
这对我的代码很有效、但我不确定这是否是正确的方法。
非常感谢、
Alex
您好 Alex:
FPU 库中不存在 memcpy_fast_far 函数、而存在 memcpy_fast 函数(不可中断)。 如果要使用 memcpy_fast_far 函数、则必须自己创建外部声明。 如果这不起作用或出现错误、请告诉我。
此致、
Omer Amir
非常感谢您的指导。 我将保留手动 extern 声明。
此致、
Alex