Hi all, 
I trying to read a data from accel/gyro sensor on mangoh red board.On excecuting a command “i2cdetect -y -r 4 ” 
root@swi-mdm9x28-wp:~# i2cdetect -y -r 4 
0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f 
00:          – 04 05 06 07 – -- – -- – -- – -- 
10: – -- – -- – -- – -- – -- UU – -- – -- – 
20: – -- – -- – -- – -- – -- – -- – -- – -- 
30: – -- – -- – -- – -- – -- UU – -- – -- – 
40: – -- – -- – -- – -- – -- – -- – -- – -- 
50: – 51 – -- – -- – -- – -- – -- – -- – -- 
60: – -- – -- – -- – -- 68 – -- – -- – -- – 
70: – 71 – -- – -- 76 – 
root@swi-mdm9x28-wp:~# ls /dev/i2c* 
/dev/i2c-4 
I am referring RedSensorToCloud-master example from mangoh red github. 
on executing (with some changes). 
error:- 
Jun 25 10:11:27 | supervisor[853]/supervisor T=main | app.c CreateFileLink() 1507 | Could not stat file at ‘/sys/bus/i2c/devices/4-0068/iio:device0/in_accel_scale’. No such file or directory 
Jun 25 10:11:27 | supervisor[853]/supervisor T=main | app.c CreateFileLink() 1624 | Failed to create link at ‘/sys/devices/i2c-4/0-0068/iio:device0/in_accel_scale’ in app ‘i2c_test2’. 
Jun 25 10:11:27 | supervisor[853]/supervisor T=main | app.c app_Start() 2954 | Failed to set Smack rules or set up app area.
Do i need to load bmi160 kernel module into my legato system? 
can someone help me with that?
             
            
               
               
               
            
            
           
          
            
              
                dfrey  
                
               
              
                  
                    June 26, 2019,  3:27pm
                   
                   
              2 
               
             
            
              It looks like you’re not running a system based on the mangOH.sdef from the mangOH git repository.  That SDEF includes kernel modules which for the I2C switch (address 0x71) and the bmi160.
             
            
               
               
               
            
            
           
          
            
            
              I followed steps on   mangOH Red Getting Started Guide (Linux) [Rev5]  
and created mangOH directory  as per instruction. 
When i execute the command " make red_wp76xx " it gives me error
vishal@vg:~/mangOH$ make red_wp76xx 
make -C /home/vishal/legato_framework/legato framework_wp76xx 
make[1]: Entering directory ‘/home/vishal/legato_framework/legato’ 
Module: WiFi 
********************* VERSION ******************** 
Legato WiFi version: 18.09.0
 
