[ABANDONED] import freertos STM32Cube project fails, reent.h not found

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

  • [ABANDONED] import freertos STM32Cube project fails, reent.h not found

    When creating an STM32CubeMX project with FreeRTOS middelware, the CubeMX strongly suggest to set USE_NEWLIB_REENTRANT.
    After settings this option and changing the systick to TIM6, this project happily compiles with STM32CubeIDE.

    When following the Seggers instruction to import an STM32CubeMX project (wiki.segger.com/Import_project…CubeMX_to_Embedded_Studio)
    The freshly created Segger project fails during compilation complaining about a missing reent.h.
    I can't find reent.h on my filesystem.

    Any suggestions?
    Images
    • reent2.png

      52.67 kB, 508×690, viewed 264 times
    • reent.png

      50.15 kB, 1,037×272, viewed 214 times
  • I noticed that STCubeIDE provides extra information when highlighting the USE_NEWLIB_REENTRANT parameters in the FreeRTOS configuration. I had to maximize that window to read the last line saying: "Warning: if enabled without using newlib, CubeMx project compilation will fail ("cannot open source file "reent.h")".

    Not completely sure what is meant by 'using'.

    Set the parameter USE_NEWLIB_REENTERANT to no.
    When STCubeIDE generates by clicking YEW to the question related to generating the code without the USE_NEWLIB_REENTRANT, the project can be successfully imported and compiled with the SEGGER IDE.
    * don't forget to edit the Exclude Specifications for to Core folder to Core/;syscalls.c;sysmem.c;startup_*.s

    The post was edited 1 time, last by sambuls ().

  • I suppose the missing "reent.h" file is part of FreeRTOS.
    And thus you would need to include this manually in your SES project.

    Reentrance would be a possible issue if you call newlib functions from different threads (including interrupts).