Hi!
I want to make my own bootloader, but first of all i tryed to compile default bootloader with "make generic-pc13". Unfortunately I was unable to compile it.
Here is log
Linking: build/maple_boot.elf arm-none-eabi-gcc -mthumb -g -mcpu=cortex-m3 -mthumb-interwork -I. -Os -ffunction-sections -fdata-sections -Wall -Wimplicit -Wcast-align -Wpointer-arith -Wswitch -Wredundant-decls -Wreturn-type -Wshadow -Wunused -Wa,-adhlns=build/build/usb.lst -I./stm32_lib -I./usb_lib -DTARGET_STM32_SMART_V20 -MD -MP -MF .dep/maple_boot.elf.d build/stm32_lib/c_only_startup.o build/stm32_lib/cortexm3_macro.o build/usb.o build/usb_callbacks.o build/usb_descriptor.o build/main.o build/hardware.o build/dfu.o build/usb_lib/usb_regs.o build/usb_lib/usb_int.o build/usb_lib/usb_init.o build/usb_lib/usb_core.o build/usb_lib/usb_mem.o --output build/maple_boot.elf -nostartfiles -Wl,-Map=build/maple_boot.map,--cref,--gc-sections -lc -lgcc -Tstm32_lib/c_only_md_high_density.ld /usr/lib/gcc/arm-none-eabi/12.2.1/../../../arm-none-eabi/bin/ld: build/usb_descriptor.o:/home/gonzales/STM32duino-bootloader-master/usb.h:44: multiple definition ofwTransferSize'; build/usb.o:/home/gonzales/STM32duino-bootloader-master/usb.h:44: first defined here
/usr/lib/gcc/arm-none-eabi/12.2.1/../../../arm-none-eabi/bin/ld: build/main.o:/home/gonzales/STM32duino-bootloader-master/usb.h:44: multiple definition of wTransferSize'; build/usb.o:/home/gonzales/STM32duino-bootloader-master/usb.h:44: first defined here /usr/lib/gcc/arm-none-eabi/12.2.1/../../../arm-none-eabi/bin/ld: build/hardware.o:/home/gonzales/STM32duino-bootloader-master/usb.h:44: multiple definition ofwTransferSize'; build/usb.o:/home/gonzales/STM32duino-bootloader-master/usb.h:44: first defined here
/usr/lib/gcc/arm-none-eabi/12.2.1/../../../arm-none-eabi/bin/ld: build/dfu.o:/home/gonzales/STM32duino-bootloader-master/usb.h:44: multiple definition of wTransferSize'; build/usb.o:/home/gonzales/STM32duino-bootloader-master/usb.h:44: first defined here collect2: error: ld returned 1 exit status make: *** [Makefile:537: build/maple_boot.elf] Error 1
Please help me to understand, what is wrong
Hi! I want to make my own bootloader, but first of all i tryed to compile default bootloader with "make generic-pc13". Unfortunately I was unable to compile it.
Here is log
Linking: build/maple_boot.elf arm-none-eabi-gcc -mthumb -g -mcpu=cortex-m3 -mthumb-interwork -I. -Os -ffunction-sections -fdata-sections -Wall -Wimplicit -Wcast-align -Wpointer-arith -Wswitch -Wredundant-decls -Wreturn-type -Wshadow -Wunused -Wa,-adhlns=build/build/usb.lst -I./stm32_lib -I./usb_lib -DTARGET_STM32_SMART_V20 -MD -MP -MF .dep/maple_boot.elf.d build/stm32_lib/c_only_startup.o build/stm32_lib/cortexm3_macro.o build/usb.o build/usb_callbacks.o build/usb_descriptor.o build/main.o build/hardware.o build/dfu.o build/usb_lib/usb_regs.o build/usb_lib/usb_int.o build/usb_lib/usb_init.o build/usb_lib/usb_core.o build/usb_lib/usb_mem.o --output build/maple_boot.elf -nostartfiles -Wl,-Map=build/maple_boot.map,--cref,--gc-sections -lc -lgcc -Tstm32_lib/c_only_md_high_density.ld /usr/lib/gcc/arm-none-eabi/12.2.1/../../../arm-none-eabi/bin/ld: build/usb_descriptor.o:/home/gonzales/STM32duino-bootloader-master/usb.h:44: multiple definition of
wTransferSize'; build/usb.o:/home/gonzales/STM32duino-bootloader-master/usb.h:44: first defined here /usr/lib/gcc/arm-none-eabi/12.2.1/../../../arm-none-eabi/bin/ld: build/main.o:/home/gonzales/STM32duino-bootloader-master/usb.h:44: multiple definition ofwTransferSize'; build/usb.o:/home/gonzales/STM32duino-bootloader-master/usb.h:44: first defined here /usr/lib/gcc/arm-none-eabi/12.2.1/../../../arm-none-eabi/bin/ld: build/hardware.o:/home/gonzales/STM32duino-bootloader-master/usb.h:44: multiple definition of
wTransferSize'; build/usb.o:/home/gonzales/STM32duino-bootloader-master/usb.h:44: first defined here /usr/lib/gcc/arm-none-eabi/12.2.1/../../../arm-none-eabi/bin/ld: build/dfu.o:/home/gonzales/STM32duino-bootloader-master/usb.h:44: multiple definition ofwTransferSize'; build/usb.o:/home/gonzales/STM32duino-bootloader-master/usb.h:44: first defined here collect2: error: ld returned 1 exit status make: *** [Makefile:537: build/maple_boot.elf] Error 1
Please help me to understand, what is wrong