Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build warning: "_close is not implemented and will always fail" #164

Closed
fenugrec opened this issue Apr 28, 2023 · 2 comments · Fixed by #182
Closed

build warning: "_close is not implemented and will always fail" #164

fenugrec opened this issue Apr 28, 2023 · 2 comments · Fixed by #182

Comments

@fenugrec
Copy link
Collaborator

Nice, new warnings with arm-gcc 13.1.0 :

/usr/lib/gcc/arm-none-eabi/13.1.0/../../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/13.1.0/../../../../arm-none-eabi/lib/thumb/v7e-m/nofp/libg_nano.a(libc_a-closer.o): in function `_close_r':
/build/arm-none-eabi-newlib/src/build-nano/arm-none-eabi/thumb/v7e-m/nofp/newlib/../../../../../../newlib-4.3.0.20230120/newlib/libc/reent/closer.c:47: warning: _close is not implemented and will always fail
/usr/lib/gcc/arm-none-eabi/13.1.0/../../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/13.1.0/../../../../arm-none-eabi/lib/thumb/v7e-m/nofp/libg_nano.a(libc_a-lseekr.o): in function `_lseek_r':
/build/arm-none-eabi-newlib/src/build-nano/arm-none-eabi/thumb/v7e-m/nofp/newlib/../../../../../../newlib-4.3.0.20230120/newlib/libc/reent/lseekr.c:49: warning: _lseek is not implemented and will always fail
/usr/lib/gcc/arm-none-eabi/13.1.0/../../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/13.1.0/../../../../arm-none-eabi/lib/thumb/v7e-m/nofp/libg_nano.a(libc_a-readr.o): in function `_read_r':
/build/arm-none-eabi-newlib/src/build-nano/arm-none-eabi/thumb/v7e-m/nofp/newlib/../../../../../../newlib-4.3.0.20230120/newlib/libc/reent/readr.c:49: warning: _read is not implemented and will always fail
/usr/lib/gcc/arm-none-eabi/13.1.0/../../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/13.1.0/../../../../arm-none-eabi/lib/thumb/v7e-m/nofp/libg_nano.a(libc_a-writer.o): in function `_write_r':
/build/arm-none-eabi-newlib/src/build-nano/arm-none-eabi/thumb/v7e-m/nofp/newlib/../../../../../../newlib-4.3.0.20230120/newlib/libc/reent/writer.c:49: warning: _write is not implemented and will always fail

those are neither implemented nor used. I'm not sure which step is pulling in those symbols; none of them end up in the compiled .elf.
Is it my distro's build that got something wrong all of a sudden or is anyone else also seeing this ?

@ryedwards
Copy link
Contributor

The STMCUBEMX HAL added a "syscalls.c" to stub out these functions to prevent compiler errors:
https://github.com/ryedwards/budgetcan_fw/blob/main/Core/Src/syscalls.c

marckleinebudde added a commit to marckleinebudde/candleLight_fw that referenced this issue Jun 4, 2024
This increases the size of the binary in a stm32f072 a but:

before:
Memory region         Used Size  Region Size  %age Used
           FLASH:       17296 B       128 KB     13.20%
             RAM:        4268 B        16 KB     26.05%

after:
Memory region         Used Size  Region Size  %age Used
           FLASH:       17312 B       128 KB     13.21%
             RAM:        4268 B        16 KB     26.05%

Closes: candle-usb#164
marckleinebudde added a commit to marckleinebudde/candleLight_fw that referenced this issue Jun 4, 2024
This increases the size of the binary in a stm32f072 a bit:

before:
Memory region         Used Size  Region Size  %age Used
           FLASH:       17296 B       128 KB     13.20%
             RAM:        4268 B        16 KB     26.05%

after:
Memory region         Used Size  Region Size  %age Used
           FLASH:       17312 B       128 KB     13.21%
             RAM:        4268 B        16 KB     26.05%

Closes: candle-usb#164
marckleinebudde added a commit to marckleinebudde/candleLight_fw that referenced this issue Jun 4, 2024
This increases the size of the binary in a stm32f072 a bit:

before:
Memory region         Used Size  Region Size  %age Used
           FLASH:       17296 B       128 KB     13.20%
             RAM:        4268 B        16 KB     26.05%

after:
Memory region         Used Size  Region Size  %age Used
           FLASH:       17312 B       128 KB     13.21%
             RAM:        4268 B        16 KB     26.05%

Closes: candle-usb#164
marckleinebudde added a commit to marckleinebudde/candleLight_fw that referenced this issue Jun 4, 2024
This increases the size of the binary in a stm32f072 a bit:

before:
Memory region         Used Size  Region Size  %age Used
           FLASH:       17296 B       128 KB     13.20%
             RAM:        4268 B        16 KB     26.05%

after:
Memory region         Used Size  Region Size  %age Used
           FLASH:       17312 B       128 KB     13.21%
             RAM:        4268 B        16 KB     26.05%

Closes: candle-usb#164
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants