[SOLVED] Use Makefile, conflicts internal Segger command with Cygwin

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

  • [SOLVED] Use Makefile, conflicts internal Segger command with Cygwin

    Hello,

    I am trying to integrate our Makefile into Embedded Studio.
    I have done pretty good so far but I am stuck for the clean command.

    In external build command:
    Build command: make (this works good)
    Clean command: make clean -> calls rm -rf _output

    Actually the last command doesnt work since Segger is calling rm from Segger internal binary:

    """
    Running Clean command BLE_nRF52
    rm -rf _make_output
    C:\Program Files\SEGGER\SEGGER Embedded Studio for ARM 5.42b\bin\rm.exe: error: unrecognised option -rf
    """

    Obviously that is not the "rm" command I want to call but the one from the Cygwin binary folder.
    Cygwin has been added to the User Path.

    How can I solve this? By checking Cygwin binary first or ignoring this internal binary folder.

    Best regards.
  • Hello,

    Thank you for your inquiry.
    The behaviour is reproducible. We will check if Embedded Studio behaviour could be improved here.

    As a workaround you could try this instead:
    It is not ideal, but I managed to work around it by changing the clean command line to the following:
    bash -c "env PATH=\"/usr/bin:$PATH\" make clean"

    Does that work for you?

    Best regards,
    Nino
    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.