Skip to main content
Visitor II
August 12, 2025
Solved

ST25R200 read/write examples - reent.h

  • August 12, 2025
  • 4 replies
  • 1062 views

Hello,

I am using the ST-25R200 ready-to-use NFC evaluation board for my application. I have already used the ST25R200 EVAL GUI software which functions without any problem. 

Since I want to develop my own software and integrate it for the application which requires to read/write to the NFC tags, I went through the forum and found out some much helpful ST25NFC_Embedded_Lib_ST25R200_1.8.0. After installing, I went through the example ndef_read.c and ndef_write.c codes (which are very thorough in and of themselves).

I am trying to use these codes along with the required drivers and header files using VS code. I have properly included the paths for all the required headers. However, while compiling I am getting the error: reent.h source file (dependency of rfal_nfc.h) could not be opened. I am also unable to find the said header file in the installed embedded library folder.

Request for any help, since I am a novice in programming microcontrollers

    This topic has been closed for replies.
    Best answer by Atomic1

    Hi,

    Regarding the reent.h topic, I resolved it in the FreeRTOS.h file where it was actually defined.

    The flag when configUSE_NEWLIB_REENTRANT set to false (in the FreeRTOS.h file) actually disables the include statement for the reent.h. It was mentioned in one of the previous replies that RFAL doesn't include it actually which is true. I was using the exact code for ndef_read.c from the documentation directly (and that too in VS code) without generating the required STEVAL 25R200 specific codes from the CubeMX. I rectified it after using the STM32Cube IDE and then using the generated code and later embedding the read/write example in it.

    4 replies

    ST Employee
    August 13, 2025

    Hello @Atomic1,

    This post has been escalated to the ST Online Support Team for additional assistance. We'll contact you directly.

    Best regards,
    Maxime

    Technical Moderator
    August 20, 2025

    Hi,

    reent.h is not directly included by RFAL code. It sounds more like a clib issue. Maybe this one helps:

    stm32cubemx-version-6-4-0-generates-code-with-missing-reent-h 

    BR, Ulysses

    Atomic1Author
    Visitor II
    September 4, 2025

    I have progressed further since this post and have resolved the above issue. Although, I am stuck on other point. I am using the STM32CubeIDE for implementing the ndef example read and write (provided in the firmware folder of STEVAL 25R200. I have separately made NFC_read.c and NFC_write.c where I am using the example codes and calling them in the main.c code

     

    The program execution hangs indefinitely inside the rfalNfcInitialize() function which I later on traced it to the st25r200Initialize() function. I have also successfully checked the correct execution of SPI communication by reading IC ID at 0x3F without any problem. The hang occurs while initalization in the ST25R EXTI (IRQ) according to me. I am expecting certain debug output on serial terminal in the EXTI0_1_IRQHandler() and the HAL_GPIO_EXTI_IRQHandler functions (in the stm32g0xx_it.c). I have configured the IRQ according to the documentation to PA0 pin of STM32G MCU in platform.c

     

    I have attached my codes in a single text file and attached here for reference. I'd be grateful for your assistance.

    Technical Moderator
    September 4, 2025

    Hi,

    please first close this topic on reent.h - ideally with hints on your eventual resolution.

    Then open a new topic for this one. Ideally you add also some steps of your debugging: In which loop does it hang, which exception handler, which board????

    BR, Ulysses

    Atomic1AuthorAnswer
    Visitor II
    September 4, 2025

    Hi,

    Regarding the reent.h topic, I resolved it in the FreeRTOS.h file where it was actually defined.

    The flag when configUSE_NEWLIB_REENTRANT set to false (in the FreeRTOS.h file) actually disables the include statement for the reent.h. It was mentioned in one of the previous replies that RFAL doesn't include it actually which is true. I was using the exact code for ndef_read.c from the documentation directly (and that too in VS code) without generating the required STEVAL 25R200 specific codes from the CubeMX. I rectified it after using the STM32Cube IDE and then using the generated code and later embedding the read/write example in it.