embedded

C/C++ HTTP Client Library for Embedded Projects [closed]

与世无争的帅哥 提交于 2019-11-27 17:13:17
So I have trawled through pages and pages of search results on StackOverflow and Google and I have come across very few C/C++ HTTP client libraries suitable for a resource-constrained, embedded environment (e.g. an ARM). I have however come across quite a few that are suitable for desktop-class applications. Essentially, I am after a simple, easy-to-use and convenient API to make HTTP GET, POST and HEAD calls (with support for authentication, download resume and payload compression). It would be ideal if it had a small footprint (i.e. no or minimal external dependencies) and is open-source

Driving Beaglebone GPIO through /dev/mem

坚强是说给别人听的谎言 提交于 2019-11-27 17:10:47
I'm trying to write a C program for blinking a LED on the Beaglebone. I know I can use the sysfs way...but I'd like to see if it is possible to get the same result mapping the physical address space with /dev/mem. I have a header file, beaglebone_gpio.h wit the following contents: #ifndef _BEAGLEBONE_GPIO_H_ #define _BEAGLEBONE_GPIO_H_ #define GPIO1_START_ADDR 0x4804C000 #define GPIO1_END_ADDR 0x4804DFFF #define GPIO1_SIZE (GPIO1_END_ADDR - GPIO1_START_ADDR) #define GPIO_OE 0x134 #define GPIO_SETDATAOUT 0x194 #define GPIO_CLEARDATAOUT 0x190 #define USR0_LED (1<<21) #define USR1_LED (1<<22)

How do you design a serial command protocol for an embedded system? [closed]

試著忘記壹切 提交于 2019-11-27 17:08:14
I have an embedded system I'm communicating with over serial. The command structure right now is designed to be operated interactively: it displays a prompt, accepts a few commands, and displays results in a human-readable form. I'm thinking about changing this to a more machine-usable format, so I can talk to it through a MATLAB GUI without too much trouble (right now it's hiccuping on the interactive prompts and varying message lengths, etc.). So is there a document or standard somewhere that describes how to design a good serial command protocol for your embedded system? I have some

Using Haskell for sizable real-time systems: how (if?)?

末鹿安然 提交于 2019-11-27 17:06:29
I've been curious to understand if it is possible to apply the power of Haskell to embedded realtime world, and in googling have found the Atom package. I'd assume that in the complex case the code might have all the classical C bugs - crashes, memory corruptions, etc, which would then need to be traced to the original Haskell code that caused them. So, this is the first part of the question: "If you had the experience with Atom, how did you deal with the task of debugging the low-level bugs in compiled C code and fixing them in Haskell original code ?" I searched for some more examples for

Compiling an application for use in highly radioactive environments

谁都会走 提交于 2019-11-27 16:32:55
We are compiling an embedded C/C++ application that is deployed in a shielded device in an environment bombarded with ionizing radiation . We are using GCC and cross-compiling for ARM. When deployed, our application generates some erroneous data and crashes more often than we would like. The hardware is designed for this environment, and our application has run on this platform for several years. Are there changes we can make to our code, or compile-time improvements that can be made to identify/correct soft errors and memory-corruption caused by single event upsets ? Have any other developers

Is it safe to share a volatile variable between the main program and an ISR in C?

烈酒焚心 提交于 2019-11-27 16:30:10
Is it safe to share an aligned integer variable, not bigger than the processor natural word, with volatile qualifier, between the main program and an ISR in C? Is it guaranteed that no torn reads or writes may happen? The volatile keyword does not imply atomicity - that simply ensures that a variable is explicitly read and not assumed not to have changed. For safe shared access without any other protection mechanism the variable must be both atomic and declared volatile . The compiler may document types that are atomic for any particular target, and may define sig_atomic_t for this purpose. In

embedded Java VM for Cortex M3

非 Y 不嫁゛ 提交于 2019-11-27 16:07:27
问题 I'm currently searching for a Java VM which is portable (or already ported) to an ARM Cortex M3 (LPC1768 from NXP, 512kB ROM ). I have already some experience with simple Real Time Java (www.rtjcom.com) which has a small footprint and is well documented. Do you know some more embedded JVMs for Cortex M3? Ideally with a real Byte Code interpreter and a ClassLoader? Thanks for your suggenstions. 回答1: The following a Java VMs target embedded systems: JamaicaVm (Commercial) MicroJVM (Comercial)

Explaination of ARM (especifically mobile) Peripherals Addressing and Bus architecture?

馋奶兔 提交于 2019-11-27 14:53:29
I will first say that I'm not expert in the field and my question might contain misunderstanding, in which case, I'll be glad if you correct me and attach resources so I can learn further details. I'm trying to figure out the way that the system bus and how the various devices that appear in a mobile device (such as sensors chips, wifi/BT SoC, touch panel, etc.) are addressed by the CPU (and by other MCUs). In the PC world we have the bus arbitrator that route the commands/data to the devices, and, afaik, the addresses are hardwired on the board (correct me if I'm wrong). However, in the

flush-to-zero behavior in floating-point arithmetic

余生长醉 提交于 2019-11-27 14:49:51
问题 While, as far as I remember, IEEE 754 says nothing about a flush-to-zero mode to handle denormalized numbers faster, some architectures offer this mode (e.g. http://docs.sun.com/source/806-3568/ncg_lib.html ). In the particular case of this technical documentation, standard handling of denormalized numbers is the default, and flush-to-zero has to be activated explicitly. In the default mode, denormalized numbers are also handled in software, which is slower. I work on a static analyzer for

Minimal implementation of sprintf or printf

99封情书 提交于 2019-11-27 14:39:24
问题 I'm working on an embedded DSP where speed is crucial, and memory is very short. At the moment, sprintf uses the most resources of any function in my code. I only use it to format some simple text: %d, %e, %f, %s , nothing with precision or exotic manipulations. How can I implement a basic sprintf or printf function that would be more suitable for my usage? 回答1: This one assumes the existence of an itoa to convert an int to character representation, and an fputs to write out a string to