Hot answers tagged

11

Microcontroller programs consist of a number of tasks. Let's say you wanted to make a computer-controlled telescope mount. The tasks would be: Retrieve a new byte of input from the USB serial buffer. Check if we've received a complete command. If so, execute that command. Read the sensors for the current telescope position. Set the proper output to ...


7

Most end-user applications are written in C or a close derivative of C, or another language, like Lua or BASIC or something. However, a lot of the really interesting jobs with microcontrollers require a thorough understanding of assembly, because you're writing or supporting the libraries, doing things with new parts that don't have support in a high-level ...


7

I wrote my own co-operative multi-threading library for ARM Cortex-M0. It was barely a couple pages of code, and the first version of it didn't take longer than a day to write and debug. The big advantage of roll-your-own is you know the code and you can port it to chips that the RTOS might not support. Also, you spend less time thinking about questions ...


7

This is all my experience/opinion, gathered from working in the field pretty close to the metal: "embedded systems" are usually situations where you have significant non-trivial memory or speed constraints as compared to desktop systems. Those embedded situations can include microcontrollers, but can also include x86 systems on a chip, and also systems like ...


6

There is nothing special about Multicore Programming in Linux. You have to understand the whole kernel. Instead of asking specific questions, go ahead and download the Linux Source code from kernel.org and go through the README file and the source code structure. (Your question about intel and arm process is answered in README). Start reading the source code ...


5

Timothy's answer is correct, but not complete enough to understand what is going on here. Strings are a sequence of bytes; there is no "endianness" for strings because bytes have no endianess. Endianess refers to the byte order that is used to store larger multiple-byte items in memory. So, for big endian the most significant byte is stored at the ...


5

Gcc can cross-compile programs for Intel targets from ARM hosts, but I'm not entirely sure that's what you meant to ask, because your terminology is off. Let me lay out some general principles, which should hopefully either answer your question or give you enough information to clarify your question. There are several different things to consider about ...


4

To understand the multicore operation support provided by processors and used by operating systems, diving into the code may not be the ideal method. It may be important to first understand what it does to get a framework on which to hang the many pieces that relate to how it does it. Specification deals with the problem domain, code deals with the ...


4

What formats of executables and libraries does Embox require, and how can I tell? By reading the documentation. Note that some (most?) kernels designed for embedded use might not even support loading executables from files. They may require applications to be compiled-in to the kernel image. [...] how do I develop on one platform/architecture (Windows) ...


3

Memory allocation by malloc is mostly a software function.  Typically the blocks allocated by software are too small for the MMU to manage.  For example, an MMU typically manages pages of size 4k or larger.  In fact, the larger the pages, the more efficient the hardware can be.  Hardware also manages pages on page aligned boundaries (...


3

What formats of executables and libraries does Embox require, and how can I tell? Embox is a configurable OS and one can create separate kernel image and user application. But since MCU has rather small memory size, most embedded RTOSes including Embox link all software (kernel, apps etc.) to a single image by default. How does one compile a C program ...


3

What is the deployable unit(s) of Embox? As most of RTOS for MCU Embox offers deployable unit as a single image. For Embox It has ELF format and is placed in "./build/base/bin/embox" file. How do you deploy these files to an MCU? It depends on MCU not RTOS. The most popular hardware interface for loading images is JTAG. Here is an example how load image ...


3

Endianness applies to number types (like int/long/double...). You stored a string (an array/list of characters). Therefore the bytes of your string are stored in order of appearance regardless of the processors endianness.


3

All programming in the kernel is multi-core programming (in the sense that it has to be capable of running on multiple cores). So there's nothing specific to that which you don't already do for general kernel coding. Areas of kernel programming relevant to multi-core systems are locking, scheduling, and memory access (NUMA if you're on that type of machine)....


3

This can be achieved by using interrupts[1]. Interrupts can be used with timers, digital inputs and the serial port[2]. Depending on the Arduino variant, some or all of the pins can be used for interrupts. For regularly occuring tasks, use timer interrupts. For the serial port, use NewSoftSerial. 1. We interrupt this program to bring you a tutorial on… ...


2

Although compilers contain bugs just like any other piece of software, the chances that you encounter one of those bugs while creating your own software are close to zero and the chance that such a bug manifests itself as misbehaving software is even smaller. Apart from compiler bugs, you could get different behavior because the two compilers interpret your ...


2

If you do not know how long your payload will be, that is rarely cause for worry even if you cannot remember the position and backfill the length later: Just note down "unknown size". That feature depends on the payload consisting of EBML-elements and the following element not being a valid child-element though. If you want, you can later canonicalize the ...


2

Most of the embedded solutions are written in C. The reason being, C is a very powerful language and the user has a lot of control on hardware. On the other hand it also helps you create abstractions, however the development has to be done by the team. This is the reasons most semiconductor companies provide C/C++ compiler with their toolset. One resorts ...


2

You can compile Java to binary for a target using LLVM. A quick look at the docs shows support for many ARM variants. https://llvm.org/svn/llvm-project/java/trunk/docs/java-frontend.txt Also another stack-overflow style answer in this vein at https://stackoverflow.com/questions/10804280/is-there-a-llvm-java-front-end-that-converts-java-source-to-llvms-...


1

I assume you are coming from a non-technical background, so the terms are new to you. To fully understand a lot of the answers on this site, it is a good idea to take a beginners course like Computer Science 101 (CS101). That at least introduces you to the vocabulary and general concepts for how computers work. There really isn't much difference between ...


1

No. Low-power modes are highly MCU dependent. Among the different silicon suppliers, the following could vary: Which peripherals/clocks are disabled in sleep/deep-sleep mode What is the sequence to wake-up the MCU peripherals/CPU WFI and WFE instructions have been designed by ARM to synchronize CPU(s) with the other peripherals. If you are not ...


1

No, Windows CE should use CompactFramework. MicroFramework is for low level electronic devices and it is now open source (v4.x). It interprets MSIL rather than performs JIT compilation. MicroFramework contains classes for controlling electronic signals, digital in/out, analog in/out, Serial, SPI, I2C, ...


1

I use Zenwalk for whenever I need a real linux box (2.6 kernel + XFCE 4.8). It's not really a minimal distro (in the sense that DSL and Puppy are), but it feels fast and snappy in VirtualBox 4.1 with 1GB RAM allocated to it . The machine runs on a Windows 7 x64 host with a total of 4GB of RAM with hardware virtualization support and nested paging. If you're ...


Only top voted, non community-wiki answers of a minimum length are eligible