VSCode - Legato/System: New resulted in an error

image

I have followed the instructions to install VSCode, Leaf, etc on Win10 with WSL2:

(I also got exactly the same behaviour with WSL1 - so that’s not the issue)

Then, as directed, followed the “standard” Legato instructions:

I chose mangOH-yellow-wp77xx_0.7.0 as my SDK, and the swi-vscode-support_200624 support package, and added to my mangOH-yellow-wp77 Profile.

But then, at Step 7 of the instructions, I do not get the “Select or Create System” pop-up.

Reloading the window and restarting VSCode make no difference.

If I use ‘Legato/System: New’ in the command list:

I get the error:

So why is this command not being found?

Is there some vital step missing from the instructions?

I note that the mangOH command-line instructions talk about cloning sources into the Workspace:

Does that still have to be done manually?

See also:

Yes, just follow the instruction for command line in mango page

But as that all seems to be command-line stuff, why would it stop this VSCode feature from working?

I didn’t see anything equivalent required for “plain” Legato?

EDIT

Should I have installed a Legato SDK?
Is it OK to have both Legato & mangOH SDKs together?

What do you have for the mangoh sdk?

From the mangoh wiki instruction, you still need to clone the mangoh source from github

But would the lack of that stop the ‘Legato/System New’ command from working?

Having cloned the mangOH source, and downloaded & unzipped the Bosch BSEC code - the VSCode ‘Legato/System New’ command still fails just the same:

image

The mangOH build fails, too:

[1278/1345] Running external build step
FAILED: bluezDBusExternalBuild_line0
cd /home/awn/le-wsp/mangOH/build/yellow_wp77xx/component/04edc864bff17962d539a13ab07d1878 && export CFLAGS="--sysroot=/home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-toolchain/sysroots/armv7a-neon-poky-linux-gnueabi -O2 -DSIERRA_MDM9X28 -DSIERRA_WP76XX -DPCM_IF=SEC_AUX -DI2S_IF=SEC_MI2S -DUSB_IF=AFE_PCM -DCODEC_IF=PRI_MI2S -DMM_1_ALSA_MIXER_CTRL=MultiMedia1 -DMM_1_ALSA_PCM_DEVICE_ID=0 -DMM_2_ALSA_MIXER_CTRL=MultiMedia2 -DMM_2_ALSA_PCM_DEVICE_ID=13 -DADC_BEGIN_NUM=0 -DADC_COUNT=4 -DPDP_MAX_PROFILE=16 -DPDP_MAX_MULTIPDP=8 -DEUICC -DLWM2M_OBJECT_3_BATTERY -DLWM2M_OBJECT_9 -I /home/awn/le-wsp/mangOH/build/yellow_wp77xx -I/home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-legato/interfaces -I/home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-legato/framework/include -I/home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-legato/build/wp77xx/framework/include -I. -I/home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-legato/interfaces/modemServices -I/home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-legato/interfaces/positioning -I/home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-legato/interfaces/atServices -I/home/awn/le-wsp/mangOH/interfaces -I/home/awn/le-wsp/mangOH/apps/LedService -I/home/awn/le-wsp/mangOH/apps/DataHub -I/home/awn/le-wsp/mangOH/apps/BatteryService -I/home/awn/le-wsp/mangOH/apps/Bme680EnvironmentalSensor -I/home/awn/le-wsp/mangOH/apps/YellowSensor/interfaces -I/home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-legato/interfaces/wifi" CXXFLAGS="--sysroot=/home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-toolchain/sysroots/armv7a-neon-poky-linux-gnueabi -I /home/awn/le-wsp/mangOH/build/yellow_wp77xx -I/home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-legato/interfaces -I/home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-legato/framework/include -I/home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-legato/build/wp77xx/framework/include -I. -I/home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-legato/interfaces/modemServices -I/home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-legato/interfaces/positioning -I/home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-legato/interfaces/atServices -I/home/awn/le-wsp/mangOH/interfaces -I/home/awn/le-wsp/mangOH/apps/LedService -I/home/awn/le-wsp/mangOH/apps/DataHub -I/home/awn/le-wsp/mangOH/apps/BatteryService -I/home/awn/le-wsp/mangOH/apps/Bme680EnvironmentalSensor -I/home/awn/le-wsp/mangOH/apps/YellowSensor/interfaces -I/home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-legato/interfaces/wifi" LDFLAGS="--sysroot=/home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-toolchain/sysroots/armv7a-neon-poky-linux-gnueabi " CPPFLAGS="--sysroot=/home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-toolchain/sysroots/armv7a-neon-poky-linux-gnueabi " PATH="${LEGATO_ROOT}/bin:/home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-toolchain/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi:/home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-toolchain/sysroots/x86_64-pokysdk-linux/usr/bin:/home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-toolchain/sysroots/x86_64-pokysdk-linux/bin:/home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-toolchain/sysroots/x86_64-pokysdk-linux/sbin:$PATH" && . /home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-toolchain/sysroots/armv7a-neon-poky-linux-gnueabi/../../environment-setup-armv7a-neon-poky-linux-gnueabi && cmake -G Ninja /home/awn/le-wsp/mangOH/components/bluezDBus
/bin/sh: 15: export: Files/WindowsApps/CanonicalGroupLimited.Ubuntu18.04onWindows_1804.2020.824.0_x64__79rhkp1fndgsc:/mnt/c/apps/Python27/:/mnt/c/apps/Python27/Scripts:/mnt/c/Program: bad variable name
[1287/1345] Compiling C++ source
ninja: build stopped: subcommand failed.
Makefile:122: recipe for target 'yellow_wp77xx' failed
make: *** [yellow_wp77xx] Error 1
(lsh:mangOH-yellow-wp77) awn@Lap_Nova_01:~/le-wsp/mangOH$

