Path white space causing errors in emBuild

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

    • 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?