CN / EN
CN / EN

提问

设计支持

您的项目私密技术问题如需获得一对一支持,请点击下方联系我们。

GH3018在ESP32平台,移植程序编译出现call8错误 GH3018

188***588

2024-11-22 11:24

你好!

目前使用ESP-IDF V5.3.1环境编译出错,使用hbd_ctrl_GCC8.4.0_xtensa-esp32.文件,编译出错。

根据错误提示应该是因为编译库文件的时候没有添加 -mlongcalls,导致调用目标出现问题。

请问能否提供重新编译的库文件,或者还有其它的解决办法吗

编译器报错如下:

cmd.exe /C "cd . && D:\Users\Administrator\.espressif\tools\xtensa-esp-elf\esp-13.2.0_20240530\xtensa-esp-elf\bin\xtensa-esp32s3-elf-g++.exe -mlongcalls -fno-builtin-memcpy -fno-builtin-memset -fno-builtin-bzero -fno-builtin-stpcpy -fno-builtin-strncpy -mlongcalls -mlongcalls -Wl,--cref -Wl,--defsym=IDF_TARGET_ESP32S3=0 -Wl,--Map=C:/Users/Administrator/Desktop/esp32/i2c_eeprom/build/i2c_eeprom.map -Wl,--no-warn-rwx-segments -fno-rtti -fno-lto -Wl,--gc-sections -Wl,--warn-common -T esp32s3.peripherals.ld -T esp32s3.rom.ld -T esp32s3.rom.api.ld -T esp32s3.rom.libgcc.ld -T esp32s3.rom.wdt.ld -T esp32s3.rom.version.ld -T esp32s3.rom.newlib.ld -T memory.ld -T sections.ld @CMakeFiles\i2c_eeprom.elf.rsp -o i2c_eeprom.elf && cd ."

C:/Users/Administrator/Desktop/esp32/i2c_eeprom/components/hbd/lib/hbd_ctrl_GCC8.4.0_xtensa-esp32.a(hbd_ctrl.o): in function `HBD_VirtualConfig':

hbd_ctrl.c:(.text.HBD_VirtualConfig+0x3b1): dangerous relocation: call8: call target out of range: __divsf3

hbd_ctrl.c:(.text.HBD_VirtualConfig+0x3d6): dangerous relocation: call8: call target out of range: __divsf3

hbd_ctrl.c:(.text.HBD_VirtualConfig+0x44a): dangerous relocation: call8: call target out of range: __divsf3

hbd_ctrl.c:(.text.HBD_VirtualConfig+0x45b): dangerous relocation: call8: call target out of range: __divsf3

hbd_ctrl.c:(.text.HBD_VirtualConfig+0x4c5): dangerous relocation: call8: call target out of range: __divsf3

hbd_ctrl.c:(.text.HBD_VirtualConfig+0x4ef): dangerous relocation: call8: call target out of range: __divsf3

C:/Users/Administrator/Desktop/esp32/i2c_eeprom/components/hbd/lib/hbd_ctrl_GCC8.4.0_xtensa-esp32.a(hbd_ctrl.o): in function `HBD_AutoLedWriteRegConfirm':

hbd_ctrl.c:(.text.HBD_AutoLedWriteRegConfirm+0x46): dangerous relocation: call8: call target out of range: __divsf3

hbd_ctrl.c:(.text.HBD_AutoLedWriteRegConfirm+0x5e): dangerous relocation: call8: call target out of range: __divsf3

hbd_ctrl.c:(.text.HBD_AutoLedWriteRegConfirm+0x86): dangerous relocation: call8: call target out of range: __floatunsidf

hbd_ctrl.c:(.text.HBD_AutoLedWriteRegConfirm+0x9d): dangerous relocation: call8: call target out of range: __floatunsidf

hbd_ctrl.c:(.text.HBD_AutoLedWriteRegConfirm+0xa6): dangerous relocation: call8: call target out of range: __divdf3

hbd_ctrl.c:(.text.HBD_AutoLedWriteRegConfirm+0xb5): dangerous relocation: call8: call target out of range: __ltdf2

hbd_ctrl.c:(.text.HBD_AutoLedWriteRegConfirm+0x13a): dangerous relocation: call8: call target out of range: __floatunsidf

