"Serial" GO language series 1.Rockchip RK3288, go! go!! GO!!!

Source: Internet
Author: User
This is a creation in Article, where the information may have evolved or changed.

Preface:
Recently looked at Google's go language, found a little meaning, this open source project is prepared to use Golang to achieve.
In fact, the Development Board itself has implemented various functions of the driver, but sometimes in the use of some trouble, it may be necessary to modify the DTS file to recompile the kernel to be able to use a feature, so it is intended to develop this uio-driven open source project, convenient program writing. Of course, UiO is not omnipotent, such as interruption, I have not found a good method, can completely throw away the kernel version of the differences resulting in the need to recompile the driver to provide interrupt messages.
In accordance with the Convention first of all, start with the introduction of the Go language, the installation of the development environment, and then a little explanation of the syntax of the go involved in the project, and then take a look at the entire project file composition and the use of each library.
Since the development of the Swiss core micro-reference manual is generally not open to individuals, but after the Kai Technology company (hereinafter referred to as Firefly) efforts, published all the source code and part of the document, so that development can be carried out smoothly, So this open source project was developed based on the Lubuntu environment of the firefly-rk3288 Development Board.


   The go language is the second open source programming language released by Google 2009, optimized for programming of multiprocessor system applications, using go-compiled programs that are comparable to C or C + + code, and more secure, supporting parallel processes And you can reduce the complexity of your code without losing application performance.
Although go is not yet mature, but Google's app engine and other parts of the product has started to use the go language to write, go website is built with go. The software is designed for building server software (such as Google's Gmail). Google believes that go can also be applied to other areas, including the implementation of software in the browser, it will become the Internet Era C language.
Go can be compiled into a native native program, the compiled program has included the runtime library, a single file in the deployment of the same platform directly to the other board can be directly run, very convenient. While using go to build the project, as long as not involved in the operating system specific features or interfaces, can not make changes directly on Windows, Linux, arm compiled, and now supports the development of Android (version 1.4), the next version is expected to support the development of iOS. These features are the same as free Pascal.
Where go is currently lacking: no graphical interface (officially unpublished), no dedicated development tools (less on ARM Linux)

With the rise of internet of things technology, using Go's high concurrency feature to implement control server will greatly improve the performance of the operation to simplify the development of the difficulty, and can be a node control of various peripherals. This node device can even be arm system, and the more core performance is higher, so this development uses the high-performance firefly-rk3288 Development Board to develop.
Mention firefly-rk3288 Development Board, I have to praise once again, this development board design very attentively, the arrangement of various components is not crowded, not loose, pleasing to the eye. As for the performance of RK3288, needless to say, the same scheme of flat-panel performance testing has been very detailed. If you want to learn more about the board, you can refer to this review articlehttp://www.eeboard.com/evaluation/firefly-rk3288-review/。




OK, the board is finished, say go language compiler environment. Installing go under Lubuntu is easy and can be installed directly from the New Lidri search. However, the version here is a bit low, 1.2x. Now 1.4.2 has been released, it is not troublesome to compile themselves, and the performance of the Board is very high, including all the tests are also about 10 minutes.

Download, to https://github.com/golang/go download zip file or direct git, not used to go to http. Golangtc.com/download Direct download of tar.gz package is also possible.
installation, the most convenient way is to extract into the/home/go, and then into the SRC directory, run All.bash began to automatically compile. About 10 minutes or so, compile, open the. profile file in/home, and add it at the end:


To save the reboot, the GO environment has been set up.

Next, install a more convenient editing environment. The go language currently does not have a dedicated IDE development environment, generally on Windows or Linux using Liteide, ecplise, Sublimetext, etc., but in the arm environment due to the low version of the source, it is troublesome to use. So after trying a few tools found Gedit and Geany can also.
Here is an example of geany installation. Or to the new Geany search, the version is 1.23, the default already supports go highlighting and code autocomplete function. The installation of things very little soon


after tagging includes only two dependencies, Geany master file and Geany-common, click Apply to start the installation.




After the installation can open or create a new go file, syntax highlighting looks more comfortable.






    GoRK3288 library in https:// github.com/tjcfeng/gork3288 download.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.