程序计算公式中用到了sqrt函数,在程序上面也包含了数学库文件
linking...
arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -O0 -ffunction-sections -fdata-sections -Wall -g -gdwarf-2 -T "G:\LLJC-20240112\LLJC_STM32F103ZDT6_B1.0.2\LLJC_STM32F103ZDT6_B1.0.2\linkscripts\STM32F103ZD\link.lds" -Xlinker --gc-sections -Wl,-Map,"rtthread.map" -Xlinker --cref -o "rtthread.elf" ./rt-thread/src/clock.o ./rt-thread/src/components.o ./rt-thread/src/device.o ./rt-thread/src/idle.o ./rt-thread/src/ipc.o ./rt-thread/src/irq.o ./rt-thread/src/kservice.o ./rt-thread/src/mem.o ./rt-thread/src/mempool.o ./rt-thread/src/object.o ./rt-thread/src/scheduler.o ./rt-thread/src/signal.o ./rt-thread/src/thread.o ./rt-thread/src/timer.o ./rt-thread/libcpu/arm/cortex-m3/context_gcc.o ./rt-thread/libcpu/arm/cortex-m3/cpuport.o ./rt-thread/libcpu/arm/common/backtrace.o ./rt-thread/libcpu/arm/common/div0.o ./rt-thread/libcpu/arm/common/showmem.o ./rt-thread/components/libc/compilers/common/time.o ./rt-thread/components/finsh/cmd.o ./rt-thread/components/finsh/msh.o ./rt-thread/components/finsh/shell.o ./rt-thread/components/drivers/src/completion.o ./rt-thread/components/drivers/src/dataqueue.o ./rt-thread/components/drivers/src/pipe.o ./rt-thread/components/drivers/src/ringblk_buf.o ./rt-thread/components/drivers/src/ringbuffer.o ./rt-thread/components/drivers/src/waitqueue.o ./rt-thread/components/drivers/src/workqueue.o ./rt-thread/components/drivers/serial/serial.o ./rt-thread/components/drivers/misc/pin.o ./libraries/STM32F1xx_HAL_Driver/Src/Legacy/stm32f1xx_hal_can.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_adc.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_adc_ex.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_can.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cec.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_crc.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dac.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dac_ex.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_eth.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_hcd.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_i2c.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_i2s.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_irda.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_iwdg.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_mmc.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_nand.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_nor.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pccard.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pcd.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pcd_ex.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rtc.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rtc_ex.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_sd.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_smartcard.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_spi.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_sram.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_usart.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_wwdg.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_ll_usb.o ./libraries/CMSIS/Device/ST/STM32F1xx/Source/Templates/gcc/startup_stm32f103xe.o ./libraries/CMSIS/Device/ST/STM32F1xx/Source/Templates/system_stm32f1xx.o ./drivers/board.o ./drivers/drv_adc.o ./drivers/drv_clk.o ./drivers/drv_common.o ./drivers/drv_eth.o ./drivers/drv_flash_f1.o ./drivers/drv_gpio.o ./drivers/drv_hwtimer.o ./drivers/drv_pwm.o ./drivers/drv_qspi.o ./drivers/drv_rtc.o ./drivers/drv_sdio.o ./drivers/drv_soft_i2c.o ./drivers/drv_spi.o ./drivers/drv_usart.o ./drivers/drv_usbd.o ./drivers/drv_usbh.o ./drivers/drv_wdt.o ./cubemx/Src/adc.o ./cubemx/Src/dma.o ./cubemx/Src/gpio.o ./cubemx/Src/iwdg.o ./cubemx/Src/main.o ./cubemx/Src/stm32f1xx_hal_msp.o ./cubemx/Src/stm32f1xx_it.o ./cubemx/Src/tim.o ./cubemx/Src/usart.o ./applications/main.o ./applications/user_adc_dma.o ./applications/user_crc.o ./applications/user_lltask.o ./applications/user_sys.o
./applications/user_lltask.o: In function `adc_dma_root_mean_square_data':
G:\LLJC-20240112\LLJC_STM32F103ZDT6_B1.0.2\LLJC_STM32F103ZDT6_B1.0.2\Debug/../applications/user_lltask.c:779: undefined reference to `sqrt'
G:\LLJC-20240112\LLJC_STM32F103ZDT6_B1.0.2\LLJC_STM32F103ZDT6_B1.0.2\Debug/../applications/user_lltask.c:780: undefined reference to `sqrt'
collect2.exe: error: ld returned 1 exit status
make: *** [makefile:59: rtthread.elf] Error 1
"make -j4 all" terminated with exit code 2. Build might be incomplete.