So far I have been testing my application on this Embest ARM board by manually starting it up from the Shell port. (Linux comes pre-installed on this board.) Today I tried to make it start automatically on boot-up, and it worked, but I'm not sure I'm doing it the right way. Here is what I did:
There is a start-up script in /etc/init.d/rcS. I edited that start-up script to include an invocation of my application. As a test, I included within the application an initial call to printf:
printf("\r\nWe are starting up\r\n");
When the application is started manually, this message appears on the Shell port, which is the main serial port on the board. But when my application is started from /etc/init.d/rcS script, then this message does not appear. This is an inconvenience, because I have several startup error messages that might be generated from my application if certain inits fail. These messages will not be very useful if they never appear.
The second problem is of more concern to me. I don't know how to interrupt the boot process in case my application bombs. And even if it doesn't bomb, and I want to copy in an update (using the cp command from a flash memory stick), I can't do it while the program is running because the executable is busy. I was able to issue a killall Shell command for my application and stop it so I could unlock the executable for updating. So I can make do. But I wonder if this is the usual recommended way to develop an application for a system that has Linux pre-installed and where I do not want to make any changes to the underlying pre-installed system.
Robert Scott Ypsilanti, Michigan