App start helloworld doesn't start the application

Hi I have followed the instructions on http://legato.io/legato-docs/latest/howToPortLegacyC.html to test porting of leacy applications, and the legacyapp executes OK if its not wrapped within the legato app management. I have created an adef file as below but app status shows it as “stopped” and when do app start helloworld, it doesn’t do anything. app status still shows it as stopped. How can I get it started and see the helloworld response?

// Disable the sandbox security to make things a little easier.
sandboxed: false
start: auto
version: 0.1

// Put the cross-compiled legacy program in the app’s bin directory.
// [x] = make it executable.
bundles:
{
file:
{
[x] helloworld /bin/
}
}

// Tell the Supervisor to start this program when the application is started.
processes:
{
run:
{
( helloworld )
}
}

Try setting start: manual and then run logread -f in a different terminal before you do app start yourApp so that you can see the logs which will hopefully tell you why your app is failing.

Hi David, I did that and receivedthe following

root@swi-mdm9x15:~# logread -f
Dec 13 01:58:00 swi-mdm9x15 user.info Legato: INFO | supervisor[466]/supervisor T=main | resourceLimits.c SetRLimitValue() 282 | Setting resource limit maxCoreDumpFileBytes to value 102400.
Dec 13 01:58:00 swi-mdm9x15 user.info Legato: INFO | supervisor[466]/supervisor T=main | resourceLimits.c SetRLimitValue() 282 | Setting resource limit maxFileBytes to value 102400.
Dec 13 01:58:00 swi-mdm9x15 user.info Legato: INFO | supervisor[466]/supervisor T=main | resourceLimits.c SetRLimitValue() 282 | Setting resource limit maxLockedMemoryBytes to value 8192.
Dec 13 01:58:00 swi-mdm9x15 user.info Legato: INFO | supervisor[466]/supervisor T=main | resourceLimits.c SetRLimitValue() 282 | Setting resource limit maxFileDescriptors to value 256.
Dec 13 01:58:00 swi-mdm9x15 user.info Legato: INFO | supervisor[466]/supervisor T=main | resourceLimits.c SetRLimitValue() 282 | Setting resource limit maxMQueueBytes to value 512.
Dec 13 01:58:00 swi-mdm9x15 user.info Legato: INFO | supervisor[466]/supervisor T=main | resourceLimits.c SetRLimitValue() 282 | Setting resource limit maxThreads to value 20.
Dec 13 01:58:00 swi-mdm9x15 user.info Legato: INFO | supervisor[466]/supervisor T=main | resourceLimits.c SetRLimitValue() 282 | Setting resource limit maxQueuedSignals to value 100.
Dec 13 01:58:00 swi-mdm9x15 user.info Legato: INFO | supervisor[466]/supervisor T=main | proc.c proc_Start() 1234 | Starting process ‘helloworld’ with pid 2432
Dec 13 01:58:00 swi-mdm9x15 user.info Legato: INFO | supervisor[2432]/supervisor T=main | proc.c proc_Start() 1199 | Execing 'helloworld’
Dec 13 01:58:00 swi-mdm9x15 user.err Legato: =ERR= | serviceDirectory[470]/serviceDirectory_exe T=main | serviceDirectory.c DispatchToServer() 713 | Client (uid 0 ‘root’, pid 2432) disagrees with server (uid 0 ‘root’, pid 785) on protocol ID of service ‘le_data’ ('66872a4
Dec 13 01:58:00 swi-mdm9x15 user.emerg Legato: EMR | UNKNOWN[2432]/framework T=main | LE_FILENAME ReceiveSessionOpenResponse() 684 | Unexpected server response: -6 (LE_FAULT).
Dec 13 01:58:00 swi-mdm9x15 user.info Legato: INFO | supervisor[466]/supervisor T=main | proc.c proc_SigChildHandler() 1986 | Process ‘helloworld’ (PID: 2432) has exited with exit code 1.
Dec 13 01:58:00 swi-mdm9x15 user.info Legato: INFO | supervisor[466]/supervisor T=main | proc.c GetFaultAction() 1788 | No fault action specified for process ‘helloworld’. Assuming ‘ignore’.
Dec 13 01:58:01 swi-mdm9x15 user.warn Legato: -WRN- | supervisor[466]/supervisor T=main | app.c app_SigChildHandler() 3355 | Process ‘helloworld’ in app ‘helloworld’ faulted: Ignored.
Dec 13 01:58:01 swi-mdm9x15 user.warn Legato: -WRN- | _appStopClient[2433]/framework T=main | LE_FILENAME CreateSocket() 550 | Socket opened as standard i/o file descriptor 2!
Dec 13 01:58:01 swi-mdm9x15 user.info Legato: INFO | supervisor[466]/supervisor T=main | apps.c DeactivateAppContainer() 348 | Application ‘helloworld’ has stopped.

Dec 13 01:58:00 swi-mdm9x15 user.err Legato: =ERR= | serviceDirectory[470]/serviceDirectory_exe T=main | serviceDirectory.c DispatchToServer() 713 | Client (uid 0 ‘root’, pid 2432) disagrees with server (uid 0 ‘root’, pid 785) on protocol ID of service ‘le_data’ ('66872a4

This indicates to me that the Legato version running on the target is different from the Legato version you are building against.

Can you verify that the Legato versions match? Run legato version on the target and check $LEGATO_ROOT in your build machine.