Linker fails with "No such file or directory" error on Ubuntu 20.04

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Linker fails with "No such file or directory" error on Ubuntu 20.04

      I am trying to build a Nordic nRF based project with SES 5.60a however I got the following linker error:
      imgur.com/a/gQo7DYW

      The object files are visible and readable by the SES itself:
      imgur.com/a/LJN76SD

      If I ran the linker command from a terminal the linker runs fine and produces the outputs:
      imgur.com/a/VVr8I53

      I ran the SES with the same user as I ran in terminal.
      I have also tried to run SES with sudo but the results are the same.

      I am running a stock Ubuntu 20.04

      I tried to disable apparmor, but it did not helped.

      Did anyone faced with similar? Any ideas what else shall I check would be highly welcome!

      --

      The object file seems to be changed each build, so it could be some sequencing issue as well.

      The post was edited 1 time, last by martonmiklos ().

    • For anyone who would ran into the same issue:
      The wildcards in the command line arguments (*, ? for e.g.) are not extended within the programs (in our case the gcc) but in the shell processing it.

      In the case of SES I do not know how it is used, however the star extending to separate arguments based on the available file list does not work.

      I "workarounded" it by passing the command to bash in the build steps like:

      Shell-Script

      1. bash -c "$(ToolChainDir)/arm-none-eabi-gcc -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mthumb -Wl,--gc-sections -Wl,-static -Wl,-n -g -nostdlib -o $(SolutionDir)/output/linker/$(SolutionName)_fw2.elf $(SolutionDir)/output/compiler/*.o $(SolutionDir)/../../lib/dwm.o $(SolutionDir)/../../lib/libdwm.a -nostartfiles -L $(SolutionDir)/../../lib -Wl,-Map,$(SolutionDir)/output/linker/$(SolutionName)_fw2.map -T $(SolutionDir)/../../lib/target_s132_fw2.ld -lm -lgcc -lc -lnosys"
    • Hi,
      Thank you for your inquiry.

      As you already said, wildcards expansion is done by the Shell.
      Embedded Studio (ES) does not support this feature, as it is usually not required.
      ES writes all Input files for the linke (Compiler Outputs (.o) and Additional Libraries) to $(IntDir)/$OutName).ind

      Best regards,
      Fabian
      Please read the forum rules before posting.

      Keep in mind, this is *not* a support forum.
      Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
      Should you be entitled to support you can contact us via our support system: segger.com/ticket/

      Or you can contact us via e-mail.