There are also loads of Warnings:

/home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-toolchain/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc --sysroot=/home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-toolchain/sysroots/armv7a-neon-poky-linux-gnueabi -O2 -DSIERRA_MDM9X28 -DSIERRA_WP76XX -DPCM_IF=SEC_AUX -DI2S_IF=SEC_MI2S -DUSB_IF=AFE_PCM -DCODEC_IF=PRI_MI2S -DMM_1_ALSA_MIXER_CTRL=MultiMedia1 -DMM_1_ALSA_PCM_DEVICE_ID=0 -DMM_2_ALSA_MIXER_CTRL=MultiMedia2 -DMM_2_ALSA_PCM_DEVICE_ID=13 -DADC_BEGIN_NUM=0 -DADC_COUNT=4 -DPDP_MAX_PROFILE=16 -DPDP_MAX_MULTIPDP=8 -DEUICC -DLWM2M_OBJECT_3_BATTERY -DLWM2M_OBJECT_9 -I /home/awn/le-wsp/mangOH/build/yellow_wp77xx -I/home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-legato/interfaces -I/home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-legato/framework/include -I/home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-legato/build/wp77xx/framework/include -I. -I/home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-legato/interfaces/modemServices -I/home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-legato/interfaces/positioning -I/home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-legato/interfaces/atServices -I/home/awn/le-wsp/mangOH/interfaces -I/home/awn/le-wsp/mangOH/apps/LedService -I/home/awn/le-wsp/mangOH/apps/DataHub -I/home/awn/le-wsp/mangOH/apps/BatteryService -I/home/awn/le-wsp/mangOH/apps/Bme680EnvironmentalSensor -I/home/awn/le-wsp/mangOH/apps/YellowSensor/interfaces -I/home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-legato/interfaces/wifi --sysroot=/home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-toolchain/sysroots/armv7a-neon-poky-linux-gnueabi  -I/home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-legato/3rdParty/tinycbor/src -DTINYCBOR_VERSION_SUFFIX=\"\" -std=c99 --sysroot=/home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-toolchain/sysroots/armv7a-neon-poky-linux-gnueabi -O2 -DSIERRA_MDM9X28 -DSIERRA_WP76XX -DPCM_IF=SEC_AUX -DI2S_IF=SEC_MI2S -DUSB_IF=AFE_PCM -DCODEC_IF=PRI_MI2S -DMM_1_ALSA_MIXER_CTRL=MultiMedia1 -DMM_1_ALSA_PCM_DEVICE_ID=0 -DMM_2_ALSA_MIXER_CTRL=MultiMedia2 -DMM_2_ALSA_PCM_DEVICE_ID=13 -DADC_BEGIN_NUM=0 -DADC_COUNT=4 -DPDP_MAX_PROFILE=16 -DPDP_MAX_MULTIPDP=8 -DEUICC -DLWM2M_OBJECT_3_BATTERY -DLWM2M_OBJECT_9 -I /home/awn/le-wsp/mangOH/build/yellow_wp77xx -I/home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-legato/interfaces -I/home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-legato/framework/include -I/home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-legato/build/wp77xx/framework/include -I. -I/home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-legato/interfaces/modemServices -I/home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-legato/interfaces/positioning -I/home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-legato/interfaces/atServices -I/home/awn/le-wsp/mangOH/interfaces -I/home/awn/le-wsp/mangOH/apps/LedService -I/home/awn/le-wsp/mangOH/apps/DataHub -I/home/awn/le-wsp/mangOH/apps/BatteryService -I/home/awn/le-wsp/mangOH/apps/Bme680EnvironmentalSensor -I/home/awn/le-wsp/mangOH/apps/YellowSensor/interfaces -I/home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-legato/interfaces/wifi  -c -o src/cborerrorstrings.o /home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-legato/3rdParty/tinycbor/src/cborerrorstrings.c
/home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-toolchain/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc --sysroot=/home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-toolchain/sysroots/armv7a-neon-poky-linux-gnueabi -O2 -DSIERRA_MDM9X28 -DSIERRA_WP76XX -DPCM_IF=SEC_AUX -DI2S_IF=SEC_MI2S -DUSB_IF=AFE_PCM -DCODEC_IF=PRI_MI2S -DMM_1_ALSA_MIXER_CTRL=MultiMedia1 -DMM_1_ALSA_PCM_DEVICE_ID=0 -DMM_2_ALSA_MIXER_CTRL=MultiMedia2 -DMM_2_ALSA_PCM_DEVICE_ID=13 -DADC_BEGIN_NUM=0 -DADC_COUNT=4 -DPDP_MAX_PROFILE=16 -DPDP_MAX_MULTIPDP=8 -DEUICC -DLWM2M_OBJECT_3_BATTERY -DLWM2M_OBJECT_9 -I /home/awn/le-wsp/mangOH/build/yellow_wp77xx -I/home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-legato/interfaces -I/home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-legato/framework/include -I/home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-legato/build/wp77xx/framework/include -I. -I/home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-legato/interfaces/modemServices -I/home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-legato/interfaces/positioning -I/home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-legato/interfaces/atServices -I/home/awn/le-wsp/mangOH/interfaces -I/home/awn/le-wsp/mangOH/apps/LedService -I/home/awn/le-wsp/mangOH/apps/DataHub -I/home/awn/le-wsp/mangOH/apps/BatteryService -I/home/awn/le-wsp/mangOH/apps/Bme680EnvironmentalSensor -I/home/awn/le-wsp/mangOH/apps/YellowSensor/interfaces -I/home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-legato/interfaces/wifi --sysroot=/home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-toolchain/sysroots/armv7a-neon-poky-linux-gnueabi  -I/home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-legato/3rdParty/tinycbor/src -DTINYCBOR_VERSION_SUFFIX=\"\" -std=c99 --sysroot=/home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-toolchain/sysroots/armv7a-neon-poky-linux-gnueabi -O2 -DSIERRA_MDM9X28 -DSIERRA_WP76XX -DPCM_IF=SEC_AUX -DI2S_IF=SEC_MI2S -DUSB_IF=AFE_PCM -DCODEC_IF=PRI_MI2S -DMM_1_ALSA_MIXER_CTRL=MultiMedia1 -DMM_1_ALSA_PCM_DEVICE_ID=0 -DMM_2_ALSA_MIXER_CTRL=MultiMedia2 -DMM_2_ALSA_PCM_DEVICE_ID=13 -DADC_BEGIN_NUM=0 -DADC_COUNT=4 -DPDP_MAX_PROFILE=16 -DPDP_MAX_MULTIPDP=8 -DEUICC -DLWM2M_OBJECT_3_BATTERY -DLWM2M_OBJECT_9 -I /home/awn/le-wsp/mangOH/build/yellow_wp77xx -I/home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-legato/interfaces -I/home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-legato/framework/include -I/home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-legato/build/wp77xx/framework/include -I. -I/home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-legato/interfaces/modemServices -I/home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-legato/interfaces/positioning -I/home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-legato/interfaces/atServices -I/home/awn/le-wsp/mangOH/interfaces -I/home/awn/le-wsp/mangOH/apps/LedService -I/home/awn/le-wsp/mangOH/apps/DataHub -I/home/awn/le-wsp/mangOH/apps/BatteryService -I/home/awn/le-wsp/mangOH/apps/Bme680EnvironmentalSensor -I/home/awn/le-wsp/mangOH/apps/YellowSensor/interfaces -I/home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-legato/interfaces/wifi  -c -o src/cborencoder.o /home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-legato/3rdParty/tinycbor/src/cborencoder.c
In file included from /home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-legato/3rdParty/tinycbor/src/cborencoder.c:33:0:
/home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-legato/3rdParty/tinycbor/src/compilersupport_p.h:175:11: warning: bad option '-ffunction-sections' to pragma 'optimize' [-Wpragmas]
 #  pragma GCC optimize("-ffunction-sections")
           ^~~
