f1c200s tina 驱动里面加了几行炸了 ...
-
x = (int)(((float)x/235.00)*400); y = (int)(((float)y/316.00)*240);
CC init/version.o LD init/built-in.o drivers/built-in.o: In function `edt_ft5x06_ts_isr': clk-sun3iw1.c:(.text+0xe1cc4): undefined reference to `__aeabi_i2f' clk-sun3iw1.c:(.text+0xe1cc8): undefined reference to `__aeabi_f2d' clk-sun3iw1.c:(.text+0xe1cd4): undefined reference to `__aeabi_ddiv' clk-sun3iw1.c:(.text+0xe1ce0): undefined reference to `__aeabi_dmul' clk-sun3iw1.c:(.text+0xe1cfc): undefined reference to `__aeabi_i2f' clk-sun3iw1.c:(.text+0xe1d00): undefined reference to `__aeabi_f2d' clk-sun3iw1.c:(.text+0xe1d0c): undefined reference to `__aeabi_ddiv' clk-sun3iw1.c:(.text+0xe1d18): undefined reference to `__aeabi_dmul' clk-sun3iw1.c:(.text+0xe1d2c): undefined reference to `__aeabi_d2iz' clk-sun3iw1.c:(.text+0xe1d4c): undefined reference to `__aeabi_d2iz' Makefile:783: recipe for target 'vmlinux' failed
-
https://blog.csdn.net/weixin_44019461/article/details/124433194
Linux内核空间无法调用C库函数并且禁用FPU,可以放弃了。
原因:内核这么设计有利于上下文切换和调度。
解决方法
尝试过手动实现某些三角函数到我的文件中。发现只要涉及浮点数,虽然编译时不会error,但有一些warning如下:MODPOST 1 modules WARNING: "__aeabi_f2d" [/work/coding/1_diy/22_dts_i2c_mpu6050/mpu6050.ko] undefined! WARNING: "__aeabi_fcmplt" [/work/coding/1_diy/22_dts_i2c_mpu6050/mpu6050.ko] undefined! WARNING: "__aeabi_fmul" [/work/coding/1_diy/22_dts_i2c_mpu6050/mpu6050.ko] undefined! WARNING: "__aeabi_fdiv" [/work/coding/1_diy/22_dts_i2c_mpu6050/mpu6050.ko] undefined! WARNING: "__aeabi_f2iz" [/work/coding/1_diy/22_dts_i2c_mpu6050/mpu6050.ko] undefined! WARNING: "__aeabi_fcmple" [/work/coding/1_diy/22_dts_i2c_mpu6050/mpu6050.ko] undefined! WARNING: "__aeabi_fcmpge" [/work/coding/1_diy/22_dts_i2c_mpu6050/mpu6050.ko] undefined! WARNING: "__aeabi_fsub" [/work/coding/1_diy/22_dts_i2c_mpu6050/mpu6050.ko] undefined! WARNING: "__aeabi_d2f" [/work/coding/1_diy/22_dts_i2c_mpu6050/mpu6050.ko] undefined! WARNING: "__aeabi_dmul" [/work/coding/1_diy/22_dts_i2c_mpu6050/mpu6050.ko] undefined! WARNING: "__aeabi_i2f" [/work/coding/1_diy/22_dts_i2c_mpu6050/mpu6050.ko] undefined! WARNING: "__aeabi_fcmpgt" [/work/coding/1_diy/22_dts_i2c_mpu6050/mpu6050.ko] undefined! WARNING: "__aeabi_fadd" [/work/coding/1_diy/22_dts_i2c_mpu6050/mpu6050.ko] undefined!
原因是:当前使用Linux内核版本不支持ARM平台的相关运算,相同的内核代码在X86平台是没有问题的。
-
Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号