zuuuuk  
                
               
                 
                 
              
                  
                    May 25, 2018, 12:06pm
                   
                   
              1 
               
             
            
              Hello, i used mangoh green and building mangoh project from github.
I add spiService  GitHub - mangOH/SpiService: This was an alpha release of the SpiService which was ultimately integrated into the core Legato application framework. Use the version from legato, not this version. 
When l build project . the compiler generates an error
[401/1120] Generating IPC interface code 
FAILED: ifgen --output-dir /home/stepan/legatoDistSourceToolchain/ds/workspase/mangOH/build/green_wp85/api/3c3669211b4ad8c16c21c5d35cee83e2/server --gen-server --gen-server-interface --gen-local --name-prefix spi --import-dir /home/stepan/legatoDistSourceToolchain/workspase/legato-18.04.0/interfaces --import-dir /home/stepan/legatoDistSourceToolchain/workspase/legato-18.04.0/framework/include --import-dir . --import-dir /home/stepan/legatoDistSourceToolchain/workspase/legato-18.04.0/interfaces/modemServices --import-dir /home/stepan/legatoDistSourceToolchain/workspase/legato-18.04.0/interfaces/positioning --import-dir /home/stepan/legatoDistSourceToolchain/workspase/legato-18.04.0/interfaces/atServices --import-dir /home/stepan/legatoDistSourceToolchain/ds/workspase/mangOH/apps/MuxControl --import-dir /home/stepan/legatoDistSourceToolchain/ds/workspase/mangOH/apps/DataRouter --import-dir /home/stepan/legatoDistSourceToolchain/ds/workspase/mangOH/apps/MqttClient --import-dir /home/stepan/legatoDistSourceToolchain/ds/workspase/mangOH/apps/SocialService/interfaces /home/stepan/legatoDistSourceToolchain/ds/workspase/mangOH/apps/SpiService/spi.api 
/home/stepan/legatoDistSourceToolchain/ds/workspase/mangOH/apps/SpiService/spi.api:40:4: error: Unknown type u’int’ 
/home/stepan/legatoDistSourceToolchain/ds/workspase/mangOH/apps/SpiService/spi.api:43:4: error: Unknown type u’int’ 
[401/1120] Compiling C++ source 
ninja: build stopped: subcommand failed. 
Makefile:39: ошибка выполнения рецепта для цели «green_wp85» 
make: *** [green_wp85] Ошибка 1
How to remove this error?
             
            
               
               
               
            
            
           
          
            
            
              I saw the official release for WP85 is R15: 
https://source.sierrawireless.com/resources/airprime/software/wpx5xx/wpx5xx-firmware-release-15/ 
It is using legato version 16.10.4. 
Is that you must use legato 18.04.0?
             
            
               
               
               
            
            
           
          
            
            
              BTW, where do you download the official WP85 toolchain for legato 18.04.0?
             
            
               
               
               
            
            
           
          
            
            
              for build and install toolchain , i used file  poky-swi-ext-glibc-x86_64-meta-toolchain-swi-ext-armv7a-vfp-neon-toolchain-swi-ext-1.7.3.sh
compiller  arm-poky-linux-gnueabi-gcc -v 
gcc version 4.9.1 (GCC)
             
            
               
               
               
            
            
           
          
            
            
              
 jyijyi:
 
where do you download
 
 
I do not remember where this file came from.
on this page there is no download toolchain
             
            
               
               
               
            
            
           
          
            
            
              Can you compile the legato version 18.04 with your WP85 compiler? 
(make wp85) 
If yes, probably it already include the SPI application in default.sdef.
$LEGATO_ROOT/apps/platformServices/spiService
 
And in the mangOH.sdef, it will include the driver:
$LEGATO_ROOT/drivers/spisvc/spisvc
Is that useful to you?
             
            
               
               
               
            
            
           
          
            
            
              yes you are absolutely right. Thank you. 
but I want to use the component from mangoh. 
now I get the following error. 
… 
[9/9] Packaging app 
make[3]: выход из каталога «/home/stepan/legatoDistSourceToolchain/workspase/legato-18.04.0»
 Computing MD5 hash for contents of framework bin and lib directories. 
