Minimal FOSS RTOS with TCP/IP, SSL, USB and basic file-system support for ARM - networking

Here's a candid admission first -- that I know zilch about RTOS or Embedded programming, so folks who know better may help me frame the query more appropriately.
What would be the minimal FOSS RTOS (or any OS for that matter) with support for TCP/IP, SSL, USB and some basic file-system for low-end ARM devices like Cortex-M3's ?
Have not ruled out something like ARM9/ARM7TDMI, so an RTOS that has "optional" MMU support, may be a major plus. We are at present dabbling with few uncertainities like precise processor, MMU/no-MMU, running completely head-less (no display), however I wanted to start a little ramp-up.
Would gladly answer counter questions to clarify the requirement.

I believe that eCOS has support for all you need and is scalable.
Alternatively you could build from a self-selected kit of parts; choosing independent RTOS, filesystem, USB, etc. From different sources, and integrating them yourself.

Related

How to develop an OpenCL application targeting specifically Intel CoffeeLake-H GT2 (UHD Graphics 630) without this device?

I've been tasked to develop an OpenCL application for a specific platform, Intel CoffeeLake-H GT2 (UHD Graphics 630). There are two problems for me:
Even having some OpenCL programming experience (not that much though), I wouldn't know where to begin. I have no prior experience with targeting specific hardware before.
The device itself has to be emulated or something, because I don't have it at hand.
Of course, I tried googling information today, but couldn't find anything that could really help me. Guess, it's just because of my lack of experience. So, I'm stumped right now, and asking for help.
It would be really great if I can be helped. Any help would be appreciated. Thanks in advance.
Small note: I'm working on this project under Ubuntu 18.04.
I'm not aware of any emulated environment, and anyway, ultimately nothing replaces access to the target hardware. I see a few workarounds:
Target a similar-enough device. Intel GPUs haven't changed that drastically, so especially if you have an older/lower-spec one around, whatever you end up with should run better on the newer GPU. You can also work with a GPU from another vendor if you have at least sporadic access to a system with an Intel GPU. You don't want to go for too long at a time without testing on your target hardware. (It's generally a good idea to test OpenCL code against different implementations while developing, as it's easy to accidentally rely on implementation-defined or undefined behaviour otherwise.)
Rent a relevant physical device. Places exist that allow you to rent laptops or desktop PCs for a short time period.
Remote access to a target device. Presumably whoever posed the requirement actually has such devices. Ask for remote access to one of them, via the magic of the internet. (RDP, VNC, SSH)
Rent similar hardware in a data centre. There are bare metal hosting companies that rent out physical servers built from commodity hardware. Find one that offers servers with a close enough match to the system you're targeting and rent one there.
As for the skill gap, well, you'll either have to bridge that one yourself by following enough documentation, tutorials, etc. or by finding (hiring…) someone who will give you some degree of hand-holding through the project.

OpenCL for custom systems on SoC prototyping board

