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

Add stub implementations of unused syscalls explicitly #1966

Merged
merged 2 commits into from
Aug 21, 2024

Conversation

ia
Copy link
Collaborator

@ia ia commented Aug 16, 2024

  • Please check if the PR fulfills these requirements
  • The changes have been tested locally
  • There are no breaking changes
  • What kind of change does this PR introduce?
    Add stub implementations of unused syscalls explicitly.

  • What is the current behavior?
    There are missed stub implementations for some syscalls which leads to compile warnings for all target devices except Pinecil (both versions) like these ones:

/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/v7-m/nofp/libc_nano.a(libc_a-closer.o): in function `_close_r':
closer.c:(.text._close_r+0xc): 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/v7-m/nofp/libc_nano.a(libc_a-lseekr.o): in function `_lseek_r':
lseekr.c:(.text._lseek_r+0x10): 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/v7-m/nofp/libc_nano.a(libc_a-readr.o): in function `_read_r':
readr.c:(.text._read_r+0x10): 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/v7-m/nofp/libc_nano.a(libc_a-writer.o): in function `_write_r':
writer.c:(.text._write_r+0x10): warning: _write is not implemented and will always fail
  • What is the new behavior (if this is a feature change)?
    Implemented stubs of unused syscalls to make compiler... linker, to be precise, happy.

  • Other information:

    • Pinecil & Pinecil2 are not affected since deeply inside in their BSP dirs they either have syscalls implemented as stubs already or actually used for debugging;
    • at first I tried to put related code to BSP_Common.c but it seems this file is never compiled and out of source tree somehow for some reason;
    • can't wait to hear the feedback.

@ia ia requested a review from Ralim August 16, 2024 00:13
@Ralim Ralim merged commit 6305093 into Ralim:dev Aug 21, 2024
18 checks passed
@Ralim
Copy link
Owner

Ralim commented Aug 21, 2024

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants