[SOLVED] Path white space causing errors in emBuild

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

  • [SOLVED] Path white space causing errors in emBuild

    Hey Segger support and community, I'm trying to use emBuild to automate builds for a Nordic nRF52 project (SDK 15.0.0). The build fails due to white space in included file paths.

    Here's the environment I'm using:
    - MacOS 10.13.6
    - Segger Embedded Studio for Arm 3.34a
    - SEGGER Embedded Studio for ARM emBuild - Release 3.34a

    I successfully compile the project when using Segger Embedded studio. The build commands that it produces starts as follows, wrapping paths and options in quotes:
    "/Applications/SEGGER Embedded Studio for ARM 3.34a/gcc/arm-none-eabi/bin/cc1" ...

    When I run emBuild, quotes are not included around the path to the compiler or around options that include file paths. It results in an error.
    /Applications/SEGGER Embedded Studio for ARM 3.34a/gcc/arm-none-eabi/bin/cc1

    I've made some progress by specify the "studiodir" option with escape characters before the whitespace:


    1. emBuild -config Release -verbose -studiodir '/Applications/SEGGER\ Embedded\ Studio\ for\ ARM\ 3.34a' -echo /usr/local/nRF5_SDK_15.0.0_a53641a/examples/project/application/pca10040/s132/ses/projcet.emProject

    However, there's other include paths in the project that contain white space, and those cause further errors.

    For example, when I compile with Segger Embedded Studio, the following -isystem option is surrounded in quotes:
    "-isystem/Users/raykampmeier/Library/SEGGER/SEGGER Embedded Studio/v3/packages/include"

    When using emBuild, there are no quotes around this option, resulting in an error:
    -isystem/Users/raykampmeier/Library/SEGGER/SEGGER Embedded Studio/v3/packages/include

    Is there a way to have emBuild automatically wrap options in quotes? Or any suggestions for how to get around this?

  • I certainly understand that in general it's preferred that file paths don't include spaces or special characters. In this case it's caused by Segger's choice to include spaces in path locations.

    So it seems there's two problems:
    1. Segger's tools are installed at paths that includes spaces. Not ideal.
    /Applications/SEGGER Embedded Studio for ARM 3.34a
    ~/Library/SEGGER/SEGGER Embedded Studio

    2. Segger's emBuild tool doesn't escape spaces and special characters in include paths.

    A fix for #2 would prevent the issue altogether. Perhaps additionally Segger can start installing their tools to paths without spaces to avoid future issues.

    Segger team, any help here?

    much thanks
  • Hello Ray,

    Regarding 1: you can move the install folder after installation to wherever you please. Under Windows this also can be done during installation.

    Regarding 2: This should be fixed with the latest Embedded Studio version 4.18.
    Could you give it a try?

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