md5= ( find /home/stepan/legatoDistSourceToolchain/workspase/legato-18.04.0/build/wp85/framework/bin && \ 		find /home/stepan/legatoDistSourceToolchain/workspase/legato-18.04.0/build/wp85/framework/bin -type f | xargs cat && \ 		find /home/stepan/legatoDistSourceToolchain/workspase/legato-18.04.0/build/wp85/framework/bin -type l | xargs -r -n 1 readlink && \ 		find /home/stepan/legatoDistSourceToolchain/workspase/legato-18.04.0/build/wp85/framework/lib && \ 		find /home/stepan/legatoDistSourceToolchain/workspase/legato-18.04.0/build/wp85/framework/lib -type f | xargs cat && \ 		find /home/stepan/legatoDistSourceToolchain/workspase/legato-18.04.0/build/wp85/framework/lib -type l | xargs -r -n 1 readlink \ 	  ) | md5sum &&  
md5=${md5%% *} &&  
echo “$md5” > /home/stepan/legatoDistSourceToolchain/workspase/legato-18.04.0/build/wp85/framework/md5 
make[2]: выход из каталога «/home/stepan/legatoDistSourceToolchain/workspase/legato-18.04.0» 
make[1]: выход из каталога «/home/stepan/legatoDistSourceToolchain/workspase/legato-18.04.0» 
TOOLCHAIN_DIR=/opt/swi/y17-ext/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi  
TOOLCHAIN_PREFIX=arm-poky-linux-gnueabi-  
MANGOH_BOARD=GREEN  
mksys -t wp85 --object-dir=build/green_wp85 --output-dir=build/update_files/green mangOH.sdef 
** ERROR: 
/home/stepan/legatoDistSourceToolchain/ds/workspase/mangOH/mangOH.sdef:50:4: error: App ‘spiService’ added to the system more than once. 
/home/stepan/legatoDistSourceToolchain/workspase/legato-18.04.0/default.sdef:31:4: note: Previously added here. 
Makefile:39: ошибка выполнения рецепта для цели «green_wp85» 
make: *** [green_wp85] Ошибка 1
How can I fix this? 
rename. or something else
             
            
               
               
               
            
            
           
          
            
              
                jyijyi  
                
               
              
                  
                    May 28, 2018, 10:07am
                   
                   
              9 
               
             
            
              It is because default.sdef in legato source code already having the application spiService. 
Any reason you must add spiService in mango.sdef?
             
            
               
               
               
            
            
           
          
            
              
                zuuuuk  
                
               
                 
              
                  
                    May 28, 2018, 10:33am
                   
                   
              10 
               
             
            
              
because it is written in clause 3. instruction for mangOH/SpiService.
In mangOH/mangoh.sdef add an app entry for the service: $MANGOH_ROOT/apps/SpiService/spiService.adef
 
             
            
               
               
               
            
            
           
          
            
              
                jyijyi  
                
               
              
                  
                    May 28, 2018, 10:55am
                   
                   
              11 
               
             
            
              Have you tried comment out the line in default.sdef in legato source and add the line in mango.sdef ?
Another option is you copy this source code to overwrite the one in legato source in case you would like to use this spi source version.
             
            
               
               
               
            
            
           
          
            
              
                zuuuuk  
                
               
              
                  
                    May 28, 2018, 11:00am
                   
                   
              12 
               
             
            
              
Yes it is
Yes, now I’ll try to do it.
             
            
               
               
               
            
            
           
          
            
              
                zuuuuk  
                
               
              
                  
                    May 28, 2018, 11:49am
                   
                   
              13 
               
             
            
              I did the following. 
I replaced the file spiService.adef  . in legato-18.04.0/apps/platformServices. 
it indicates that a component of mangon .
version: 0.1.0 
sandboxed: true 
start: auto
executables: 
{ 
spiService = (/home/stepan/legatoDistSourceToolchain/ds/workspase/mangOH/apps/SpiService/spiServiceComponent) 
}
processes: 
{ 
envVars: 
{ 
LE_LOG_LEVEL = DEBUG 
}
run:
{
    (spiService)
}
faultAction: restart
 
}
requires: 
{ 
device: 
{ 
[rw] /dev/sierra_spi /dev/ 
} 
}
extern: 
{ 
spiService.spiServiceComponent.spi 
}
I recompile legato-18.04  .  make wp85  
but I get an error.
/home/stepan/legatoDistSourceToolchain/ds/workspase/mangOH/apps/SpiService/spi.api:40:4: error: Unknown type u’int’  
/home/stepan/legatoDistSourceToolchain/ds/workspase/mangOH/apps/SpiService/spi.api:43:4: error: Unknown type u’int’  
[81/796] Generating IPC interface code  
ninja: build stopped: subcommand failed.  
Makefile:439: ошибка выполнения рецепта для цели «system_wp85»  
make: *** [system_wp85] Ошибка 1 
             
            
               
               
               
            
            
           
          
            
              
                jyijyi  
                
               
              
                  
                    May 29, 2018,  1:29am
                   
                   
              14 
               
             
            
              I don’t see compilation problem. 
