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

pass extra ldflags to RTEMS.cmake #355

Open
sprhawk opened this issue Aug 2, 2022 · 0 comments
Open

pass extra ldflags to RTEMS.cmake #355

sprhawk opened this issue Aug 2, 2022 · 0 comments

Comments

@sprhawk
Copy link

sprhawk commented Aug 2, 2022

Describe the bug
I'm working on TI TMS570LC4357 SoC with RTEMS running cFS. This SoC is a big-endian device.
During build process, the linker does not properly pass big-endian flag, I suggest passing an
extra RTEMS_BSP_LINKER_FLAG to allow additional flags

Here is my proposal commit for it, but I'm still not ready to send a PR yet.

Without extra LINKER FLAGS, the link cmd will be

rtems/5/bin/arm-rtems5-gcc -o ci_lab.obj -r CMakeFiles/ci_lab.dir/fsw/src/ci_lab_app.c.o

and reported error:

arm-rtems5/bin/ld: CMakeFiles/ci_lab.dir/fsw/src/ci_lab_app.c.o: compiled for a big endian system and target is little endian

Another corresponding commit is the rtems-syms needs " to wrap RTEMS_BSP_C_FLAGS to properly use all C FLAGS

To Reproduce
build for a big-endian device on RTEMS

Expected behavior
A clear and concise description of what you expected to happen.

Code snips
If applicable, add references to the software.

System observed on:

  • Hardware: 11th Gen Intel(R) Core(TM) i7-11800H
  • OS: Debian 11
  • Versions: cFE draco-rc2, PSP for custom tms570lc4357

Reporter Info
Yang Hongbo, Qingdao IotPi Information Technology Ltd.

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

No branches or pull requests

1 participant