Is it possible to run OpenCL on a system designed by a user on a SoC prototyping board? To be more specific, I have a ZedBoard (Xilinx Zynq) that has Dual ARM cores and a Programmable Logic (PL) Area. If I design a simple system of my own that has a video processing accelerator implemented in the logic area, an ARM core and an AXI interconnect, what do I have to do to provide OpenCL support for this simple system? (In this simple system, the ARM core could be the "Host" and the video processing accelerator could be the "device").
I am a student and I have only some basic knowledge about OpenCL. I have researched about my question and have only ended up confusing myself. What are the things that have to be done to provide OpenCL support for a SoC? I understand that this may be a big project, but I need a guideline where to start and how to proceed.
what do I have to do to provide OpenCL support for this simple system?
Implement a OpenCL platform that makes either use of your ARM CPU or the FPGA (or both). I'd say that is pretty much impossible for you; ARM would surely offer one for the CPU if it was easy (and they definitely have the financial means to employ capable engineers/computer scientists), and implementing accelerators on an FPGA requires in-depth knowledge of FPGA development, as well as compiler theory and experience in systems design. I don't want to sound mean, but you seem to have none of these three.
You asked where to get started; I recommend just writing a first accelerator that e.g. adds up a vector of numbers; as soon as you have that, you will have a clearer idea of your task.
If you want to have a look at a reference: The Ettus USRP E310 is a zynq-based SDR device. Ettus has a technology called RFNoC, which allows users to write their own blocks to push data through. Notice that this took quite a few engineers and quite some time to get started. Notice further that it's much easier than implementing something that converts OpenCL to FPGA implementations.
If you have access to the Xilinx tools: Vivado HLS 15.1 System Edition should compile OpenCL kernels. This will also be included in the SDAccel tool suite.
Source: UG973: Vivado Design Suite User Guide Release Notes, Installation,and Licensing
An alternative might be switching to Altera. They provide some good examples for the Altera Cyclone V SoC which is comparable to Xilinx Zynq devices (also includes ARM Cortex-A9) :
AlteraSDK for OpenCL
I am also a student and my current project is also going on a similar direction, i have successfully installed a version of opencl called POCL on the zedboard, it successfully detects the arm cpu of the zedboard. To install pocl, you need llvm and a horde of other things as well. but basic steps to get pocl up on the zedboard are given below:-
Installing pocl:
http://www.hosseinabady.com/install-pocl-opencl
running example:
http://www.hosseinabady.com/embedded-system-by-examples/opencl_embedded_system/opencl-vector-addition
Lots of dependency: can resolved easily
but LLVM make sure you install 3.4 version for pocl 0.9
Steps to install llvm
https://github.com/pacs-course/pacs/wiki/Instructions-to-install-clang-3.1-on-ubuntu-12.04.1-and-12.10
POCL 0.9 is successfully working for me, as you do the installation you will face many other missing dependencies like hwloc, mesa libraries, open gl/cl headers icd loaders i hope you can resolve them as its a very big list to put up in stack overflow.
In order to detect your fpga as an open cl device, thats not going to be a trivial thing to do, you can refer to this link question i posted on github
https://github.com/pocl/pocl/issues/285
and also a research paper published by hosseinbady found on the publications link on the pocl website
http://pocl.sourceforge.net/publications.html
hope this helps you
Try the ARM OpenCL SDK. The Zedboard has an ARM A9 CPU, this should have a NEON SIMD vector unit http://www.arm.com/products/processors/technologies/neon.php which can run OpenCL. See http://www.arm.com/products/multimedia/mali-technologies/opencl-for-neon.php.
The Zedboard isn't listed as an OpenCL conformant platform https://www.khronos.org/conformance/adopters/conformant-products#opencl.
So there is a chance the ARM driver will not work.
Good luck!
If still relevant, try this paper OpenCL on ZYNQ [PDF]
Also note that Zynq-7000 is listed on https://www.khronos.org/conformance/adopters/conformant-products#opencl ( OpenCL_1_0 ), hence the compatibility.

Is microcontroller development kit can be used for programming any number of microcontrollers

I am a non technical person and trying hands on making devices. i have one stupid question. I want to know, is micro-controller development kit can program unlimited microcontrollers (programming will be same for all micro-controller) or we need separate micro controller development kit and separate microcontroller in every device?
You have to read the license for the tool when you buy it, some yes, some no. Often you dont use the developers kit to program the parts, you use a programming tool (which may or may not be part of the same kit) for production. Some tools will program different vendors parts or all the parts within a vendors product list, but in general that is not the case. depending on the device there are a lot of free tools (avrdude for example) that dont have restrictions, but it is vendor/chip specific as to what tool will work for the microcontroller in question.
Simply read the docs on the tool you are interested in to see what it does and doesnt support, read the license agreement to see if there is a limit on the number of devices per software license.
Each type of micro-controller will have its own development kit. That kit works with all the same or similar micro-controllers. But, you will need separate micro-controller for each device.
There are plenty of coffeemakers and washing machines with a microcontroller in them. And clearly the manufacturers of those don't buy microcontroller dev kits by the billions. That would be unaffordable.

Choosing Embedded Linux for device

I am starting to create a QT application with sqlite for a hand held device. My Project Manager asks me to select an operating system (embedded linux) for the device (we are not considering android).
As in Desktop, are there many embedded-Linux distributions for devices?
If so, Which embedded linux I should consider?
You have multiple choices, but I will suggest the easier and - in my opinion - better two.
Buildroot - is a set of makefiles that lets you create your custom embedded distribution. Can take care of building the Linux
kernel, the toolchain and a barebox or U-Boot bootloader, too. Easily expandable and
with a practically zero learning curve. You have a fully working
system in a matter of hours.
Yocto - a fully fledged (and complicated) build system. Suggested over Buildroot when you need a LOT of packages/components
and may need flexibility in expanding the system directly on
premises. What you can do substantially depends on the "layers" (sets of rules for building things) available: you combine layers together to obtain your system. Has a steep learning curve but is used and directly
supported by multiple vendors (e.g.: Atmel, TI).
Anyway, unless you have more than good reasons, I strongly suggest the former.
There are several Linux distros to be used with ARM. Maybe you should consider Fedora ARM https://fedoraproject.org/wiki/Architectures/ARM
This is a difficult question to answer not knowing more about the project requirements (not just software requirements, but also non-functional ones as well) and capabilities of the platform.
Angstrom (based on OpenEmbedded) is another possibility for Linux.
I would challenge the assumption that the operating system must be Linux. Why? If time-to-market or having commercial support are important, you might be better off with commercial embedded or RT operations systems such as VxWorks or QNX.
There are also professionally supported Linux distros such as Montavista
Whilst free linux distros are, well, free, you are generally on your own and your team's time isn't free.
You can use Qt for embedded device , it’s fast and compatible with many hardwares and if your hardware is not supported, porting it to a new hardware is not so hard
plus it has special rendering system

