Absolute Newbie here

You have a problem with your Wandboard and want to ask the community for help.

Absolute Newbie here

Postby pianoman » Wed Jun 22, 2016 3:13 pm

Hi everyone,

I'm completely new to application processors and I'd like to know how to get started with writing code that can run on the Wandboard. I have a background in embedded systems, so I've written code for microcontrollers (up to the Cortex M4) but never for application processors and so I find the terminology (SDKs, Kernels, Yocto) a little alien. I've always worked in a Windows environment and at this moment Linux is not an option for me.

So what I mean to ask is... where do I start? Say, if I want to display a white square on a black background on a display attached to the HDMI output of the wandboard, what are the tools and expertise I'll need? I have a few ARM-compatible IDEs installed, I have Visual Studio, JTAG and little tools like Win32DiskImager which I could program bootable images from. But I just don't know where to start and a lot of internet searching leads me to links that assume some basic knowledge of operating systems and the like.

I'd love any help that you could offer me. Point me in the direction of any links that I should read up on, and I'll do that too.

Thanks :)
pianoman
 
Posts: 8
Joined: Wed Jun 22, 2016 3:06 pm

Re: Absolute Newbie here

Postby Tapani » Thu Jun 23, 2016 2:39 am

pianoman,

an answer to this question could probably be a topic of a book or two...

A modern ARM system is not really as resource constrained as a traditional embedded system.
Personally I like to view the Wandboard as an older PC.
( Just as a comparison: my computer in the early 2000s was a 2x1GHz Pentium III with 1.5GB RAM ... while the WB Quad has 4x1GHz Cortex A9 with 2GB RAM. )

To develop for the Wandboard .. I would see it as either programming for a Linux Desktop (Ubuntu or maybe Yocto), but trying to avoid a lot of library dependencies.
An alternative is to view it as a cell-phone and make apps for an Android device.

There probably are cross compilers (running on x86 but making executables for arm) for Windows, but generally I'd prefer a Linux environment.
Maybe use (our) virtual machine to get started?


Regarding your question about a white square on a black background:

Either you use a graphics toolkit for Linux and Xorg (GTK, Xt, SDL, or the like) or you go hardcore and write the pixels to the framebuffer yourself (the special "file" /dev/fb0 in a linux system contains the graphics memory and is read-write).
Tapani
Site Admin
 
Posts: 705
Joined: Tue Aug 27, 2013 8:32 am

Re: Absolute Newbie here

Postby pianoman » Thu Jun 23, 2016 6:50 am

I was with you till this line:

Either you use a graphics toolkit for Linux and Xorg (GTK, Xt, SDL, or the like) or you go hardcore and write the pixels to the framebuffer yourself (the special "file" /dev/fb0 in a linux system contains the graphics memory and is read-write).


Then I got lost!

But seriously (and I know this makes me look silly) but this surely means I will need to have an OS running on the system that handles all the lower level drivers below? I guess this puts me at a disadvantage, I've never really done programming for a PC.

You mention I'll need a graphics toolkit for Linux. Does this mean a toolkit that develops apps that run on Linux or a toolkit that runs on Linux and can also be used to make apps?

I'm going to download a ready-to-use Linux distro from the Wandboard website and flash it so that I can have a play around.
pianoman
 
Posts: 8
Joined: Wed Jun 22, 2016 3:06 pm

Re: Absolute Newbie here

Postby ClayMontgomery » Thu Jun 23, 2016 3:46 pm

You must choose an OS for any ARM board and everyone uses some derivative of Linux on these boards. Even Android is really Linux-based. There are some digital signage apps that will run content developed on Windows on the Wandboard, such as Lightwing, which requires almost no knowledge of Linux:

http://montgomery1.com/lightwing

Regards, Clay
ClayMontgomery
 
Posts: 70
Joined: Tue Nov 19, 2013 9:14 pm

Re: Absolute Newbie here

Postby Tapani » Fri Jun 24, 2016 3:56 am

Strictly speaking, you do not really need an OS, it is just highly recommended.

Your options are:
(a) Do it all yourself. This is nothing and hacking it bare-metal.
You can reference some of the bootloaders like whoosh or u-boot SPL, and do it all yourself. It usually starts with setting up memory timings etc.

(b) The middle way. U-boot bootloader can act as a very rudimentary operating system. Think early MS-DOS.
You have memory setup, drivers for many but not all interfaces, but you will lack things like multi-threading, MMU memory protection, and will be limited to a single core.
Many things have to be done hacking bare metal registers.

You can compile applications for u-boot using the mkimage tool, a part of the u-boot project.

(c) The recommended way. Load an operating system and treat your Wandboard as a real computer.

Regardless, starting with our pre-compiled images is probably a good idea regardless, to familiarize yourself with the hardware.

pianoman wrote:You mention I'll need a graphics toolkit for Linux. Does this mean a toolkit that develops apps that run on Linux or a toolkit that runs on Linux and can also be used to make apps?


Ment the latter. A set of libraries that allow applications to run on Linux, and a set of headers that allow you to develop for said libraries.
The use of IDE and choice of editors is more heterogenous among Linux programmers than for Windows programmers.
Usually people only refer to libraries and headers needed/used, understanding that everyone's development environemnet is different, even unique, and suited for their own needs and personal preferences.
Tapani
Site Admin
 
Posts: 705
Joined: Tue Aug 27, 2013 8:32 am

Re: Absolute Newbie here

Postby pianoman » Fri Jun 24, 2016 12:23 pm

Okay, that was quite useful, thanks. I'll explore U-boot as an option. If I have more questions I'll pop back in :)
pianoman
 
Posts: 8
Joined: Wed Jun 22, 2016 3:06 pm


Return to Getting started

Who is online

Users browsing this forum: No registered users and 2 guests