cancel
Showing results for 
Search instead for 
Did you mean: 

Linker Warnings on every new project

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.

1 ACCEPTED SOLUTION

Accepted Solutions

Does your project contain a syscalls.c ?

AndrewNeil_1-1744300292729.png

 

That should implement these functions

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.

View solution in original post

8 REPLIES 8
Olivier GALLIEN
ST Employee

Hi @Robert Ritchey 

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 

 

 

 

Olivier GALLIEN
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.

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. 

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.

https://community.st.com/t5/stm32-mcus-embedded-software/x-cube-eeprom-example-projects-do-not-seem-to-work/m-p/641361/highlight/true#M45531

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.

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.  


@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?

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.

Does your project contain a syscalls.c ?

AndrewNeil_1-1744300292729.png

 

That should implement these functions

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.

They are actual errors under 18.0 but I have not gone in to see how the linker is configured.

No, syscall.c is not in the build