Power & Source of Big Ideas

How to get start compile programing for nano pi

Moderators: chensy, FATechsupport

hello dears... I'm a beginner to nano pi but a kind of professional in electronic and c programming.
I have a nano pi 2 fire with its 7 inch standard LCD. i have boot it with android. but now i have a electronic circuit like a metal detector with SPI out that can connect to any controller. i want to make a program for nano pi that comes instead of its Operating System (like android), that connect to my circuit and shows my own menus and run my program. actually Im reading many books about linux kernel, GCC and programming but i have no idea where should i get start. maybe i should start with programming on a OS like android and make it do my own or maybe not. i need some leads to where should i get start and good references or tutorials(other than nano pi wiki tutorials). i have done this job with an earlier version of ARM controller like cortex M3 and operating systems like RTOS.
I would be so thankful to anyone can help me.
by the way, I have an apologize about my English that in not so well.
Even on the smallest FriendlyARM unit, the NanoPi, there is enough RAM and flash to run Qt programs. Using Qt Creator to make your menus is going to be a lot less painful then writing your own menus in C or C++. See Qt-embedded images for most of their product.

If this is a learning experience then do it all from "scratch". At least you will appreciate all the effort that has gone into Qt to base your base programs on.

I have recently been using Matrix code to talk to various bits of hardware, ie 1-wire, GPIO. SPI is enabled in the matrix-kernel, which I might use to talk to a RF wireless module.

The biggest challenge, that I see, is trying to talk to the LCD to display stuff on it. There is a Matrix LCD project that might be a good place to start and then try to dig down to the lower levels to increase your understanding.
davef wrote:
Even on the smallest FriendlyARM unit, the NanoPi, there is enough RAM and flash to run Qt programs. Using Qt Creator to make your menus is going to be a lot less painful then writing your own menus in C or C++. See Qt-embedded images for most of their product.

If this is a learning experience then do it all from "scratch". At least you will appreciate all the effort that has gone into Qt to base your base programs on.

I have recently been using Matrix code to talk to various bits of hardware, ie 1-wire, GPIO. SPI is enabled in the matrix-kernel, which I might use to talk to a RF wireless module.

The biggest challenge, that I see, is trying to talk to the LCD to display stuff on it. There is a Matrix LCD project that might be a good place to start and then try to dig down to the lower levels to increase your understanding.


Im really thankful for your help. I had installed QT before but i hadn't work with this program. now i gonna get start with that instead of learning linux kernel. just a question that i have is, i thought qt programs should run on a OS like debian with a kernel like linux. you mean i can make standalone program with qt that doesnt need any OS and kernel??? and how can i do if i want run my program under linux kernel??
as i know the linux kernel has been used in most of embedded devices and this is my reason to be experience on it, instead of find an easy way to do this project. because of that im looking for a good reference(maybe an ebook or web site) about how to build a program that run on linux kernel and use its feature.
The book that i found and started to reading is Linux Kernel Development Third Edition by Robert Love. but its a kind of theoretical book and not tuturial.
and again appreciates a lot for your guiding.
You could do it without an OS but it is going to be a long painful process. I would suggest starting on a Debian linux system using the Qt-embedded images

There were lots of tutorials around for Qt on the mini2440, search <mini2440vietnam> he produced some good stuff.

Searching < nanopi qt-embedded> produces lots of hits. Have a look through those.
davef wrote:
You could do it without an OS but it is going to be a long painful process. I would suggest starting on a Debian linux system using the Qt-embedded images

There were lots of tutorials around for Qt on the mini2440, search <mini2440vietnam> he produced some good stuff.

Searching < nanopi qt-embedded> produces lots of hits. Have a look through those.


i did all as you said and run debian linux but i couldnt find the file target-ate-4.8.6-to-hostpc.tgz to setup my QT for nano pi2
Did you get to this page?
http://wiki.friendlyarm.com/wiki/index.php/Ubuntu_Core_with_Qt-Embedded and find this file:
nanopi2-ubuntucore-with-qt-embedded-sd4g.img.zip ?

I see the download link does not take you to it. Check out the other products mentioned as I have downloaded this before.

I tried running a Qt-embedded image, but after getting the start page I didn't know what to do next. There must be some relevant Qt-embedded tutorials around.

I don't know what <target-ate-4.8.6-to-hostpc.tgz> is for or where you found it.
davef wrote:
Did you get to this page?
http://wiki.friendlyarm.com/wiki/index.php/Ubuntu_Core_with_Qt-Embedded and find this file:
nanopi2-ubuntucore-with-qt-embedded-sd4g.img.zip ?

I see the download link does not take you to it. Check out the other products mentioned as I have downloaded this before.

I tried running a Qt-embedded image, but after getting the start page I didn't know what to do next. There must be some relevant Qt-embedded tutorials around.

I don't know what <target-ate-4.8.6-to-hostpc.tgz> is for or where you found it.


Yes. I visited that page and downloaded the file that you said. But that is the image file that should be load into sd card to boot nanopi with debian linux. A little down that page it has said the file 《targed-ate-4.8.6-to-hostpc.tgz》 should be download and set it up in QT to compile the programs for nanopi linex debian. Also there is a download link right there but there is no such a file there. In normal mode QT compiles programs for desktop and doesnt run nano pi. The QT embedded images are only available on boards like rasbpberry, beaglebone and etc not nano pi. Also i did try the tuturial for creating embedded setting on QT but it was a hard work and i dont have enough exprience to do.
Right, there seem to be many missing links. Perhaps start another thread that will catch the attention of the FriendlyArm tech people.

Sorry, can't help any further on this problem.
I'm late to the thread here but I recommend to anyone in this scenario to just start with the Debian installation and the Geany IDE with the gcc or g++ (C, C++ respectively) compiler.

On the NanoPi, Debian has the minimalistic LXDE desktop environment, and the whole thing boots in about 15 seconds. Also compiling and running simple programs takes just a couple of seconds.

I don't recommend attempting a baremetal approach with these boards since the processors change all the time. I wanted to go the baremetal way before for performance, but it would be a herculean task on these chips, only for them to be phased out a couple years down the road.

Linux on the other hand has all the drivers and the compiling and running is pretty straightforward. The only real drawback is that Linux struggles with sub-millisecond real time. But this can be worked around with external chips, or a very carefully planned configuration.

There is a learning curve to Linux but I think this is the best setup. I come from Windows and Visual Studio and really love this lean system.

Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest (based on users active over the past 5 minutes)
Most users ever online was 47 on Wed Feb 21, 2018 7:00 am

Users browsing this forum: No registered users and 1 guest