Interested in Device Programming. Where to Start

All
I've a Good Command over C++, But I've never done anything anything on device programming. I've some basic understanding on Digital Logic Design. But I am complete Noob in Electronics. Currently I am getting huge interest on microcontroller Programming.
Where To Start ?
I don't think one really needs to have huge amount of knowledge on electronics to run a program on a microcontroller.
I am using Linux. and I've downloaded Keil. never tried to run it through Wine. I've ran it in Windows. But how the code works is not completely clear to me. though I can understand Logic as its written in C. But Its still like a Fog to me.I Just need a Quick Kickstart.
SO is not the best site to ask this kind of question. There's really a large distinction between programming for a PC and programming for an embedded system, other SE sites specialize in physical computing. I got this email from Robert Cartaino on Tuesday:
...Barring any last-minute interest from
[chiphacker.com], we will be launching [electronics.stackexchange.com]
either tomorrow [Wednesday 9/22] or
Thursday.
So, go commit to electronics.stackexchange.com here, and browse chiphacker.com while you wait. Take a look at these questions on Chiphacker:
How to become an embedded software developer?
Steps to learning Arduino Programming
PIC Programming
What are the best beginner project[s] using an arduino
There are a few things you should consider when planning your entry path to embedded systems programming.
What do you want to do?
What do you know how to do?
How fast are you comfortable learning?
I've outlined a few options in the following paragraphs.
You tagged your question linux-device-driver, does this mean that you want to make a custom device to use in Linux? If you meant embedded-linux, then you're into a larger class of microcontrollers. I suggest that you look at the BeagleBoard, also look at this Chiphacker question for some other options. If you want to do embedded linux, and want to build your own board, you'll first need to build up some experience in simpler levels of embedded systems design.
You also tagged your question avr, which is a popular microcontroller class made by Atmel (check out the avrfreaks forum for more info). I started learning embedded systems on the ATmega324p; they really have great documentation, are easy to use, and there are more sites online for the avr than most any other processor.
If you want an easier learning curve, I suggest taking a look at the Arduino environment. It uses Wiring, which is very similar to C/C++, and the Arduino can be enhanced with 'shields', which are modules that can be plugged into the Arduino main board to add functionality. This is your Quick Kickstart.
A good learning path would be to get familiar with the Arduino, then build your own AVR board (possibly a Linux device, like a joystick), then work with an ARM-based development kit, and finally move on to to building your own embedded linux board. You can skip a few steps if you don't mind a steep learning curve, or stop at any point along the way if a given level's capabilities satisfy your needs. You don't necessarily need a "huge amount of knowledge on electronics to run a program on a microcontroller", it's true, but you should understand some basic things like voltage and current before you try to light an LED or connect two devices.
Finally, you said in your question that you've installed the Keil IDE. While this is a fine and rather popular IDE, I'd suggest that you learn using a gcc-based command line toolchain. There are a staggering number of ways in which things that can go wrong when working with embedded systems, and an IDE adds a layer of magic on top of everything that happens. While this can be nice, I'm a strong advocate of minimizing the magic when trying to learn the system. You need to understand the low-level stuff when things don't work automagically. This advice doesn't apply when using the Arduino, which is designed to (and does) make all of the automagical stuff work well.
sparkfun.com has a lot of boards, arduino family and other. I recommend the armmite pro, the lillypad instead of the arduino pro because there is no soldering involved, for either you will need/want the correct usb to serial/power. The mbed2 costs a little more, the blue leds are brutal on the eyes, but easy to use. For none of the above are you required to play in their sandbox, you can use the canned environment, etc but not required.
if it is linux development you are after I recommend the hawkboard.org over the beagleboard.org, to make the beagleboard useable costs about twice as much as the board itself, the hawkboard is usable by only buying something to power it. But you can just learn linux drivers on your desktop/laptop and dont need to mess with embedded necessarily.
Emulators are a good start. Qemu is good stuff, emulates a number of processors, great for emulating virtual linux systems, learning linux driver development, etc. But getting visibility into what the (virtual/emulated) processor is doing is not the goal. I find it useful to have visibility. gdb includes a few emulators as well. mame is loaded with them, but like qemu designed for fast emulation and not for education. visual boy advance is good. Emulation is never perfect, so eventually you want to run on hardware, but emulators and compiler tools are free and you can learn quite a bit before you have to buy hardware. There is a considerable amount you cannot learn from an emulator though, loading your programs into flash/ram, debugging using jtag or other interfaces. i2c, spi, etc.

Resources