nrf5 sdk example build fails with embuild

I am trying to build my nrf5 sdk v16 project in command line using embuild.exe but it fails with an error in step: Generating linker script 'projectName.ld'  error: unknown option option -target

I can reproduce this with nrf5_sdk/examples/peripheral/blinky example using the following command:

emBuild.exe blinky_pca10056.emProject -config "Debug" -verbose  -rebuild -studiodir "/c/Program Files/SEGGER/SEGGER Embedded Studio for ARM 4.12/"

using the option '-echo'  in above command, I see following command being executed in the failed step:

1>Generating linker script 'blinky_pca10056.ld'
1>C:/Program Files/SEGGER/SEGGER Embedded Studio for ARM 4.12/bin/mkld -target arm -memory-map-segments FLASH RX 0x0 0x100000;RAM RWX 0x20000000 0x40000 -section-placement-file flash_placement.xml -check-segment-overflow -check-section-overflow -symbols __STACKSIZE__=8192;__STACKSIZE_PROCESS__=0;__HEAPSIZE__=8192 -section-placement-macros FLASH_PH_START=0x0;FLASH_PH_SIZE=0x100000;RAM_PH_START=0x20000000;RAM_PH_SIZE=0x40000;FLASH_START=0x0;FLASH_SIZE=0x100000;RAM_START=0x20000000;RAM_SIZE=0x40000 C:/sportident/six/extern/nrf5_sdk/examples/peripheral/blinky/pca10056/blank/ses/Output/Debug/Obj/blinky_pca10056/blinky_pca10056.ld
1>error: unknown option option -target

I am using SES v4.12 (I have also tried, v4.18, v5.44, v5.68 wihout any success). 

Related