hbd_ctrl.c:(.text.HBD_AutoLedWriteRegConfirm+0x151): dangerous relocation: call8: call target out of range: __floatunsidf

hbd_ctrl.c:(.text.HBD_AutoLedWriteRegConfirm+0x15a): dangerous relocation: call8: call target out of range: __divdf3

hbd_ctrl.c:(.text.HBD_AutoLedWriteRegConfirm+0x169): dangerous relocation: call8: call target out of range: __ltdf2

C:/Users/Administrator/Desktop/esp32/i2c_eeprom/components/hbd/lib/hbd_ctrl_GCC8.4.0_xtensa-esp32.a(hbd_ctrl.o): in function `HBD_ResampleGsensorData':

hbd_ctrl.c:(.text.HBD_ResampleGsensorData+0x17): dangerous relocation: call8: call target out of range: __divsf3

C:/Users/Administrator/Desktop/esp32/i2c_eeprom/components/hbd/lib/hbd_ctrl_GCC8.4.0_xtensa-esp32.a(hbd_ctrl.o): in function `HBD_AutoLedRecursionCalcNoSTD':

hbd_ctrl.c:(.text.HBD_AutoLedRecursionCalcNoSTD+0x3a): dangerous relocation: call8: call target out of range: __divsf3

C:/Users/Administrator/Desktop/esp32/i2c_eeprom/components/hbd/lib/hbd_ctrl_GCC8.4.0_xtensa-esp32.a(hbd_ctrl.o): in function `HBD_AutoLEDBGProcess$isra$2':

hbd_ctrl.c:(.text.HBD_AutoLEDBGProcess$isra$2+0x21d): dangerous relocation: call8: call target out of range: __floatunsidf

hbd_ctrl.c:(.text.HBD_AutoLEDBGProcess$isra$2+0x226): dangerous relocation: call8: call target out of range: __muldf3

hbd_ctrl.c:(.text.HBD_AutoLEDBGProcess$isra$2+0x231): dangerous relocation: call8: call target out of range: __floatunsidf

hbd_ctrl.c:(.text.HBD_AutoLEDBGProcess$isra$2+0x23a): dangerous relocation: call8: call target out of range: __muldf3

hbd_ctrl.c:(.text.HBD_AutoLEDBGProcess$isra$2+0x249): dangerous relocation: call8: call target out of range: __adddf3

hbd_ctrl.c:(.text.HBD_AutoLEDBGProcess$isra$2+0x252): dangerous relocation: call8: call target out of range: __muldf3

hbd_ctrl.c:(.text.HBD_AutoLEDBGProcess$isra$2+0x255): dangerous relocation: call8: call target out of range: __fixunsdfsi

hbd_ctrl.c:(.text.HBD_AutoLEDBGProcess$isra$2+0x306): dangerous relocation: call8: call target out of range: __floatunsidf

hbd_ctrl.c:(.text.HBD_AutoLEDBGProcess$isra$2+0x30f): dangerous relocation: call8: call target out of range: __muldf3

hbd_ctrl.c:(.text.HBD_AutoLEDBGProcess$isra$2+0x31a): dangerous relocation: call8: call target out of range: __floatunsidf

hbd_ctrl.c:(.text.HBD_AutoLEDBGProcess$isra$2+0x323): dangerous relocation: call8: call target out of range: __muldf3

hbd_ctrl.c:(.text.HBD_AutoLEDBGProcess$isra$2+0x332): dangerous relocation: call8: call target out of range: __adddf3

hbd_ctrl.c:(.text.HBD_AutoLEDBGProcess$isra$2+0x335): dangerous relocation: call8: call target out of range: __fixunsdfsi

hbd_ctrl.c:(.text.HBD_AutoLEDBGProcess$isra$2+0x3d9): dangerous relocation: call8: call target out of range: __floatunsidf

hbd_ctrl.c:(.text.HBD_AutoLEDBGProcess$isra$2+0x3e2): dangerous relocation: call8: call target out of range: __muldf3

hbd_ctrl.c:(.text.HBD_AutoLEDBGProcess$isra$2+0x3ee): dangerous relocation: call8: call target out of range: __floatunsidf

hbd_ctrl.c:(.text.HBD_AutoLEDBGProcess$isra$2+0x3f7): dangerous relocation: call8: call target out of range: __muldf3

hbd_ctrl.c:(.text.HBD_AutoLEDBGProcess$isra$2+0x406): dangerous relocation: call8: call target out of range: __adddf3

hbd_ctrl.c:(.text.HBD_AutoLEDBGProcess$isra$2+0x409): dangerous relocation: call8: call target out of range: __fixunsdfsi

C:/Users/Administrator/Desktop/esp32/i2c_eeprom/components/hbd/lib/hbd_ctrl_GCC8.4.0_xtensa-esp32.a(hbd_ctrl.o): in function `HBD_CalcGsensorFloatIndex$part$3':

