2025-04-09 5:31 PM - last edited on 2025-04-10 8:07 AM by Andrew Neil
Moved from MPUs forum
Every new project I start now has linker error at the end
D:/STMicro/STM32Cube/IDE_1.14/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.100.202309141235/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld.exe: D:/STMicro/STM32Cube/IDE_1.14/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.100.202309141235/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v6-m/nofp\libc_nano.a(libc_a-closer.o): in function `_close_r':
(.text._close_r+0xc): warning: _close is not implemented and will always fail
D:/STMicro/STM32Cube/IDE_1.14/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.100.202309141235/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld.exe: D:/STMicro/STM32Cube/IDE_1.14/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.100.202309141235/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v6-m/nofp\libc_nano.a(libc_a-lseekr.o): in function `_lseek_r':
(.text._lseek_r+0x10): warning: _lseek is not implemented and will always fail
D:/STMicro/STM32Cube/IDE_1.14/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.100.202309141235/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld.exe: D:/STMicro/STM32Cube/IDE_1.14/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.100.202309141235/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v6-m/nofp\libc_nano.a(libc_a-readr.o): in function `_read_r':
(.text._read_r+0x10): warning: _read is not implemented and will always fail
D:/STMicro/STM32Cube/IDE_1.14/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.100.202309141235/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld.exe: D:/STMicro/STM32Cube/IDE_1.14/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.100.202309141235/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v6-m/nofp\libc_nano.a(libc_a-writer.o): in function `_write_r':
(.text._write_r+0x10): warning: _write is not implemented and will always fail
How do I get rid of these errors? An older project does not generate these errors.
Solved! Go to Solution.
2025-04-10 8:51 AM
Does your project contain a syscalls.c ?
That should implement these functions
2025-04-09 11:19 PM
Can you please elaborate on which STM32 you are working and explain differences between "old" and "new" project ?
I notice you are using an old CubeIDE 1.14 and maybe some compatibility issues may come with recent firmware package.
Olivier
2025-04-10 7:09 AM
I started a new project in the last month and these errors started showing up. By old project, I mean a project that I did last year that I recompiled, and the errors did not show up. I tried IDE 18.0 and the same errors showed up. I looked all through my code and could not find any reference to a library that might contain file functions. I generated a listing file and looked all through it and could not find any references to the functions I am getting errors for. I cannot figure out why I am getting warnings (and errors under 18.0) for these file functions.
2025-04-10 7:25 AM
You've posted this under MPUs - did you mean to post under MCUs?
These aren't errors - they're just warnings.
They're just telling you that the runtime library has no support for _close_r, _lseek_r, _read_r, and _write_r
These are all file operations so, in many (most?) embedded MCU projects, none of it matters - and can be safely ignored.
IME, it is normal behaviour that these are given once only on the very first build of a project.
2025-04-10 7:56 AM
Yes, I meant to post it under MCUs. Sorry. I know they are warnings under IDE14.1 but they become errors under IDE 18.0 which is why I am running 14.1. They show up every build, not just the first time it is built. Since they are errors under 18.0 I cannot upgrade.
2025-04-10 8:09 AM
@Robert Ritchey wrote:Yes, I meant to post it under MCUs. Sorry. .
OK - moved.
@Robert Ritchey wrote:I know they are warnings under IDE14.1 but they become errors under IDE 18.0
Do they actually become errors, or is 1.18.0 just configured to treat warnings as errors?
If the latter, you should be able to override that?
2025-04-10 8:51 AM
Does your project contain a syscalls.c ?
That should implement these functions
2025-04-10 9:39 AM
They are actual errors under 18.0 but I have not gone in to see how the linker is configured.
2025-04-10 9:48 AM
No, syscall.c is not in the build