Writing the simplest application
#include <stdio.h>
void Main (int argc, char *argv[])
{
int i = 0,j = 0;
for (i=0;i<10;i++)
{
printf ("Hello world..............\r\n");
for (j=0;j<100000;j++)
{};
}
}
and then compile
Arm-linux-gcc-o TST Tst.c-static
Generate TST files and copy them to the ADB folder on the PC side
Then open the ADB and connect to the Android Development Board
Using commands
ADB push tst/system/
The TST file will be uploaded to the system folder of the Linux kernel, if it appears
Failed to copy ' TST ' to '/system/': Read-only file system
First exit the ADB, then remount, namely
ADB remount
After seeing Remount succeeded
Then execute ADB push tst/system/to succeed
Through the Serial printing window into the kernel of the system folder, you can see the TST file, chmod 777 TST Modify Permissions
And then run./tst
You can see the print
Hello world ... .......
Hello world ... .......
Hello world ... .......
Hello world ... .......
Hello world ... .......
Hello world ... .......
Hello world ... .......
Hello world ... .......
Hello world ... .......
Hello world ... .......