hbd_ctrl.c:(.text.HBD_CalcGsensorFloatIndex$part$3+0x13): dangerous relocation: call8: call target out of range: __divsf3

C:/Users/Administrator/Desktop/esp32/i2c_eeprom/components/hbd/lib/hbd_ctrl_GCC8.4.0_xtensa-esp32.a(hbd_ctrl.o): in function `HBD_AutoLedCalcGainCurrent':

hbd_ctrl.c:(.text.HBD_AutoLedCalcGainCurrent+0x141): dangerous relocation: call8: call target out of range: __divsf3

hbd_ctrl.c:(.text.HBD_AutoLedCalcGainCurrent+0x1b2): dangerous relocation: call8: call target out of range: __divsf3

hbd_ctrl.c:(.text.HBD_AutoLedCalcGainCurrent+0x32a): dangerous relocation: call8: call target out of range: __divsf3

hbd_ctrl.c:(.text.HBD_AutoLedCalcGainCurrent+0x396): dangerous relocation: call8: call target out of range: __divsf3

hbd_ctrl.c:(.text.HBD_AutoLedCalcGainCurrent+0x3a1): dangerous relocation: call8: call target out of range: __divsf3

hbd_ctrl.c:(.text.HBD_AutoLedCalcGainCurrent+0x3de): dangerous relocation: call8: call target out of range: __divsf3

hbd_ctrl.c:(.text.HBD_AutoLedCalcGainCurrent+0x3e5): dangerous relocation: call8: call target out of range: __divsf3

hbd_ctrl.c:(.text.HBD_AutoLedCalcGainCurrent+0x436): dangerous relocation: call8: call target out of range: __divsf3

hbd_ctrl.c:(.text.HBD_AutoLedCalcGainCurrent+0x4e5): dangerous relocation: call8: call target out of range: __divsf3

hbd_ctrl.c:(.text.HBD_AutoLedCalcGainCurrent+0x5c9): dangerous relocation: call8: call target out of range: __floatunsidf

hbd_ctrl.c:(.text.HBD_AutoLedCalcGainCurrent+0x5d2): dangerous relocation: call8: call target out of range: __muldf3

hbd_ctrl.c:(.text.HBD_AutoLedCalcGainCurrent+0x5d5): dangerous relocation: call8: call target out of range: __fixunsdfsi

C:/Users/Administrator/Desktop/esp32/i2c_eeprom/components/hbd/lib/hbd_ctrl_GCC8.4.0_xtensa-esp32.a(hbd_ctrl.o): in function `HBD_HbWithHrvCalculateByFifoIntDbgData':

hbd_ctrl.c:(.text.HBD_HbWithHrvCalculateByFifoIntDbgData+0x251): dangerous relocation: call8: call target out of range: memset

hbd_ctrl.c:(.text.HBD_HbWithHrvCalculateByFifoIntDbgData+0x25f): dangerous relocation: call8: call target out of range: memset

collect2.exe: error: ld returned 1 exit status

ninja: build stopped: subcommand failed.

0收藏

0赞成

135***427

2024-11-23 20:00

目前我有调ESP32C6+GH3220,通过SPI控制;但我还没有驱动起来,请问有没有参考的SPI驱动实例(基于ESP-IDF)?谢谢,4646079@qq.com

0条评论

0赞成

0收藏

您的评论

Tim

汇顶员工
2024-11-25 15:39

如电话沟通,官网直接下载的库比较旧,不能满足调试要求;

建议联系销售给你安排代理商提供完整的库和Demo代码。

0条评论

0赞成

0收藏

您的评论

登录后可回答问题,请 注册

我们时刻倾听您的声音
联系销售

扫描关注公众号

打开微信,使用“扫一扫”即可关注