Relocation R_ARM_ABS32 to weak symbol *** is invalid

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Relocation R_ARM_ABS32 to weak symbol *** is invalid

      Hi,

      I've imported an IAR project, with no configuration modification, while linking I got 'Relocation R_ARM_ABS32 to weak symbol '****' is invalid' error.

      segger-as: version 2.10 segger-cc: version 10.6.2 segger-ld: version 3.04

      The functions are defined as weak :
      __attribute__ ((weak)) void tud_cdc_rx_cb(uint8_t itf)

      No matter the weak function is implemented or not, this error is generated.

      Linker command:
      "C:/Program Files/SEGGER/SEGGER Embedded Studio for ARM 5.10a/bin/segger-ld" --add-region:FLASH1=0x00020000@0x08000000 --add-region:RAM1=0x00005000@0x20000000 --defsym=__STACKSIZE__=1024 --defsym=__STACKSIZE_PROCESS__=0 --defsym=__HEAPSIZE__=1024 --full-section-headers -ereset_handler -EL -mcpu=6-M --defsym=__SEGGER_RTL_vfprintf=__SEGGER_RTL_vfprintf_int_nwp --defsym=__SEGGER_RTL_vfscanf=__SEGGER_RTL_vfscanf_int --defsym=getchar=getchar_semihost --defsym=putchar=putchar_semihost --defsym=gets=gets_semihost --defsym=puts=puts_semihost --defsym=printf=printf_semihost_formatted --defsym=scanf=scanf_semihost --defsym=vprintf=vprintf_semihost --defsym=vscanf=vscanf_semihost --silent --list-all-undefineds --fatal-warnings --gc-sections -TE:/mcu/stm32l0/Project/Sensor_Hub/EWARM/SEGGER_Flash.icf --map-text "--map-file=Output/Sensor_Hub Internal/Exe/Sensor_Hub.map" --map-standard -u_vectors -o "Output/Sensor_Hub Internal/Exe/Sensor_Hub.elf" --emit-relocs --start-group "@E:/mcu/stm32l0/Project/Sensor_Hub/EWARM/Output/Sensor_Hub Sensor_Hub Internal/Obj/Sensor_Hub.ind" --end-group

      Compiler command:
      "C:/Program Files/SEGGER/SEGGER Embedded Studio for ARM 5.10a/gcc/arm-none-eabi/bin/cc1" -fmessage-length=0 -fno-diagnostics-show-caret -mcpu=cortex-m0 -mlittle-endian -mfloat-abi=soft -mthumb -mtp=soft -mno-unaligned-access -nostdinc "-isystemC:/Program Files/SEGGER/SEGGER Embedded Studio for ARM 5.10a/segger-rtl/include" "-isystemC:/Program Files/SEGGER/SEGGER Embedded Studio for ARM 5.10a/include" -I./.. -I./../../../../STM32Cube/STM32Cube_FW_L0_V1.11.2/Drivers/STM32L0xx_HAL_Driver/Inc -I./../../../../STM32Cube/STM32Cube_FW_L0_V1.11.2/Drivers/CMSIS/Device/ST/STM32L0xx/Include -I./../../../../STM32Cube/STM32Cube_FW_L0_V1.11.2/Drivers/CMSIS/Include -I./../../../../msk_lib -I./../../../../msk_lib/drv/sx1276 -I./../../../../tinyusb/src -D__SIZEOF_WCHAR_T=4 -D__ARM_ARCH_6M__ -D__SES_ARM -D__HEAP_SIZE__=1024 -D__SES_VERSION=51001 -D__SEGGER_LINKER -DSTM32L072xx -MD "E:/mcu/stm32l0/Project/Sensor_Hub/EWARM/Output/Sensor_Hub Sensor_Hub Internal/Obj/cdc_device.d" -MQ "Output/Sensor_Hub Sensor_Hub Internal/Obj/cdc_device.o" -quiet -std=gnu99 -g2 -gpubnames -fomit-frame-pointer -fno-dwarf2-cfi-asm -fno-builtin -ffunction-sections -fdata-sections -fshort-enums -fno-common E:\mcu\tinyusb\src\class\cdc\cdc_device.c -o "E:/mcu/stm32l0/Project/Sensor_Hub/EWARM/Output/Sensor_Hub Sensor_Hub Internal/Obj/cdc_device.asm"
      "C:/Program Files/SEGGER/SEGGER Embedded Studio for ARM 5.10a/gcc/arm-none-eabi/bin/as" --traditional-format -I./.. -I./../../../../STM32Cube/STM32Cube_FW_L0_V1.11.2/Drivers/STM32L0xx_HAL_Driver/Inc -I./../../../../STM32Cube/STM32Cube_FW_L0_V1.11.2/Drivers/CMSIS/Device/ST/STM32L0xx/Include -I./../../../../STM32Cube/STM32Cube_FW_L0_V1.11.2/Drivers/CMSIS/Include -I./../../../../msk_lib -I./../../../../msk_lib/drv/sx1276 -I./../../../../tinyusb/src -mcpu=cortex-m0 -mlittle-endian -mfloat-abi=soft -mthumb "E:/mcu/stm32l0/Project/Sensor_Hub/EWARM/Output/Sensor_Hub Sensor_Hub Internal/Obj/cdc_device.asm" -o "Output/Sensor_Hub Sensor_Hub Internal/Obj/cdc_device.o"