Module: Dualsys 
make -f Makefile.hostTools 
make[2]: Entering directory ‘/home/vishal/legato_framework/legato’ 
Using ninja installed at: /usr/bin/ninja 
ln -sf /home/vishal/legato_framework/legato/build/tools/mk /home/vishal/legato_framework/legato/bin/mk 
ln -sf mk /home/vishal/legato_framework/legato/bin/mkcomp 
ln -sf mk /home/vishal/legato_framework/legato/bin/mkexe 
ln -sf mk /home/vishal/legato_framework/legato/bin/mkapp 
ln -sf mk /home/vishal/legato_framework/legato/bin/mksys 
ln -sf /home/vishal/legato_framework/legato/framework/tools/scripts/splitdebug /home/vishal/legato_framework/legato/framework/tools/scripts/findtoolchain /home/vishal/legato_framework/legato/framework/tools/scripts/instsys /home/vishal/legato_framework/legato/framework/tools/scripts/settime /home/vishal/legato_framework/legato/framework/tools/scripts/mkinfo /home/vishal/legato_framework/legato/framework/tools/scripts/legato-qemu /home/vishal/legato_framework/legato/framework/tools/scripts/stoplegato /home/vishal/legato_framework/legato/framework/tools/scripts/cextgenerator.py /home/vishal/legato_framework/legato/framework/tools/scripts/settz /home/vishal/legato_framework/legato/framework/tools/scripts/createsdk /home/vishal/legato_framework/legato/framework/tools/scripts/systoimg /home/vishal/legato_framework/legato/framework/tools/scripts/instlegato /home/vishal/legato_framework/legato/framework/tools/scripts/checkpa /home/vishal/legato_framework/legato/framework/tools/scripts/legato-install /home/vishal/legato_framework/legato/framework/tools/scripts/update-pack /home/vishal/legato_framework/legato/framework/tools/scripts/security-pack /home/vishal/legato_framework/legato/framework/tools/scripts/instapp /home/vishal/legato_framework/legato/framework/tools/scripts/mklegatoimg /home/vishal/legato_framework/legato/framework/tools/scripts/app /home/vishal/legato_framework/legato/framework/tools/scripts/av-pack /home/vishal/legato_framework/legato/framework/tools/scripts/releaselegato /home/vishal/legato_framework/legato/framework/tools/scripts/sbhelper /home/vishal/legato_framework/legato/framework/tools/scripts/remoteDebug /home/vishal/legato_framework/legato/framework/tools/scripts/mkdelta /home/vishal/legato_framework/legato/framework/tools/scripts/systocwe /home/vishal/legato_framework/legato/framework/tools/scripts/configlegatoenv /home/vishal/legato_framework/legato/framework/tools/scripts/update /home/vishal/legato_framework/legato/framework/tools/scripts/configtargetssh /home/vishal/legato_framework/legato/framework/tools/scripts/legs /home/vishal/legato_framework/legato/framework/tools/scripts/gettargettype /home/vishal/legato_framework/legato/framework/tools/scripts/update-util /home/vishal/legato_framework/legato/framework/tools/scripts/configToolchainDirEnvVars /home/vishal/legato_framework/legato/framework/tools/scripts/simu /home/vishal/legato_framework/legato/framework/tools/scripts/fwupdate /home/vishal/legato_framework/legato/framework/tools/scripts/setname /home/vishal/legato_framework/legato/framework/tools/scripts/mkdoc /home/vishal/legato_framework/legato/framework/tools/scripts/startlegato /home/vishal/legato_framework/legato/framework/tools/scripts/shlib /home/vishal/legato_framework/legato/framework/tools/scripts/mklegatotreero /home/vishal/legato_framework/legato/bin/ 
ln -sf /home/vishal/legato_framework/legato/framework/tools/ifgen/ifgen /home/vishal/legato_framework/legato/bin/ 
ln -sf /home/vishal/legato_framework/legato/3rdParty/ima-support-tools/ima-sign.sh /home/vishal/legato_framework/legato/bin/ 
ln -sf /home/vishal/legato_framework/legato/3rdParty/ima-support-tools/ima-gen-keys.sh /home/vishal/legato_framework/legato/bin/ 
make -C framework/tools/patchTool/mkPatch 
make[3]: Entering directory ‘/home/vishal/legato_framework/legato/framework/tools/patchTool/mkPatch’ 
/usr/bin/gcc -Wall -Werror -o /home/vishal/legato_framework/legato/bin/mkPatch  
mkPatch.c /home/vishal/legato_framework/legato/framework/liblegato/crc.c  
-I/home/vishal/legato_framework/legato/framework/include  
-I/home/vishal/legato_framework/legato/3rdParty/include 
make[3]: Leaving directory ‘/home/vishal/legato_framework/legato/framework/tools/patchTool/mkPatch’ 
make -C framework/tools/patchTool/mkdiff 
make[3]: Entering directory ‘/home/vishal/legato_framework/legato/framework/tools/patchTool/mkdiff’ 
/usr/bin/gcc -Wall -Werror -o /home/vishal/legato_framework/legato/bin/mkdiff  
mkdiff.c /home/vishal/legato_framework/legato/framework/tools/patchTool/patch_utils.c /home/vishal/legato_framework/legato/framework/liblegato/crc.c  
-I/home/vishal/legato_framework/legato/framework/include  
-I/home/vishal/legato_framework/legato/3rdParty/include  
-I/home/vishal/legato_framework/legato/framework/tools/patchTool 
make[3]: Leaving directory ‘/home/vishal/legato_framework/legato/framework/tools/patchTool/mkdiff’ 
ninja  -f /home/vishal/legato_framework/legato/build/tools/build.ninja 
[1/63] Generating pre-compiled header for mk tools. 
FAILED: /home/vishal/legato_framework/legato/build/tools/precompiled/mkTools.h.gch 
g++ -std=c++0x -MMD -MF /home/vishal/legato_framework/legato/build/tools/precompiled/mkTools.h.gch.d  -Wall -Werror -Wno-deprecated -g -o /home/vishal/legato_framework/legato/build/tools/precompiled/mkTools.h.gch /home/vishal/legato_framework/legato/framework/tools/mkTools/mkTools.h 
/bin/sh: 1: g++: not found 
ninja: build stopped: subcommand failed. 
Makefile.hostTools:43: recipe for target ‘tools’ failed 
make[2]: *** [tools] Error 1 
make[2]: Leaving directory ‘/home/vishal/legato_framework/legato’ 
Makefile:358: recipe for target ‘tools’ failed 
make[1]: *** [tools] Error 2 
make[1]: Leaving directory ‘/home/vishal/legato_framework/legato’ 
Makefile:33: recipe for target ‘legato_wp76xx’ failed 
make: *** [legato_wp76xx] Error 2
             
            
               
               
               
            
            
           
          
            
              
                dfrey  
                
               
              
                  
                    June 27, 2019,  7:47pm
                   
                   
              4 
               
             
            
              It seems like you don’t have g++ installed.
             
            
               
               
               
            
            
           
          
            
            
              Hi @dfrey , 
Now On make red_76xx 
error:
NOTE: When using leaf, these TOOLCHAIN_X variables aren’t needed. 
TOOLCHAIN_DIR=/opt/swi/SWI9X07Y_02.18.06.00/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi  
TOOLCHAIN_PREFIX=arm-poky-linux-gnueabi-  
mksys -t wp76xx --object-dir=build/red_wp76xx --output-dir=build/update_files/red_wp76xx red.sdef 
** Warning: Ignoring empty app specification 
** Warning: Ignoring empty app specification 
** Warning: Ignoring empty app specification 
** ERROR: 
/home/vishal/legato_framework/legato/modules/WiFi/service/daemon/Component.cdef:15:4: error: Couldn’t find source file ‘/home/vishal/legato_framework/legato/modules/WiFi/service/platformAdaptor//home/vishal/mangOH/linux_kernel_modules/cypwifi/scripts/pa_wifi.sh/pa_wifi_client_ti.c’ 
Makefile:94: recipe for target ‘red_wp76xx’ failed 
make: *** [red_wp76xx] Error 1