1

I need to make an architectural decision for developing (actually porting) my embedded solution. I will try to present my case as clearly as possible, and any advice I can get will be appreciated.

Introduction

I have an embedded system, currently developed on ARM11 architecture and ArchLinux OS. It is implemented using all kinds of technologies available under Linux, including C, C++, Bash and Python.

At this time, I would like to port my solution to a tablet, so I am trying to make some decisions about the architecture, based on the requirements of my system.

Requirements

The system is modular, and it runs multiple processes and threads. It also communicates to remote servers and controls the hardware peripherals. These are the basic requirements, at the moment, I will update as discussion develops:

Primary:

  • Dedicated system (minimum amount of other applications running, even in the bg)
  • Multiple processes, ability to set priorities
  • Ability to assign a process to a single CPU Core (cpu affinity)
  • Inter-process communication mechanisms
  • Complete hardware control (WiFi, 3G, GSM, mic, speaker, display, ...)
  • Creating sockets, etc.

Other:

  • Ability to connect a microphone directly to a 3.5mm plug (TRRS connector)
  • Mainstream solution to ensure reliability
  • Future-proof: minimize the porting effort for new tablets and HW

My questions

  • What tablet and OS combination would meet these requirements?
  • How to approach the "dedicated solution" requirement?
  • How to approach the software development, what language and tools to use?

My investigation so far

My investigation so far has been concentrated on the OS choice. The main options seem to be Android and Ubuntu Touch. Here are my thoughts:

Android

Android wins in the mainstream category obviously, but...

I have no experience of Android development, but as far as I can tell, I can either develop a Java application that runs on top of Dalvik, or I can go native via Android NDK. Maybe I can even bypass the whole thing and go native side-by-side of Dalvik, and develop in Python? I guess then I will lose the access to the API for HW access. Not sure how I would access the HW then. But if I go with Java development, this is a sandbox solution, and I am not sure if I can have such a control over the processes, HW and CPU core affinity?

Ubuntu Touch

Developing on Ubuntu Touch would be more like Linux development I am used to, since it uses Qt. The issue here is that the applications are developed using the SDK that restricts me to HTML5 and QML, which I'm not sure can allow me the same control over the system I need. If I use Python and avoid the SDK, same issue arises - how do I control the HW? Of course, there is a way to do it like on a regular embedded system I guess, but I don't want to reinvent the wheel if I don't have to.

Also, it seems that Ubuntu Touch hasn't been ported to many devices yet, only a handful of them are supported.

Finally

I am not sure how well I have presented my case, but I will update the question as needed with further explanations and requirement details. Thank you for your patience, your time and any help you may offer.

jonrsharpe
  • 115,751
  • 26
  • 228
  • 437
bosnjak
  • 8,424
  • 2
  • 21
  • 47

1 Answers1

1

I am in the same boat as you, we are developing embedded system on ARM CPU. Currently the system is written in Python on custom built linux distro from hardware vendor.

We have been looking at Android and Ubuntu Touch for a few months. So far we didn't get any decision yet. But here what we found out from our incomplete analysis:

  1. Android is quite heavy system, that also brings JVM into the mix. So you HW and memory requirements will significantly increase.

  2. Android likes to take over the entire system, so sometimes you might be fighting with Android.

  3. Android has very good IPC mechanisms, not available on mainstream linux kernel, such as Binder. Of course you can port it to another system. But this would be considerable effort.

  4. Android has very rich GUI interface, also with things like NDK view you are not confined into the JDK box.

  5. Android doesn't use standard GNU C library, it uses something called BioniC which is a port of C library from BSD. Usually it is not a problem for most software, but if you are using some linux specific low level features, like working with serial ports you will need to tweak your code. See what I had to do to port Java RXTX library to android https://github.com/vladistan/gnu.io.android

  6. You can find a lot of Android developers out there who will do basic GUI programming for you, while you are concentrating on your app specific stuff. Interfacing between GUI and low level things is quite easy using binder. And of course you can bring in whatever mecahnism you want via NDK.

We have considered Ubuntu Touch. But so far it doesn't seem to be mature enough.

Vlad
  • 9,180
  • 5
  • 48
  • 67
  • 1
    Thanks for the answer Vlad. Do you think I could do stuff in NDK like core_affinity or process niceness? What about accessing the HW? – bosnjak Mar 20 '14 at 13:15
  • Also, is it possible to use Android without the Dalvik? I know it won't be exactly Android any more, but still, it would support the same HW, and that is a big advantage as opposed to porting another Linux system to the tablet. – bosnjak Mar 20 '14 at 13:23
  • You can do anything you want with NDK. Also Android is a full linux system. You can run your heavy code outside of android framework and just use Android environment for user UI. If you remove the Dalvik it wouldn't be Android platform anymore. Of course you can use Android Kernel and system tools for your purposes. But why bother, android system doesn't even have a console. – Vlad Mar 20 '14 at 13:32
  • Is it pretentious if I ask about Python in this context? Or in any context that fit my requirements? – bosnjak Mar 20 '14 at 13:36
  • As for the HW I've been happy with development boards from FreeScale. They come with Android system already. I would stay away from consumer devices, some of them are heavily locked by the vendor to prevent installation of alternative loads and rooting. – Vlad Mar 20 '14 at 13:38
  • Of course you can run python on Android systems. Here is pretty good discussion about the subject http://stackoverflow.com/questions/101754/is-there-any-way-to-run-python-on-android – Vlad Mar 20 '14 at 13:39
  • Thanks! Another thing, what are the major reasons you dropped the Ubuntu Touch from your consideration? It would seem to fit my requirements even more, since there is no Dalvik. – bosnjak Mar 20 '14 at 13:49
  • We didn't drop Ubuntu Touch. We are still haven't decided which way we going. We are leaning towards Android because of huge number of third party apps available for it. – Vlad Mar 20 '14 at 14:18
  • Hi @Vlad, any new information about this? Have you reached a final decision? – bosnjak Dec 26 '14 at 12:32