joostrijneveld / STM32-getting-started

Short proof-of-concepts for STM32 boards using a very minimal interface
Creative Commons Zero v1.0 Universal
15 stars 4 forks source link

bug while compiling project for STM32F407 #1

Open weissbartleo opened 5 years ago

weissbartleo commented 5 years ago

arm-none-eabi-gcc -O3 -Wall -Wextra -Wimplicit-function-declaration -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes -Wundef -Wshadow -I../libopencm3/include -fno-common -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -MD -DSTM32F4 -o cyclecount.o -c cyclecount.c arm-none-eabi-gcc -o cyclecount.elf cyclecount.o stm32f4_wrapper.o --static -Wl,--start-group -lc -lgcc -lnosys -Wl,--end-group -T../libopencm3/lib/stm32/f4/stm32f405x6.ld -nostartfiles -Wl,--gc-sections,--print-gc-sections -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -L../libopencm3/lib -lopencm3_stm32f4 /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: error: cyclecount.elf uses VFP register arguments, /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libc.a(lib_a-sprintf.o) does not /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libc.a(lib_a-sprintf.o) /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: error: cyclecount.elf uses VFP register arguments, /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libc.a(lib_a-svfprintf.o) does not /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libc.a(lib_a-svfprintf.o) /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: error: cyclecount.elf uses VFP register arguments, /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libc.a(lib_a-dtoa.o) does not /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libc.a(lib_a-dtoa.o) /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: error: cyclecount.elf uses VFP register arguments, /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libc.a(lib_a-impure.o) does not /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libc.a(lib_a-impure.o) /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: error: cyclecount.elf uses VFP register arguments, /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libc.a(lib_a-locale.o) does not /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libc.a(lib_a-locale.o) /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: error: cyclecount.elf uses VFP register arguments, /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libc.a(lib_a-mallocr.o) does not /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libc.a(lib_a-mallocr.o) /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: error: cyclecount.elf uses VFP register arguments, /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libc.a(lib_a-memchr-stub.o) does not /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libc.a(lib_a-memchr-stub.o) /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: error: cyclecount.elf uses VFP register arguments, /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libc.a(lib_a-memcpy-stub.o) does not /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libc.a(lib_a-memcpy-stub.o) /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: error: cyclecount.elf uses VFP register arguments, /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libc.a(lib_a-mlock.o) does not /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libc.a(lib_a-mlock.o) /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: error: cyclecount.elf uses VFP register arguments, /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libc.a(lib_a-mprec.o) does not /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libc.a(lib_a-mprec.o) /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: error: cyclecount.elf uses VFP register arguments, /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libc.a(lib_a-sbrkr.o) does not /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libc.a(lib_a-sbrkr.o) /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: error: cyclecount.elf uses VFP register arguments, /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libc.a(lib_a-strlen-stub.o) does not /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libc.a(lib_a-strlen-stub.o) /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: error: cyclecount.elf uses VFP register arguments, /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libc.a(lib_a-svfiprintf.o) does not /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libc.a(lib_a-svfiprintf.o) /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: error: cyclecount.elf uses VFP register arguments, /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libc.a(lib_a-callocr.o) does not /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libc.a(lib_a-callocr.o) /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: error: cyclecount.elf uses VFP register arguments, /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libc.a(lib_a-freer.o) does not /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libc.a(lib_a-freer.o) /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: error: cyclecount.elf uses VFP register arguments, /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libc.a(lib_a-memmove.o) does not /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libc.a(lib_a-memmove.o) /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: error: cyclecount.elf uses VFP register arguments, /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libc.a(lib_a-memset.o) does not /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libc.a(lib_a-memset.o) /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: error: cyclecount.elf uses VFP register arguments, /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libc.a(lib_a-reallocr.o) does not /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libc.a(lib_a-reallocr.o) /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: error: cyclecount.elf uses VFP register arguments, /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libc.a(lib_a-reent.o) does not /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libc.a(lib_a-reent.o) /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: error: cyclecount.elf uses VFP register arguments, /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libnosys.a(sbrk.o) does not /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libnosys.a(sbrk.o) /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.rodata' in file '/usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libc.a(lib_a-impure.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.bss' in file '/usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libc.a(lib_a-locale.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text' in file '/usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libc.a(lib_a-reent.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.rcc_osc_ready_int_clear' in file '../libopencm3/lib/libopencm3_stm32f4.a(rcc.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.rcc_osc_ready_int_enable' in file '../libopencm3/lib/libopencm3_stm32f4.a(rcc.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.rcc_osc_ready_int_disable' in file '../libopencm3/lib/libopencm3_stm32f4.a(rcc.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.rcc_osc_ready_int_flag' in file '../libopencm3/lib/libopencm3_stm32f4.a(rcc.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.rcc_css_int_clear' in file '../libopencm3/lib/libopencm3_stm32f4.a(rcc.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.rcc_css_int_flag' in file '../libopencm3/lib/libopencm3_stm32f4.a(rcc.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.rcc_wait_for_sysclk_status' in file '../libopencm3/lib/libopencm3_stm32f4.a(rcc.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.rcc_css_enable' in file '../libopencm3/lib/libopencm3_stm32f4.a(rcc.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.rcc_css_disable' in file '../libopencm3/lib/libopencm3_stm32f4.a(rcc.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.rcc_pllsai_config' in file '../libopencm3/lib/libopencm3_stm32f4.a(rcc.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.rcc_pllsai_postscalers' in file '../libopencm3/lib/libopencm3_stm32f4.a(rcc.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.rcc_set_pll_source' in file '../libopencm3/lib/libopencm3_stm32f4.a(rcc.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.rcc_set_rtcpre' in file '../libopencm3/lib/libopencm3_stm32f4.a(rcc.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.rcc_set_main_pll_hsi' in file '../libopencm3/lib/libopencm3_stm32f4.a(rcc.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.rcc_system_clock_source' in file '../libopencm3/lib/libopencm3_stm32f4.a(rcc.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.rodata.rcc_hse_12mhz_3v3' in file '../libopencm3/lib/libopencm3_stm32f4.a(rcc.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.rodata.rcc_hse_16mhz_3v3' in file '../libopencm3/lib/libopencm3_stm32f4.a(rcc.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.rodata.rcc_hse_25mhz_3v3' in file '../libopencm3/lib/libopencm3_stm32f4.a(rcc.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.dma_get_interrupt_flag' in file '../libopencm3/lib/libopencm3_stm32f4.a(dma_common_f24.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.dma_disable_memory_increment_mode' in file '../libopencm3/lib/libopencm3_stm32f4.a(dma_common_f24.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.dma_enable_peripheral_increment_mode' in file '../libopencm3/lib/libopencm3_stm32f4.a(dma_common_f24.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.dma_enable_fixed_peripheral_increment_mode' in file '../libopencm3/lib/libopencm3_stm32f4.a(dma_common_f24.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.dma_enable_circular_mode' in file '../libopencm3/lib/libopencm3_stm32f4.a(dma_common_f24.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.dma_set_memory_burst' in file '../libopencm3/lib/libopencm3_stm32f4.a(dma_common_f24.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.dma_set_peripheral_burst' in file '../libopencm3/lib/libopencm3_stm32f4.a(dma_common_f24.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.dma_set_initial_target' in file '../libopencm3/lib/libopencm3_stm32f4.a(dma_common_f24.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.dma_get_target' in file '../libopencm3/lib/libopencm3_stm32f4.a(dma_common_f24.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.dma_enable_double_buffer_mode' in file '../libopencm3/lib/libopencm3_stm32f4.a(dma_common_f24.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.dma_disable_double_buffer_mode' in file '../libopencm3/lib/libopencm3_stm32f4.a(dma_common_f24.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.dma_set_peripheral_flow_control' in file '../libopencm3/lib/libopencm3_stm32f4.a(dma_common_f24.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.dma_set_dma_flow_control' in file '../libopencm3/lib/libopencm3_stm32f4.a(dma_common_f24.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.dma_enable_transfer_error_interrupt' in file '../libopencm3/lib/libopencm3_stm32f4.a(dma_common_f24.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.dma_enable_half_transfer_interrupt' in file '../libopencm3/lib/libopencm3_stm32f4.a(dma_common_f24.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.dma_disable_transfer_complete_interrupt' in file '../libopencm3/lib/libopencm3_stm32f4.a(dma_common_f24.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.dma_enable_direct_mode_error_interrupt' in file '../libopencm3/lib/libopencm3_stm32f4.a(dma_common_f24.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.dma_enable_fifo_error_interrupt' in file '../libopencm3/lib/libopencm3_stm32f4.a(dma_common_f24.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.dma_fifo_status' in file '../libopencm3/lib/libopencm3_stm32f4.a(dma_common_f24.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.dma_enable_direct_mode' in file '../libopencm3/lib/libopencm3_stm32f4.a(dma_common_f24.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.dma_enable_fifo_mode' in file '../libopencm3/lib/libopencm3_stm32f4.a(dma_common_f24.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.dma_set_fifo_threshold' in file '../libopencm3/lib/libopencm3_stm32f4.a(dma_common_f24.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.dma_set_memory_address_1' in file '../libopencm3/lib/libopencm3_stm32f4.a(dma_common_f24.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.dma_get_number_of_data' in file '../libopencm3/lib/libopencm3_stm32f4.a(dma_common_f24.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.gpio_set_output_options' in file '../libopencm3/lib/libopencm3_stm32f4.a(gpio_common_f0234.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.usart_disable' in file '../libopencm3/lib/libopencm3_stm32f4.a(usart_common_all.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.usart_enable_rx_interrupt' in file '../libopencm3/lib/libopencm3_stm32f4.a(usart_common_all.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.usart_disable_rx_interrupt' in file '../libopencm3/lib/libopencm3_stm32f4.a(usart_common_all.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.usart_enable_tx_interrupt' in file '../libopencm3/lib/libopencm3_stm32f4.a(usart_common_all.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.usart_disable_tx_interrupt' in file '../libopencm3/lib/libopencm3_stm32f4.a(usart_common_all.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.usart_enable_error_interrupt' in file '../libopencm3/lib/libopencm3_stm32f4.a(usart_common_all.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.usart_disable_error_interrupt' in file '../libopencm3/lib/libopencm3_stm32f4.a(usart_common_all.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.usart_get_flag' in file '../libopencm3/lib/libopencm3_stm32f4.a(usart_common_f124.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.rcc_peripheral_disable_clock' in file '../libopencm3/lib/libopencm3_stm32f4.a(rcc_common_all.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.rcc_peripheral_reset' in file '../libopencm3/lib/libopencm3_stm32f4.a(rcc_common_all.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.rcc_peripheral_clear_reset' in file '../libopencm3/lib/libopencm3_stm32f4.a(rcc_common_all.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.rcc_periph_clock_disable' in file '../libopencm3/lib/libopencm3_stm32f4.a(rcc_common_all.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.rcc_periph_reset_pulse' in file '../libopencm3/lib/libopencm3_stm32f4.a(rcc_common_all.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.rcc_periph_reset_hold' in file '../libopencm3/lib/libopencm3_stm32f4.a(rcc_common_all.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.rcc_periph_reset_release' in file '../libopencm3/lib/libopencm3_stm32f4.a(rcc_common_all.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.rcc_set_mco' in file '../libopencm3/lib/libopencm3_stm32f4.a(rcc_common_all.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.rcc_osc_bypass_enable' in file '../libopencm3/lib/libopencm3_stm32f4.a(rcc_common_all.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.rcc_osc_bypass_disable' in file '../libopencm3/lib/libopencm3_stm32f4.a(rcc_common_all.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.flash_prefetch_enable' in file '../libopencm3/lib/libopencm3_stm32f4.a(flash_common_all.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.flash_prefetch_disable' in file '../libopencm3/lib/libopencm3_stm32f4.a(flash_common_all.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.flash_unlock_option_bytes' in file '../libopencm3/lib/libopencm3_stm32f4.a(flash_common_all.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.flash_dcache_reset' in file '../libopencm3/lib/libopencm3_stm32f4.a(flash_common_idcache.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.flash_icache_reset' in file '../libopencm3/lib/libopencm3_stm32f4.a(flash_common_idcache.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.nvic_disable_irq' in file '../libopencm3/lib/libopencm3_stm32f4.a(nvic.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.nvic_get_pending_irq' in file '../libopencm3/lib/libopencm3_stm32f4.a(nvic.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.nvic_set_pending_irq' in file '../libopencm3/lib/libopencm3_stm32f4.a(nvic.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.nvic_clear_pending_irq' in file '../libopencm3/lib/libopencm3_stm32f4.a(nvic.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.nvic_get_irq_enabled' in file '../libopencm3/lib/libopencm3_stm32f4.a(nvic.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.nvic_set_priority' in file '../libopencm3/lib/libopencm3_stm32f4.a(nvic.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.nvic_get_active_irq' in file '../libopencm3/lib/libopencm3_stm32f4.a(nvic.o)' /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: Removing unused section '.text.nvic_generate_software_interrupt' in file '../libopencm3/lib/libopencm3_stm32f4.a(nvic.o)' collect2: error: ld returned 1 exit status ../common/make.mk:40: recipe for target 'cyclecount.elf' failed make: *** [cyclecount.elf] Error 1 rm cyclecount.o

Ko- commented 5 years ago

Hi! The toolchain is aware of two different ways of dealing with floating point numbers: simulating them with integer registers in software and using actual hardware floating point registers. The STM32F407 supports hardware floating point registers. In the Makefiles in this project, -mfloat-abi=hard is specified. That works fine, but the libc implementation that it tries to link against has been compiled using 'soft floats', and that doesn't mix. So you could either make sure you get a libc.a that was compiled with hard floats (there might be one in /usr/arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc.a), or to compile everything with soft floats, whatever seems easiest/best to you.

Do you actually need floating point instructions?

Ko- commented 5 years ago

We solved this out-of-band by going for a complete soft float setup. We solved it like this:

  1. In the libopencm3 directory, type make clean.
  2. In your code directory, type make clean. Make sure there is not a single .o file remaining that you're linking against.
  3. In the libopencm3 directory, type FP_FLAGS="-mfloat-abi=soft" make.
  4. In your code directory, change -mfloat-abi=hard in the Makefile to -mfloat-abi=soft.
  5. Type make.

Alternatively, one could execute FP_FLAGS="-mfloat-abi=soft" make -C $(OPENCM3_DIR) for the lib target in common/make.mk if we really want to make this the new default. In general, if you're using floating point numbers, the hard floats should be preferable.

mkannwischer commented 5 years ago

An alternative workaround is to install the most recent version of the toolchain from ARM directly [1] as described in [2]. I've successfully done that some time ago.

[1] https://developer.arm.com/open-source/gnu-toolchain/gnu-rm [2] https://unix.stackexchange.com/questions/453032/how-to-install-a-functional-arm-cross-gcc-toolchain-on-ubuntu-18-04/