MediaTek LinkIt™ Smart 7688 Developer's Guide
© 2015, 2016 MediaTek Inc.
Page 31
This document contains information that is proprietary to MediaTek Inc.
Unauthorized reproduction or disclosure of this information in whole or in part is strictly prohibited.
#
include
<
stdio.h
>
int
main(
int
argc,
char
** argv)
{
printf
(
"
Hello, World!
\n
"
);
}
3)
Enter the following command to cross-compile it.
CC_TOOLS/bin/mipsel-openwrt-linux-g++ helloworld.c -o helloworld
4)
Assuming the host environment is connected to Wi-Fi of the LinkIt Smart 7688; transfer
the output binary named
helloworld
to LinkIt Smart 7688 using SCP. For example:
5)
Finally, execute this program in the SSH terminal of LinkIt Smart 7688:
./helloworld
You should see the string
Hello, World!
as the output.
3.7.
Programming in Python
High-level programming languages are executed by the corresponding languages interpreter in
LinkIt Smart 7688. You can do the programming remotely and send the code to LinkIt Smart 7688
for execution.
3.7.1.
Setting Up Python Programming Environment
The high-level programming environment is simple. You'll need to install a text editor and a tool
to transfer program files between your computer and LinkIt Smart 7688. Please see section 4.7,
“File Editor and Transfer”.
3.7.2.
Hello World Example in Python
1)
Open a text editor, copy and paste the below example code and save it as
helloworld.py
.
"
Hello World!
"
2)
Upload the example to LinkIt Smart 7688 and execute the example code. You do this in
the LinkIt Smart 7688 system console, invoke the Python interpreter by entering the
following commands:
python helloworld.py
And you should see
Hello World!
as the program output.