[SOLVED] "External Build" macro fail on Ubuntu

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

  • [SOLVED] "External Build" macro fail on Ubuntu

    Hello,
    I am setting my build environment on ubuntu 20.xx
    Always linking fails with the following asterisk expression in command, *.o".
    For example in "Code --> External Build --> Link Command", 'gcc "*.o" -o "output".
    If I directly use the commands from "export build", there is no error.

    How can I handle this?

    FYI, the original macro and error are as follows:

    External Build Macro (C++ Link Macro) :
    "$(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
    ==> "$(SolutionDir)/output/compiler/*.o" --> this causes the error.

    Error :
    Linking 'dwm-api-test_fw2.elf' (1 error)
    /home/test/workspace/dwm/examples/dwm-api-test/output/compiler/*.o: No such file or directory
    Build Failed

    ** additional question
    Where can I set $(Objects) variable?

    Please help me :(

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

  • Hello,

    Thank you for your inquiry.
    How macros can be defined is explained here:
    studio.segger.com/index.htm?ht…om/ide_project_macros.htm

    Regarding the *.o, make sure this is supported by the Linker you are using. Embedded Studio will simply pass this 1 to 1 to the Linker. Wildcards will not be resolved by Embedded Studio.

    Best regards,
    Nino
    Please read the forum rules before posting: Forum Rules

    Keep in mind, this is not a support forum. Its main purpose is user to user interaction.
    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.