I did the following:
git clone --recursive git://github.com/mangOH/SpiService 
In legato 18.4.0, default.sdef , change to the following: 
 
 
apps: 
{ 
// Platform services. 
$LEGATO_ROOT/apps/platformServices/audioService 
$LEGATO_ROOT/apps/platformServices/cellNetService 
$LEGATO_ROOT/apps/platformServices/dataConnectionService 
$LEGATO_ROOT/apps/platformServices/fwupdateService 
$LEGATO_ROOT/apps/platformServices/modemService 
$LEGATO_ROOT/apps/platformServices/positioningService 
$LEGATO_ROOT/apps/platformServices/powerMgr 
$LEGATO_ROOT/apps/platformServices/secStore 
$LEGATO_ROOT/apps/platformServices/smsInboxService 
$LEGATO_ROOT/apps/platformServices/voiceCallService 
$LEGATO_ROOT/apps/platformServices/gpioService 
$LEGATO_ROOT/apps/platformServices/atService 
//$LEGATO_ROOT/apps/platformServices/spiService
/home/owner/Downloads/SpiService/spiService
 
 
“make wp85” in legato folder 
 
             
            
               
               
               
            
            
           
          
            
              
                dfrey  
                
               
              
                  
                    May 29, 2018,  4:53am
                   
                   
              15 
               
             
            
              From the mangOH/SpiService Readme.md:
This was an alpha release of the SpiService which was ultimately integrated into the core Legato application framework. Use the version from legato, not this version.
 
             
            
               
               
               
            
            
           
          
            
              
                zuuuuk  
                
               
              
                  
                    May 30, 2018, 12:11pm
                   
                   
              16 
               
             
            
              jyijyi, hello. 
I did what you wrote above. 
and got the same problem.
echo “$md5” > /home/stepan/legatoDistSourceToolchain/workspase/legato-18.04.0/build/wp85/framework/md5 
make[1]: выход из каталога «/home/stepan/legatoDistSourceToolchain/workspase/legato-18.04.0» 
mksys -t wp85 -w build/wp85/system -o build/wp85 /home/stepan/legatoDistSourceToolchain/workspase/legato-18.04.0/modules/WiFi/wifi.sdef  
-d build/wp85/debug --cflags=“-O2 -fno-omit-frame-pointer” 
[82/796] Generating IPC interface code 
FAILED: ifgen --output-dir /home/stepan/legatoDistSourceToolchain/workspase/legato-18.04.0/build/wp85/system/api/3c3669211b4ad8c16c21c5d35cee83e2/server --gen-server --gen-server-interface --gen-local --name-prefix spi --import-dir /home/stepan/legatoDistSourceToolchain/workspase/legato-18.04.0/interfaces --import-dir /home/stepan/legatoDistSourceToolchain/workspase/legato-18.04.0/framework/include --import-dir /home/stepan/legatoDistSourceToolchain/workspase/legato-18.04.0/modules/WiFi --import-dir /home/stepan/legatoDistSourceToolchain/workspase/legato-18.04.0/interfaces/modemServices --import-dir /home/stepan/legatoDistSourceToolchain/workspase/legato-18.04.0/interfaces/positioning --import-dir /home/stepan/legatoDistSourceToolchain/workspase/legato-18.04.0/interfaces/atServices /home/stepan/legatoDistSourceToolchain/ds/workspase/mangOH/apps/SpiService/spi.api 
/home/stepan/legatoDistSourceToolchain/ds/workspase/mangOH/apps/SpiService/spi.api:40:4: error: Unknown type u’int’ 
/home/stepan/legatoDistSourceToolchain/ds/workspase/mangOH/apps/SpiService/spi.api:43:4: error: Unknown type u’int’ 
[82/796] Generating IPC interface code 
ninja: build stopped: subcommand failed. 
Makefile:439: ошибка выполнения рецепта для цели «system_wp85» 
make: *** [system_wp85] Ошибка 1
my default.sdef  
#include  “$LEGATO_ROOT/legatoTargetConfig.sinc”
#include  “$LEGATO_ROOT/apps/platformServices/defaultAirVantage.sinc” 
#include  “$LEGATO_ROOT/apps/platformServices/defaultAtCommands.sinc” 
#if  ${LEGATO_EXTRA_SINC} = “” 
#else  
#include  “$LEGATO_EXTRA_SINC” 
#endif 
apps: 
{ 
// Platform services. 
$LEGATO_ROOT/apps/platformServices/audioService 
$LEGATO_ROOT/apps/platformServices/cellNetService 
$LEGATO_ROOT/apps/platformServices/dataConnectionService 
$LEGATO_ROOT/apps/platformServices/fwupdateService 
$LEGATO_ROOT/apps/platformServices/modemService 
$LEGATO_ROOT/apps/platformServices/positioningService 
$LEGATO_ROOT/apps/platformServices/powerMgr 
$LEGATO_ROOT/apps/platformServices/secStore 
$LEGATO_ROOT/apps/platformServices/smsInboxService 
$LEGATO_ROOT/apps/platformServices/voiceCallService 
$LEGATO_ROOT/apps/platformServices/gpioService 
$LEGATO_ROOT/apps/platformServices/atService 
// $LEGATO_ROOT/apps/platformServices/spiService 
$LEGATO_ROOT/apps/platformServices/portService 
/home/stepan/legatoDistSourceToolchain/ds/workspase/mangOH/apps/SpiService/spiService
// Command-line tools.
$LEGATO_ROOT/apps/tools/tools
 
}
             
            
               
               
               
            
            
           
          
            
              
                jyijyi  
                
               
              
                  
                    May 30, 2018, 12:31pm
                   
                   
              17 
               
             
            
              Maybe you should directly use the one in legato source as that one is just alpha release…