/home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-legato/3rdParty/tinycbor/src/compilersupport_p.h:179:1: warning: bad option '-ffunction-sections' to attribute 'optimize' [-Wattributes]
 {
 ^
/home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-legato/3rdParty/tinycbor/src/compilersupport_p.h:190:1: warning: bad option '-ffunction-sections' to attribute 'optimize' [-Wattributes]
 {
 ^
/home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-legato/3rdParty/tinycbor/src/cborencoder.c:203:1: warning: bad option '-ffunction-sections' to attribute 'optimize' [-Wattributes]
 {
 ^
/home/awn/le-wsp/leaf-data/mangOH-yellow-wp77/mangOH-yellow-wp77xx-legato/3rdParty/tinycbor/src/cborencoder.c:211:1: warning: bad option '-ffunction-sections' to attribute 'optimize' [-Wattributes]
 {
 ^

This seems to be windows environment problem

/bin/sh: 15: export: Files/WindowsApps/CanonicalGroupLimited.Ubuntu18.04onWindows_1804.2020.824.0_x64__79rhkp1fndgsc:/mnt/c/apps/Python27/:/mnt/c/apps/Python27/Scripts:/mnt/c/Program: bad variable name

Indeed - WSL had put some Windows stuff with spaces into the PATH.

Fix here:

https://forum.mangoh.io/t/mangoh-yellow-wp77-build-fails/9306/11?u=awneil

but this makes no difference to the missing Legato icon & ‘Select/Create System’ popup, and the ‘Legato/System: New’ command failing.

The Issue seems to be somewhere with the mangOH stuff - adding a “plain” Legato SDK does give the Legato icon, and the ‘Legato/System: New’ command then stops giving that error: