| 
 
贡献99 
飞刀27 FD
注册时间2021-10-8
在线时间2 小时积分14 
 
   
 扫一扫,手机访问本帖  | 
 
| 在igpio_led_output.uvprojx工程里面的main函数最后增加了一段代码生成一个正弦波数组,并且在开头加了math.h 和 arm_math.h这两个头文件: 
 #include "board.h"
 #include "fsl_debug_console.h"
 #include "fsl_gpio.h"
 #include "stdio.h"
 #include <math.h>
 #include "arm_math.h"
 
 #include "pin_mux.h"
 #include "clock_config.h"
 。
 。
 。
 
 while (1)
 {
 delay();
 delay();
 delay();
 delay();
 #if (defined(FSL_FEATURE_IGPIO_HAS_DR_TOGGLE) && (FSL_FEATURE_IGPIO_HAS_DR_TOGGLE == 1))
 GPIO_PortToggle(EXAMPLE_LED_GPIO, 1u << EXAMPLE_LED_GPIO_PIN);
 #else
 if (g_pinSet)
 {
 GPIO_PinWrite(EXAMPLE_LED_GPIO, EXAMPLE_LED_GPIO_PIN, 0U);
 g_pinSet = false;
 }
 else
 {
 GPIO_PinWrite(EXAMPLE_LED_GPIO, EXAMPLE_LED_GPIO_PIN, 1U);
 g_pinSet = true;
 }
 #endif /* FSL_FEATURE_IGPIO_HAS_DR_TOGGLE */
 
 for(i=0; i< block_size; i++){
 //                xTimeWave[i] = testdatas[i];
 xTimeWave[i] = arm_sin_f32(2*PI*ff*i);
 printf("%d,%8.6f,\r\n",i,xTimeWave[i]);
 //                sprintf(printstr, "%04d=%8.6f\r\n", i, xTimeWave[i]);
 //                PRINTF(printstr);
 }
 }
 
 编译出错信息:
 compiling arm_sin_f32.c...
 ../../../../../../CMSIS/Include/core_cm.h(81): error: #35: #error directive: "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
 #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
 ..\..\..\..\..\..\CMSIS\DSP_Lib\Source\FastMathFunctions\arm_sin_f32.c: 0 warnings, 1 error
 
 请问问题在哪里?
 谢谢!
 
 
 
 | 
 |