北京中科昊芯科技有限公司

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 846|回复: 2

035选择不带CLA的工程调用IQmath会报错

[复制链接]

14

主题

16

回帖

131

积分

注册会员

积分
131
发表于 2023-5-16 09:47:47 | 显示全部楼层 |阅读模式
直接编译,会报下面的错误:

  1. Building target: MD500E_C_1.57_2020_IDE_V2.1.5.elf
  2. D:/Program Files (x86)/Haawking-IDE-win64-V2.1.5\haawking-tools/compiler/riscv-tc-gcc/lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin\ld: ../lib\libIQmath.a(_IQ15div.o): can't link single-float modules with soft-float modules
  3. riscv32-haawking-elf-gcc -march=rv32imc -D__RUNNING_IN_FLASH_ -T D:/Users/ab/haawking-workspace-V2.1.5/MD500E_C_1.57_2020_IDE_V2.1.5/haawking-drivers/ldscripts/DSC28035_ECB_link_FLASH.ld -mabi=ilp32 -mcmodel=medlow -mno-save-restore --target=riscv32-unknown-elf --sysroot="D:/Program Files (x86)/Haawking-IDE-win64-V2.1.5\haawking-tools/compiler/riscv-tc-gcc/riscv64-unknown-elf" --gcc-toolchain="D:/Program Files (x86)/Haawking-IDE-win64-V2.1.5\haawking-tools/compiler/riscv-tc-gcc" -Odefault -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -fno-inline-functions -cl-single-precision-constant -Wall -Wextra  -g3 -gdwarf-3 -Wl,--defsym,IDE_VERSION_2_1_5=0 -nostartfiles -nostdlib -Xlinker --gc-sections -L../lib -L"../haawking-drivers/ldscripts" -L"D:/Program Files (x86)/Haawking-IDE-win64-V2.1.5/haawking-tools/segger_lib" -Wl,-Map,"MD500E_C_1.57_2020_IDE_V2.1.5.map" -o "MD500E_C_1.57_2020_IDE_V2.1.5.elf"  ./src/04_subprogram/SubPrg.o  ./src/03_function/f_CANlinkEx.o ./src/03_function/f_canlink.o ./src/03_function/f_comm.o ./src/03_function/f_common.o ./src/03_function/f_dspcan.o ./src/03_function/f_eeprom.o ./src/03_function/f_error.o ./src/03_function/f_fcDeal.o ./src/03_function/f_frqSrc.o ./src/03_function/f_frqSrc_pid.o ./src/03_function/f_funcCode.o ./src/03_function/f_interface.o ./src/03_function/f_invPara.o ./src/03_function/f_io.o ./src/03_function/f_main.o ./src/03_function/f_menu.o ./src/03_function/f_modbus.o ./src/03_function/f_motorFc.o ./src/03_function/f_osc.o ./src/03_function/f_p2p.o ./src/03_function/f_plc.o ./src/03_function/f_runSrc.o ./src/03_function/f_runSrc_accDecFrq.o ./src/03_function/f_torqueCtrl.o ./src/03_function/f_ui.o ./src/03_function/f_vf.o  ./src/02_motor/vf/MotorVF.o  ./src/02_motor/vc/PM_svc/MotorIPMSVC.o  ./src/02_motor/vc/MotorPmsmMain.o ./src/02_motor/vc/MotorVCMain.o ./src/02_motor/vc/ZeroPosCtl.o  ./src/02_motor/pwm/MotorPWM.o ./src/02_motor/pwm/Svpwm1.o  ./src/02_motor/para_estimation/MotorParEst.o ./src/02_motor/para_estimation/MotorPmsmParEst.o  ./src/02_motor/main_public/MotorCarrier.o ./src/02_motor/main_public/MotorConstant.o ./src/02_motor/main_public/MotorCurrentTransform.o ./src/02_motor/main_public/MotorDataExchange.o ./src/02_motor/main_public/MotorDebug.o ./src/02_motor/main_public/MotorFlyingStart.o ./src/02_motor/main_public/MotorInfoCollect.o ./src/02_motor/main_public/MotorInvProtect.o ./src/02_motor/main_public/MotorMain.o ./src/02_motor/main_public/MotorParChange.o ./src/02_motor/main_public/MotorPublicCal.o ./src/02_motor/main_public/MotorVar.o  ./src/02_motor/encoder/MotorEncoder.o ./src/02_motor/encoder/MotorSpeed.o  ./src/02_motor/PMFluxWeakCsr2.o  ./src/01_system/main.o ./src/01_system/mainInit_2803x.o  ./haawking-drivers/haawking-dsc28035_ecb-board/common/crt.o ./haawking-drivers/haawking-dsc28035_ecb-board/common/syscalls.o  ./haawking-drivers/haawking-dsc28035_ecb-board/DSP2803x_headers/source/DSP2803x_GlobalVariableDefs.o  ./haawking-drivers/haawking-dsc28035_ecb-board/DSP2803x_common/source/DSP2803x_Adc.o ./haawking-drivers/haawking-dsc28035_ecb-board/DSP2803x_common/source/DSP2803x_CSMPasswords.o ./haawking-drivers/haawking-dsc28035_ecb-board/DSP2803x_common/source/DSP2803x_Comp.o ./haawking-drivers/haawking-dsc28035_ecb-board/DSP2803x_common/source/DSP2803x_CpuTimers.o ./haawking-drivers/haawking-dsc28035_ecb-board/DSP2803x_common/source/DSP2803x_DefaultIsr.o ./haawking-drivers/haawking-dsc28035_ecb-board/DSP2803x_common/source/DSP2803x_Dma.o ./haawking-drivers/haawking-dsc28035_ecb-board/DSP2803x_common/source/DSP2803x_ECan.o ./haawking-drivers/haawking-dsc28035_ecb-board/DSP2803x_common/source/DSP2803x_ECap.o ./haawking-drivers/haawking-dsc28035_ecb-board/DSP2803x_common/source/DSP2803x_EPwm.o ./haawking-drivers/haawking-dsc28035_ecb-board/DSP2803x_common/source/DSP2803x_EQep.o ./haawking-drivers/haawking-dsc28035_ecb-board/DSP2803x_common/source/DSP2803x_Gpio.o ./haawking-drivers/haawking-dsc28035_ecb-board/DSP2803x_common/source/DSP2803x_HRCap.o ./haawking-drivers/haawking-dsc28035_ecb-board/DSP2803x_common/source/DSP2803x_I2C.o ./haawking-drivers/haawking-dsc28035_ecb-board/DSP2803x_common/source/DSP2803x_Lin.o ./haawking-drivers/haawking-dsc28035_ecb-board/DSP2803x_common/source/DSP2803x_OTP.o ./haawking-drivers/haawking-dsc28035_ecb-board/DSP2803x_common/source/DSP2803x_PieCtrl.o ./haawking-drivers/haawking-dsc28035_ecb-board/DSP2803x_common/source/DSP2803x_PieVect.o ./haawking-drivers/haawking-dsc28035_ecb-board/DSP2803x_common/source/DSP2803x_Sci.o ./haawking-drivers/haawking-dsc28035_ecb-board/DSP2803x_common/source/DSP2803x_Spi.o ./haawking-drivers/haawking-dsc28035_ecb-board/DSP2803x_common/source/DSP2803x_SysCtrl.o ./haawking-drivers/haawking-dsc28035_ecb-board/DSP2803x_common/source/_DSP2803x_usDelay.o ./haawking-drivers/haawking-dsc28035_ecb-board/DSP2803x_common/source/disable_interrupt.o ./haawking-drivers/haawking-dsc28035_ecb-board/DSP2803x_common/source/enable_interrupt.o ./haawking-drivers/haawking-dsc28035_ecb-board/DSP2803x_common/source/ier_set.o ./haawking-drivers/haawking-dsc28035_ecb-board/DSP2803x_common/source/ier_unset.o ./haawking-drivers/haawking-dsc28035_ecb-board/DSP2803x_common/source/ifr_set.o ./haawking-drivers/haawking-dsc28035_ecb-board/DSP2803x_common/source/ifr_unset.o   -lIQmath -lhaawking-segger_imc
  4. D:/Program Files (x86)/Haawking-IDE-win64-V2.1.5\haawking-tools/compiler/riscv-tc-gcc/lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin\ld: failed to merge target specific data of file ../lib\libIQmath.a(_IQ15div.o)
  5. D:/Program Files (x86)/Haawking-IDE-win64-V2.1.5\haawking-tools/compiler/riscv-tc-gcc/lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin\ld: ../lib\libIQmath.a(_IQ15sin.o): can't link single-float modules with soft-float modules
  6. D:/Program Files (x86)/Haawking-IDE-win64-V2.1.5\haawking-tools/compiler/riscv-tc-gcc/lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin\ld: failed to merge target specific data of file ../lib\libIQmath.a(_IQ15sin.o)
  7. D:/Program Files (x86)/Haawking-IDE-win64-V2.1.5\haawking-tools/compiler/riscv-tc-gcc/lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin\ld: ../lib\libIQmath.a(_IQ16atan2.o): can't link single-float modules with soft-float modules
  8. D:/Program Files (x86)/Haawking-IDE-win64-V2.1.5\haawking-tools/compiler/riscv-tc-gcc/lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin\ld: failed to merge target specific data of file ../lib\libIQmath.a(_IQ16atan2.o)
  9. D:/Program Files (x86)/Haawking-IDE-win64-V2.1.5\haawking-tools/compiler/riscv-tc-gcc/lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin\ld: ../lib\libIQmath.a(_IQ16div.o): can't link single-float modules with soft-float modules
  10. D:/Program Files (x86)/Haawking-IDE-win64-V2.1.5\haawking-tools/compiler/riscv-tc-gcc/lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin\ld: failed to merge target specific data of file ../lib\libIQmath.a(_IQ16div.o)
  11. D:/Program Files (x86)/Haawking-IDE-win64-V2.1.5\haawking-tools/compiler/riscv-tc-gcc/lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin\ld: ../lib\libIQmath.a(_IQ16sqrt.o): can't link single-float modules with soft-float modules
  12. D:/Program Files (x86)/Haawking-IDE-win64-V2.1.5\haawking-tools/compiler/riscv-tc-gcc/lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin\ld: failed to merge target specific data of file ../lib\libIQmath.a(_IQ16sqrt.o)
  13. D:/Program Files (x86)/Haawking-IDE-win64-V2.1.5\haawking-tools/compiler/riscv-tc-gcc/lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin\ld: ../lib\libIQmath.a(__IQsat.o): can't link single-float modules with soft-float modules
  14. D:/Program Files (x86)/Haawking-IDE-win64-V2.1.5\haawking-tools/compiler/riscv-tc-gcc/lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin\ld: failed to merge target specific data of file ../lib\libIQmath.a(__IQsat.o)
  15. riscv32-haawking-elf-gcc: error: ld command failed with exit code 1 (use -v to see invocation)
  16. make: *** [makefile:65: MD500E_C_1.57_2020_IDE_V2.1.5.elf] Error 1
  17. "make -O -j8 all" terminated with exit code 2. Build might be incomplete.
复制代码


14

主题

16

回帖

131

积分

注册会员

积分
131
 楼主| 发表于 2023-5-16 09:50:23 | 显示全部楼层
从报错的信息,可以看出是库链接的时候报的错。
  1. can't link single-float modules with soft-float
复制代码

经过咨询研发人员,默认提供的库是浮点版本的api接口,如果只想在035上面运行定点的程序,可以替换掉工程目录下lib文件中的libIQmath.a库,定点版本的库文件可以从034的模板工程中拷贝过来。

点评

优秀  发表于 2023-5-16 09:55
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|北京中科昊芯科技有限公司 ( 京ICP备19023330号-3 )

GMT+8, 2024-4-27 09:49 , Processed in 0.210562 second(s), 24 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表