weiminshen99 / GD32-hover-master-slave

5 stars 3 forks source link

compile error bldc.c:214: undefined reference to `blockPWM' #1

Open QGB opened 1 year ago

QGB commented 1 year ago
/all/home/qgb/github/GD32-hover-master-slave # make
arm-none-eabi-gcc -c -mcpu=cortex-m3 -mthumb   -DUSE_STDPERIPH_DRIVER -DGD32F130_150 -IInc -IDrivers/GD32F1x0_standard_peripheral/Include -IDrivers/CMSIS/Include -IDrivers/CMSIS  -Os -W
all -fdata-sections -ffunction-sections -g -gdwarf-2 -MMD -MP -MF"build/gd32f1x0_adc.d" -Wa,-a,-ad,-alms=build/gd32f1x0_adc.lst Drivers/GD32F1x0_standard_peripheral/Source/gd32f1x0_adc.
c -o build/gd32f1x0_adc.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -mthumb   -DUSE_STDPERIPH_DRIVER -DGD32F130_150 -IInc -IDrivers/GD32F1x0_standard_peripheral/Include -IDrivers/CMSIS/Include -IDrivers/CMSIS  -Os -W
all -fdata-sections -ffunction-sections -g -gdwarf-2 -MMD -MP -MF"build/gd32f1x0_can.d" -Wa,-a,-ad,-alms=build/gd32f1x0_can.lst Drivers/GD32F1x0_standard_peripheral/Source/gd32f1x0_can.
c -o build/gd32f1x0_can.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -mthumb   -DUSE_STDPERIPH_DRIVER -DGD32F130_150 -IInc -IDrivers/GD32F1x0_standard_peripheral/Include -IDrivers/CMSIS/Include -IDrivers/CMSIS  -Os -W
all -fdata-sections -ffunction-sections -g -gdwarf-2 -MMD -MP -MF"build/gd32f1x0_cec.d" -Wa,-a,-ad,-alms=build/gd32f1x0_cec.lst Drivers/GD32F1x0_standard_peripheral/Source/gd32f1x0_cec.
c -o build/gd32f1x0_cec.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -mthumb   -DUSE_STDPERIPH_DRIVER -DGD32F130_150 -IInc -IDrivers/GD32F1x0_standard_peripheral/Include -IDrivers/CMSIS/Include -IDrivers/CMSIS  -Os -W
all -fdata-sections -ffunction-sections -g -gdwarf-2 -MMD -MP -MF"build/gd32f1x0_cmp.d" -Wa,-a,-ad,-alms=build/gd32f1x0_cmp.lst Drivers/GD32F1x0_standard_peripheral/Source/gd32f1x0_cmp.
c -o build/gd32f1x0_cmp.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -mthumb   -DUSE_STDPERIPH_DRIVER -DGD32F130_150 -IInc -IDrivers/GD32F1x0_standard_peripheral/Include -IDrivers/CMSIS/Include -IDrivers/CMSIS  -Os -W
all -fdata-sections -ffunction-sections -g -gdwarf-2 -MMD -MP -MF"build/gd32f1x0_crc.d" -Wa,-a,-ad,-alms=build/gd32f1x0_crc.lst Drivers/GD32F1x0_standard_peripheral/Source/gd32f1x0_crc.
c -o build/gd32f1x0_crc.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -mthumb   -DUSE_STDPERIPH_DRIVER -DGD32F130_150 -IInc -IDrivers/GD32F1x0_standard_peripheral/Include -IDrivers/CMSIS/Include -IDrivers/CMSIS  -Os -W
all -fdata-sections -ffunction-sections -g -gdwarf-2 -MMD -MP -MF"build/gd32f1x0_dac.d" -Wa,-a,-ad,-alms=build/gd32f1x0_dac.lst Drivers/GD32F1x0_standard_peripheral/Source/gd32f1x0_dac.
c -o build/gd32f1x0_dac.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -mthumb   -DUSE_STDPERIPH_DRIVER -DGD32F130_150 -IInc -IDrivers/GD32F1x0_standard_peripheral/Include -IDrivers/CMSIS/Include -IDrivers/CMSIS  -Os -W
all -fdata-sections -ffunction-sections -g -gdwarf-2 -MMD -MP -MF"build/gd32f1x0_dbg.d" -Wa,-a,-ad,-alms=build/gd32f1x0_dbg.lst Drivers/GD32F1x0_standard_peripheral/Source/gd32f1x0_dbg.
c -o build/gd32f1x0_dbg.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -mthumb   -DUSE_STDPERIPH_DRIVER -DGD32F130_150 -IInc -IDrivers/GD32F1x0_standard_peripheral/Include -IDrivers/CMSIS/Include -IDrivers/CMSIS  -Os -W
all -fdata-sections -ffunction-sections -g -gdwarf-2 -MMD -MP -MF"build/gd32f1x0_dma.d" -Wa,-a,-ad,-alms=build/gd32f1x0_dma.lst Drivers/GD32F1x0_standard_peripheral/Source/gd32f1x0_dma.
c -o build/gd32f1x0_dma.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -mthumb   -DUSE_STDPERIPH_DRIVER -DGD32F130_150 -IInc -IDrivers/GD32F1x0_standard_peripheral/Include -IDrivers/CMSIS/Include -IDrivers/CMSIS  -Os -W
all -fdata-sections -ffunction-sections -g -gdwarf-2 -MMD -MP -MF"build/gd32f1x0_exti.d" -Wa,-a,-ad,-alms=build/gd32f1x0_exti.lst Drivers/GD32F1x0_standard_peripheral/Source/gd32f1x0_ex
ti.c -o build/gd32f1x0_exti.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -mthumb   -DUSE_STDPERIPH_DRIVER -DGD32F130_150 -IInc -IDrivers/GD32F1x0_standard_peripheral/Include -IDrivers/CMSIS/Include -IDrivers/CMSIS  -Os -W
all -fdata-sections -ffunction-sections -g -gdwarf-2 -MMD -MP -MF"build/gd32f1x0_fmc.d" -Wa,-a,-ad,-alms=build/gd32f1x0_fmc.lst Drivers/GD32F1x0_standard_peripheral/Source/gd32f1x0_fmc.
c -o build/gd32f1x0_fmc.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -mthumb   -DUSE_STDPERIPH_DRIVER -DGD32F130_150 -IInc -IDrivers/GD32F1x0_standard_peripheral/Include -IDrivers/CMSIS/Include -IDrivers/CMSIS  -Os -W
all -fdata-sections -ffunction-sections -g -gdwarf-2 -MMD -MP -MF"build/gd32f1x0_fwdgt.d" -Wa,-a,-ad,-alms=build/gd32f1x0_fwdgt.lst Drivers/GD32F1x0_standard_peripheral/Source/gd32f1x0_
fwdgt.c -o build/gd32f1x0_fwdgt.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -mthumb   -DUSE_STDPERIPH_DRIVER -DGD32F130_150 -IInc -IDrivers/GD32F1x0_standard_peripheral/Include -IDrivers/CMSIS/Include -IDrivers/CMSIS  -Os -W
all -fdata-sections -ffunction-sections -g -gdwarf-2 -MMD -MP -MF"build/gd32f1x0_gpio.d" -Wa,-a,-ad,-alms=build/gd32f1x0_gpio.lst Drivers/GD32F1x0_standard_peripheral/Source/gd32f1x0_gp
io.c -o build/gd32f1x0_gpio.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -mthumb   -DUSE_STDPERIPH_DRIVER -DGD32F130_150 -IInc -IDrivers/GD32F1x0_standard_peripheral/Include -IDrivers/CMSIS/Include -IDrivers/CMSIS  -Os -W
all -fdata-sections -ffunction-sections -g -gdwarf-2 -MMD -MP -MF"build/gd32f1x0_i2c.d" -Wa,-a,-ad,-alms=build/gd32f1x0_i2c.lst Drivers/GD32F1x0_standard_peripheral/Source/gd32f1x0_i2c.
c -o build/gd32f1x0_i2c.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -mthumb   -DUSE_STDPERIPH_DRIVER -DGD32F130_150 -IInc -IDrivers/GD32F1x0_standard_peripheral/Include -IDrivers/CMSIS/Include -IDrivers/CMSIS  -Os -W
all -fdata-sections -ffunction-sections -g -gdwarf-2 -MMD -MP -MF"build/gd32f1x0_ivref.d" -Wa,-a,-ad,-alms=build/gd32f1x0_ivref.lst Drivers/GD32F1x0_standard_peripheral/Source/gd32f1x0_
ivref.c -o build/gd32f1x0_ivref.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -mthumb   -DUSE_STDPERIPH_DRIVER -DGD32F130_150 -IInc -IDrivers/GD32F1x0_standard_peripheral/Include -IDrivers/CMSIS/Include -IDrivers/CMSIS  -Os -W
all -fdata-sections -ffunction-sections -g -gdwarf-2 -MMD -MP -MF"build/gd32f1x0_misc.d" -Wa,-a,-ad,-alms=build/gd32f1x0_misc.lst Drivers/GD32F1x0_standard_peripheral/Source/gd32f1x0_mi
sc.c -o build/gd32f1x0_misc.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -mthumb   -DUSE_STDPERIPH_DRIVER -DGD32F130_150 -IInc -IDrivers/GD32F1x0_standard_peripheral/Include -IDrivers/CMSIS/Include -IDrivers/CMSIS  -Os -W
all -fdata-sections -ffunction-sections -g -gdwarf-2 -MMD -MP -MF"build/gd32f1x0_opa.d" -Wa,-a,-ad,-alms=build/gd32f1x0_opa.lst Drivers/GD32F1x0_standard_peripheral/Source/gd32f1x0_opa.
c -o build/gd32f1x0_opa.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -mthumb   -DUSE_STDPERIPH_DRIVER -DGD32F130_150 -IInc -IDrivers/GD32F1x0_standard_peripheral/Include -IDrivers/CMSIS/Include -IDrivers/CMSIS  -Os -W
all -fdata-sections -ffunction-sections -g -gdwarf-2 -MMD -MP -MF"build/gd32f1x0_pmu.d" -Wa,-a,-ad,-alms=build/gd32f1x0_pmu.lst Drivers/GD32F1x0_standard_peripheral/Source/gd32f1x0_pmu.
c -o build/gd32f1x0_pmu.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -mthumb   -DUSE_STDPERIPH_DRIVER -DGD32F130_150 -IInc -IDrivers/GD32F1x0_standard_peripheral/Include -IDrivers/CMSIS/Include -IDrivers/CMSIS  -Os -W
all -fdata-sections -ffunction-sections -g -gdwarf-2 -MMD -MP -MF"build/gd32f1x0_rcu.d" -Wa,-a,-ad,-alms=build/gd32f1x0_rcu.lst Drivers/GD32F1x0_standard_peripheral/Source/gd32f1x0_rcu.
c -o build/gd32f1x0_rcu.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -mthumb   -DUSE_STDPERIPH_DRIVER -DGD32F130_150 -IInc -IDrivers/GD32F1x0_standard_peripheral/Include -IDrivers/CMSIS/Include -IDrivers/CMSIS  -Os -W
all -fdata-sections -ffunction-sections -g -gdwarf-2 -MMD -MP -MF"build/gd32f1x0_rtc.d" -Wa,-a,-ad,-alms=build/gd32f1x0_rtc.lst Drivers/GD32F1x0_standard_peripheral/Source/gd32f1x0_rtc.
c -o build/gd32f1x0_rtc.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -mthumb   -DUSE_STDPERIPH_DRIVER -DGD32F130_150 -IInc -IDrivers/GD32F1x0_standard_peripheral/Include -IDrivers/CMSIS/Include -IDrivers/CMSIS  -Os -W
all -fdata-sections -ffunction-sections -g -gdwarf-2 -MMD -MP -MF"build/gd32f1x0_slcd.d" -Wa,-a,-ad,-alms=build/gd32f1x0_slcd.lst Drivers/GD32F1x0_standard_peripheral/Source/gd32f1x0_sl
cd.c -o build/gd32f1x0_slcd.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -mthumb   -DUSE_STDPERIPH_DRIVER -DGD32F130_150 -IInc -IDrivers/GD32F1x0_standard_peripheral/Include -IDrivers/CMSIS/Include -IDrivers/CMSIS  -Os -W
all -fdata-sections -ffunction-sections -g -gdwarf-2 -MMD -MP -MF"build/gd32f1x0_spi.d" -Wa,-a,-ad,-alms=build/gd32f1x0_spi.lst Drivers/GD32F1x0_standard_peripheral/Source/gd32f1x0_spi.
c -o build/gd32f1x0_spi.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -mthumb   -DUSE_STDPERIPH_DRIVER -DGD32F130_150 -IInc -IDrivers/GD32F1x0_standard_peripheral/Include -IDrivers/CMSIS/Include -IDrivers/CMSIS  -Os -W
all -fdata-sections -ffunction-sections -g -gdwarf-2 -MMD -MP -MF"build/gd32f1x0_syscfg.d" -Wa,-a,-ad,-alms=build/gd32f1x0_syscfg.lst Drivers/GD32F1x0_standard_peripheral/Source/gd32f1x
0_syscfg.c -o build/gd32f1x0_syscfg.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -mthumb   -DUSE_STDPERIPH_DRIVER -DGD32F130_150 -IInc -IDrivers/GD32F1x0_standard_peripheral/Include -IDrivers/CMSIS/Include -IDrivers/CMSIS  -Os -W
all -fdata-sections -ffunction-sections -g -gdwarf-2 -MMD -MP -MF"build/gd32f1x0_timer.d" -Wa,-a,-ad,-alms=build/gd32f1x0_timer.lst Drivers/GD32F1x0_standard_peripheral/Source/gd32f1x0_
timer.c -o build/gd32f1x0_timer.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -mthumb   -DUSE_STDPERIPH_DRIVER -DGD32F130_150 -IInc -IDrivers/GD32F1x0_standard_peripheral/Include -IDrivers/CMSIS/Include -IDrivers/CMSIS  -Os -W
all -fdata-sections -ffunction-sections -g -gdwarf-2 -MMD -MP -MF"build/gd32f1x0_tsi.d" -Wa,-a,-ad,-alms=build/gd32f1x0_tsi.lst Drivers/GD32F1x0_standard_peripheral/Source/gd32f1x0_tsi.
c -o build/gd32f1x0_tsi.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -mthumb   -DUSE_STDPERIPH_DRIVER -DGD32F130_150 -IInc -IDrivers/GD32F1x0_standard_peripheral/Include -IDrivers/CMSIS/Include -IDrivers/CMSIS  -Os -W
all -fdata-sections -ffunction-sections -g -gdwarf-2 -MMD -MP -MF"build/gd32f1x0_usart.d" -Wa,-a,-ad,-alms=build/gd32f1x0_usart.lst Drivers/GD32F1x0_standard_peripheral/Source/gd32f1x0_
usart.c -o build/gd32f1x0_usart.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -mthumb   -DUSE_STDPERIPH_DRIVER -DGD32F130_150 -IInc -IDrivers/GD32F1x0_standard_peripheral/Include -IDrivers/CMSIS/Include -IDrivers/CMSIS  -Os -W
all -fdata-sections -ffunction-sections -g -gdwarf-2 -MMD -MP -MF"build/gd32f1x0_wwdgt.d" -Wa,-a,-ad,-alms=build/gd32f1x0_wwdgt.lst Drivers/GD32F1x0_standard_peripheral/Source/gd32f1x0_
wwdgt.c -o build/gd32f1x0_wwdgt.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -mthumb   -DUSE_STDPERIPH_DRIVER -DGD32F130_150 -IInc -IDrivers/GD32F1x0_standard_peripheral/Include -IDrivers/CMSIS/Include -IDrivers/CMSIS  -Os -W
all -fdata-sections -ffunction-sections -g -gdwarf-2 -MMD -MP -MF"build/system_gd32f1x0.d" -Wa,-a,-ad,-alms=build/system_gd32f1x0.lst Drivers/CMSIS/Source/system_gd32f1x0.c -o build/sys
tem_gd32f1x0.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -mthumb   -DUSE_STDPERIPH_DRIVER -DGD32F130_150 -IInc -IDrivers/GD32F1x0_standard_peripheral/Include -IDrivers/CMSIS/Include -IDrivers/CMSIS  -Os -W
all -fdata-sections -ffunction-sections -g -gdwarf-2 -MMD -MP -MF"build/main.d" -Wa,-a,-ad,-alms=build/main.lst Src/main.c -o build/main.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -mthumb   -DUSE_STDPERIPH_DRIVER -DGD32F130_150 -IInc -IDrivers/GD32F1x0_standard_peripheral/Include -IDrivers/CMSIS/Include -IDrivers/CMSIS  -Os -W
all -fdata-sections -ffunction-sections -g -gdwarf-2 -MMD -MP -MF"build/bldc.d" -Wa,-a,-ad,-alms=build/bldc.lst Src/bldc.c -o build/bldc.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -mthumb   -DUSE_STDPERIPH_DRIVER -DGD32F130_150 -IInc -IDrivers/GD32F1x0_standard_peripheral/Include -IDrivers/CMSIS/Include -IDrivers/CMSIS  -Os -W
all -fdata-sections -ffunction-sections -g -gdwarf-2 -MMD -MP -MF"build/commsMasterSlave.d" -Wa,-a,-ad,-alms=build/commsMasterSlave.lst Src/commsMasterSlave.c -o build/commsMasterSlave.
o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -mthumb   -DUSE_STDPERIPH_DRIVER -DGD32F130_150 -IInc -IDrivers/GD32F1x0_standard_peripheral/Include -IDrivers/CMSIS/Include -IDrivers/CMSIS  -Os -W
all -fdata-sections -ffunction-sections -g -gdwarf-2 -MMD -MP -MF"build/led.d" -Wa,-a,-ad,-alms=build/led.lst Src/led.c -o build/led.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -mthumb   -DUSE_STDPERIPH_DRIVER -DGD32F130_150 -IInc -IDrivers/GD32F1x0_standard_peripheral/Include -IDrivers/CMSIS/Include -IDrivers/CMSIS  -Os -W
all -fdata-sections -ffunction-sections -g -gdwarf-2 -MMD -MP -MF"build/comms.d" -Wa,-a,-ad,-alms=build/comms.lst Src/comms.c -o build/comms.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -mthumb   -DUSE_STDPERIPH_DRIVER -DGD32F130_150 -IInc -IDrivers/GD32F1x0_standard_peripheral/Include -IDrivers/CMSIS/Include -IDrivers/CMSIS  -Os -W
all -fdata-sections -ffunction-sections -g -gdwarf-2 -MMD -MP -MF"build/commsSteering.d" -Wa,-a,-ad,-alms=build/commsSteering.lst Src/commsSteering.c -o build/commsSteering.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -mthumb   -DUSE_STDPERIPH_DRIVER -DGD32F130_150 -IInc -IDrivers/GD32F1x0_standard_peripheral/Include -IDrivers/CMSIS/Include -IDrivers/CMSIS  -Os -W
all -fdata-sections -ffunction-sections -g -gdwarf-2 -MMD -MP -MF"build/commsBluetooth.d" -Wa,-a,-ad,-alms=build/commsBluetooth.lst Src/commsBluetooth.c -o build/commsBluetooth.o
Src/commsBluetooth.c: In function 'SendBluetoothDevice':
Src/commsBluetooth.c:267:20: warning: '%05d' directive writing between 5 and 6 bytes into a region of size 5 [-Wformat-overflow=]
  267 |  sprintf(charVal, "%05d", value);
      |                    ^~~~
Src/commsBluetooth.c:267:19: note: directive argument in the range [-32768, 32767]
  267 |  sprintf(charVal, "%05d", value);
      |                   ^~~~~~
Src/commsBluetooth.c:267:2: note: 'sprintf' output between 6 and 7 bytes into a destination of size 5
  267 |  sprintf(charVal, "%05d", value);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arm-none-eabi-gcc -c -mcpu=cortex-m3 -mthumb   -DUSE_STDPERIPH_DRIVER -DGD32F130_150 -IInc -IDrivers/GD32F1x0_standard_peripheral/Include -IDrivers/CMSIS/Include -IDrivers/CMSIS  -Os -W
all -fdata-sections -ffunction-sections -g -gdwarf-2 -MMD -MP -MF"build/it.d" -Wa,-a,-ad,-alms=build/it.lst Src/it.c -o build/it.o
arm-none-eabi-gcc -c -mcpu=cortex-m3 -mthumb   -DUSE_STDPERIPH_DRIVER -DGD32F130_150 -IInc -IDrivers/GD32F1x0_standard_peripheral/Include -IDrivers/CMSIS/Include -IDrivers/CMSIS  -Os -W
all -fdata-sections -ffunction-sections -g -gdwarf-2 -MMD -MP -MF"build/setup.d" -Wa,-a,-ad,-alms=build/setup.lst Src/setup.c -o build/setup.o
arm-none-eabi-gcc -x assembler-with-cpp -c -mcpu=cortex-m3 -mthumb   -DUSE_STDPERIPH_DRIVER -DGD32F130_150 -IInc -IDrivers/GD32F1x0_standard_peripheral/Include -IDrivers/CMSIS/Include -
IDrivers/CMSIS  -Os -Wall -fdata-sections -ffunction-sections -g -gdwarf-2 -MMD -MP -MF"build/startup_gd32f1x0.d" startup_gd32f1x0.s -o build/startup_gd32f1x0.o
arm-none-eabi-gcc build/gd32f1x0_adc.o build/gd32f1x0_can.o build/gd32f1x0_cec.o build/gd32f1x0_cmp.o build/gd32f1x0_crc.o build/gd32f1x0_dac.o build/gd32f1x0_dbg.o build/gd32f1x0_dma.o
 build/gd32f1x0_exti.o build/gd32f1x0_fmc.o build/gd32f1x0_fwdgt.o build/gd32f1x0_gpio.o build/gd32f1x0_i2c.o build/gd32f1x0_ivref.o build/gd32f1x0_misc.o build/gd32f1x0_opa.o build/gd3
2f1x0_pmu.o build/gd32f1x0_rcu.o build/gd32f1x0_rtc.o build/gd32f1x0_slcd.o build/gd32f1x0_spi.o build/gd32f1x0_syscfg.o build/gd32f1x0_timer.o build/gd32f1x0_tsi.o build/gd32f1x0_usart
.o build/gd32f1x0_wwdgt.o build/system_gd32f1x0.o build/main.o build/bldc.o build/commsMasterSlave.o build/led.o build/comms.o build/commsSteering.o build/commsBluetooth.o build/it.o bu
ild/setup.o build/startup_gd32f1x0.o -mcpu=cortex-m3 -mthumb   -specs=nano.specs -TGD32F130C6T_FLASH.ld  -lc -lm -lnosys  -Wl,-Map=build/firmware.map,--cref -Wl,--gc-sections -o build/f
irmware.elf
/tools/toolchain/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld: build/bldc.o: in function `CalculateBLDC':
/all/home/qgb/github/GD32-hover-master-slave/Src/bldc.c:214: undefined reference to `blockPWM'
collect2: error: ld returned 1 exit status
make: *** [Makefile:185: build/firmware.elf] Error 1
weiminshen99 commented 1 year ago

Could you please provide some comments? I cannot reproduce this on my end.

QGB commented 1 year ago

my compile env:


IDE-Version:
μVision V5.38.0.0
Copyright (C) 2022 ARM Ltd and ARM Germany GmbH. All rights reserved.

License Information:
cs qgb

Tool Version Numbers:
Toolchain:        MDK-ARM Plus  Version: 5.38.0.0
Toolchain Path:    C:\Keil_v5\ARM\ARMCLANG\Bin
C Compiler:         ArmClang.exe        V6.19
Assembler:          Armasm.exe        V6.19
Linker/Locator:     ArmLink.exe        V6.19
Library Manager:    ArmAr.exe        V6.19
Hex Converter:      FromElf.exe        V6.19
CPU DLL:               SARMCM3.DLL          V5.38.0.0
Dialog DLL:         TCM.DLL              V1.56.4.0
Target DLL:             CMSIS_AGDI.dll       V1.33.15.0
Dialog DLL:         TCM.DLL              V1.56.4.0
weiminshen99 commented 1 year ago

Thanks for your info. This repository is for using Makefile only. Since you are using Keli, please use the following original repository for compiling: https://github.com/flo199213/Hoverboard-Firmware-Hack-Gen2.

weiminshen99 commented 1 year ago

I have modified "blockPWM" from a "__INLINE" function to a regular function, and it should Make now. Please try again. Thanks!