1. Download:
Https://docs.labs.mediatek.com/resource/linkit-smart-7688/zh_cn/downloads
I downloaded the openwrt SDK for C/s + + for Linux, tried the following toolchain, but the environment was set up after the prompts me to say that the lack of documents, the fact that I did not find the package in the file, so simply tried the SDK, the results inside very complete.
This package I started in the Ubuntu 16 32, the result is not compatible with a variety of errors, so it is recommended to use in 64 (32-bit 64-bit is really a pit to death me)
After downloading is decompression
TAR-JXVF openwrt-sdk-ramips-mt7688_gcc-4.8-linaro_uclibc-0.9.33.2.linux-x86_64.tar.bz2
Move to a folder after decompression is complete
I moved under the/work.
2. Configure Environment variables
VI ~/.BASHRC
Then add the path to the bin directory at the end
Export path=/work/openwrt-toolchain-ramips-mt7688_gcc-4.8-linaro_uclibc-0.9.33.2.linux-x86_64
Then save the environment variable to use the
SOURCE ~/.BASHRC
3. Compile
MIPSEL-OPENWRT-LINUX-GCC Hello.c-o Hello
4. Run the executable file
Upload Hello file to MT7688 via SCP, modify permissions, run.
Summary: In fact, the whole problem is not difficult, it is difficult to find a variety of blogs in the most direct and appropriate way, in order to get this I follow their links to a lot of bags, some bags do not have a bag how to use a word with a feeling that there is no way to learn the solution, a lot of problems but also finally resolved, long sigh of relief. In order to solve this problem, I remember a lot of commonly used knowledge, such as the various suffix file decompression, environment variables, such as the configuration, nonsense, to study Linux file system-,