Skip to main content
Associate
September 30, 2026
Question

Unable to include st25r3916Isr (st25r3916 NFC library) function into main code , got dangerous relocation: unsupported relocation.

  • September 30, 2026
  • 2 replies
  • 9 views

Dear all,

I am facing some compiling issue on STM32CUBEIDE 2.2.0 with STM32G071KB

I was trying to use st25r3916B NFC library and i have added ST/RFAL/Include & sources and relevant middleware into path & symbol of project.

However during build,

../Debug/../Core/Src/stm32g0xx_it.c:161:(.text.EXTI4_15_IRQHandler+0x14): undefined reference to `st25r3916Isr'

C:/ST/STM32CubeIDE_1.16.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.14.3.rel1.win32_1.0.100.202602081740/tools/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld.exe: (st25r3916Isr): Unknown destination type (ARM/Thumb) in ./Core/Src/stm32g0xx_it.o

../Debug/../Core/Src/stm32g0xx_it.c:161:(.text.EXTI4_15_IRQHandler+0x14): dangerous relocation: unsupported relocation

collect2.exe: error: ld returned 1 exit status

make: *** [makefile:64: MCU_STM32G071KBU6.elf] Error 1
 


Need advice please! Thanks.

My code is reference from the ST25NFC_Embedded_Lib_ST25R3916(B)_1.8.0 and the reference code was able to build successfully.

2 replies

ST Technical Moderator
October 2, 2026

Hello @jqsam

Can you check if the source file containing st25r3916Isr() is not excluded from build.

Regards.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
Andrew Neil
Super User
October 2, 2026

This “dangerous relocation: unsupported relocation” error has been discussed quite a lot recently:

https://community.st.com/search?q=dangerous+relocation%3A+unsupported+relocation

 

IIRC, it’s a compiler version issue ...

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.