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 fail .elf file #18894

Open
ttropcic opened this issue Dec 23, 2021 · 2 comments
Open

Build fail .elf file #18894

ttropcic opened this issue Dec 23, 2021 · 2 comments
Labels

Comments

@ttropcic
Copy link

Hi,
Having problem with building the code.

Command:
$ make px4_fmu-v3_default

Generating C implementation in directory /cygdrive/c/PX4/home/PX4-Autopilot/build/px4_fmu-v3_default/mavlink/common
Generating C implementation in directory /cygdrive/c/PX4/home/PX4-Autopilot/build/px4_fmu-v3_default/mavlink/minimal
Copying fixed headers for protocol 2.0 to /cygdrive/c/PX4/home/PX4-Autopilot/build/px4_fmu-v3_default/mavlink
[1088/1090] Linking CXX executable px4_fmu-v3_default.elf
FAILED: px4_fmu-v3_default.elf
: && /cygdrive/c/PX4/toolchain/gcc-arm/bin/arm-none-eabi-g++.exe -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -Os -DNDEBUG --specs=nosys.specs @CMakeFiles/px4.rsp -o px4_fmu-v3_default.elf && :
c:/px4/toolchain/gcc-arm/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/bin/ld.exe: cannot open linker script file /cygdrive/c/PX4/home/PX4-Autopilot/boards/px4/fmu-v3/nuttx-config/scripts/script.ld: No such file or directory
collect2.exe: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
make: *** [Makefile:225: px4_fmu-v3_default] Error 1

I don't understand the issue. That script that it says isn't there, is there. So if somebody could maybe suggest a solution, I would be very grateful.
Thanks!

@dagar
Copy link
Member

dagar commented Dec 26, 2021

I think it's a bit convoluted because the arm-none-eabi toolchain is a proper windows build and needs a windows path (c:).

We probably need to figure out a proper Cygwin path here for the linker script.

-Wl,--script=${NUTTX_CONFIG_DIR}/scripts/${SCRIPT_PREFIX}script.ld

This is what we had previously.

-Wl,--script=${PX4_BINARY_DIR_CYG}/NuttX/nuttx-config/scripts/${SCRIPT_PREFIX}script.ld

@dagar
Copy link
Member

dagar commented Dec 27, 2021

@ttropcic could you try this? #18914

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

No branches or pull requests

2 participants