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

Support for newer versions of GNU Arm Embedded Toolchain #1040

Open
mathias-arm opened this issue Aug 3, 2023 · 0 comments · May be fixed by #1043
Open

Support for newer versions of GNU Arm Embedded Toolchain #1040

mathias-arm opened this issue Aug 3, 2023 · 0 comments · May be fixed by #1043

Comments

@mathias-arm
Copy link
Collaborator

There are two link-time issues with newer versions of arm-none-eabi-gcc

The first one is related to some missing symbols:

[...]/libc_nano.a(libc_a-closer.o): in function `_close_r':
[...]/closer.c:47: warning: _close is not implemented and will always fail
[...]/libc_nano.a(libc_a-lseekr.o): in function `_lseek_r':
[...]/lseekr.c:49: warning: _lseek is not implemented and will always fail
[...]/libc_nano.a(libc_a-readr.o): in function `_read_r':
[...]/readr.c:49: warning: _read is not implemented and will always fail
[...]/libc_nano.a(libc_a-writer.o): in function `_write_r':
[...]/writer.c:49: warning: _write is not implemented and will always fail

A work-around for this issue is to add the following lines in a .c file (e.g. source/daplink/sdk_stub.c):

void _close_r(void) {}
void _lseek_r(void) {}
void _read_r(void) {}
void _write_r(void) {}

The other issue relates to the permission of the RAM segment (needed in some cases for RAM functions when writing to flash):

warning: build/xxxxx.elf has a LOAD segment with RWX permissions

The work-around is add -Wl,--no-warn-rwx-segment to ld_flags in records/tools/gcc_arm.yaml. This is not a solution we could just merge because the flag is not supported by older versions of arm-none-eabi-gcc. Another alternative would be to remove -Werror, but that seems even worse.

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