Firefly-RK3288 Buy Spec

Quad-Core Cortex-A17 open source board, with Mali-T760 MP4 Graphics Processing, supports Android and Linux systems, has rich external extension interfaces.


Update time:2017-11-03 Views:1668

1 Go language

Go, also know as golang, is a program language developed by Google in 2007 by Robert Griesemer, Rob Pike, and Ken Thompson.
Go is an open source program language which makes it easy to a build simple, reliable, and efficient software. The Go language is used in some of mainstream operating systems, such as: Windows, Linux and Mac OS X.

Today, Go language began to be known by more and more programers. So many companies started to use the Go language to develop projects. So what kind of features make Go Language attract so many eyes?  Let’s take a look at some of the features about Go language:

  1. Go language retention but significantly simplifies the pointer.

  2. Go Language support multi-parameter return.

  3. Goroutine, this is the signature feature of the Go language. We just use a simple word of go, then you can achieve a similar effect like thread without the need for tedious lock operation and thread operations.

  4. Interface, it's one of the many users favorite properties. It's interchangeable between the interface and the struct.

After reading the Introduction of the Go language, do you have an interest about the Go language?  
Here is the installation tutorial about Golang. Let's GO! GO !! GO !!!

2 Install Go in RK3288

Golang official website:

Download the Firefly-RK3288_Ubuntu14.04 and upgrading the firmware.
Here are two installation methods. We recommend to use the second, because the first version is lower than the second.

2.1 Install from warehouse

$ sudo apt-get install golang

If the installation fails, try:

$ sudo add-apt-repository ppa:gophers/go
$ sudo apt-get update
$ sudo apt-get install golang-stable

2.2 Install from package

If you want to install golang, you need to install gcc tools first. Because some features of golang are written with C language.

$ sudo apt-get install bison gawk gcc libc6-dev make

If the installation is unsuccessful, retry after update.

$ sudo apt-get update

Download and unzip:

$ cd /home/firefly/
$ wget
$ sudo tar -C /usr/local -xzf go1.4.2.linux-386.tar.gz


$ cd /usr/local/go/src
$ sudo ./all.bash

If all.bash not run, modify the permissions and try again.

$ chmod a+x all.bash

If the installation is successful, show:

Installed Go for linux/arm in /usr/local/go
Installed commands in /usr/local/go/bin
*** You need to add /usr/local/go/bin to your PATH.

Modify the configuration:

$ vi $HOME/.profile

Added to the end:

$ export PATH=$PATH:/usr/local/go/bin 
$ export GOPATH=/home/firefly/go

Save and exit.
Then take effect the profile:

$ source $HOME/.profile

Detects whether the installation was successful:

$ go version


go version go1.4.2 linux/arm

3 Go_Led

Then we take the author tjCFeng's program for example.
Install git.(Skip this step if you have installed)

$ sudo apt-get install git

Download GoRK3288 Library:

$ go get

Create goled.go file:

$ cd /home/firefly/go
$ mkdir src/goled
$ vi src/goled/goled.go

Enter the following:

package main
import (
func main() {
	defer RK3288.FreeRK3288()
	P8A1, ok := RK3288.CreateGPIO(RK3288.P8, RK3288.A1)
	if ok {
		if P8A1.GetData(){
			fmt.Println("power_led off")
			fmt.Println("power_led on")

Save exit and return to the src directory.Generate executable files:

$ go install goled/
$ sudo ./bin/goled

You can see PowerLED Off.
Run again,PowerLED ON.

4 GoRK3288 library download