embedded

Bursty writes to SD/USB stalling my time-critical apps on embedded Linux

你说的曾经没有我的故事 提交于 2019-11-29 12:15:12
问题 I'm working on an embedded Linux project that interfaces an ARM9 to a hardware video encoder chip, and writes the video out to SD card or USB stick. The software architecture involves a kernel driver that reads data into a pool of buffers, and a userland app that writes the data to a file on the mounted removable device. I am finding that above a certain data rate (around 750kbyte/sec) I start to see the userland video-writing app stalling for maybe half a second, about every 5 seconds. This

Alternative to boost::shared_ptr in an embedded environment

a 夏天 提交于 2019-11-29 12:00:45
问题 I'm using C++ in an embedded linux environment which has GCC version 2.95 . I just can't extract boost::shared_ptr files with bcp, it is just too heavy. What I'd like would be a simple smart pointer implementation of boost::shared_ptr but without all boost overheads (if it is possible...). I could come up with my own version reading boost source but I fear missing one or more points, it seems easy to make a faulty smart pointer and I can't afford to have a buggy implementation. So, does a

Is `volatile` required for shared memory accessed via access function?

ⅰ亾dé卋堺 提交于 2019-11-29 11:21:32
问题 [ edit ] For background reading, and to be clear, this is what I am talking about: Introduction to the volatile keyword When reviewing embedded systems code, one of the most common errors I see is the omission of volatile for thread/interrupt shared data. However my question is whether it is 'safe' not to use volatile when a variable is accessed via an access function or member function? A simple example; in the following code... volatile bool flag = false ; void ThreadA() { ... while (!flag)

Alternative languages for embedded programming

放肆的年华 提交于 2019-11-29 11:03:58
问题 I`m looking for alternatives programming languages (from assembly, C, C++ and basic) to embedded (microcontroller) programming. Is it possible for example, to program microcontrollers in C# or Java? Maybe Ruby or Python? If possible, please post development tools and hardware used. 回答1: There's also Lua. See eLua. 回答2: FORTH has been popular in embedded systems for a long time. I have no specific experience with it but it is very cleverly designed to provide a lot of functionality in a small

Making large constants in C source more readable?

只谈情不闲聊 提交于 2019-11-29 10:22:15
I'm working on some code for a microprocessor. It has a few large, critical constants. #define F_CPU 16000000UL In this case, this is the CPU frequency. In Hertz. As it is, it's rather hard to tell if that's 1,600,000, 160,000,000 or 16,000,000 without manually tabbing a cursor across the digits. If I put commas in the number #define F_CPU 16,000,000UL , it truncates the constant. I've worked with a few esoteric languages that have a specific digit-separator character, intended to make large numbers more readable (ex 16_000_000 , mostly in languages intended for MCUs). Large "magic numbers"

Multithreading using C on PIC18

亡梦爱人 提交于 2019-11-29 09:33:30
问题 How does one create threads that run in parallel while programming PIC18, since there is no OS? 回答1: Don't use threads, use an event loop. The PIC18 is a small processor and an event loop based style means you don't have to keep many deep stacks hanging around. You need to write your code in terms of the event loop, but that is probably reasonable. If you do have some long running tasks, use timers are different interrupt priority levels to allow higher priority event loops to preempt lower

Recommendation for Java VM running on embedded system

走远了吗. 提交于 2019-11-29 09:21:50
问题 We are trying to support Java enviroment on our embedded platform (700 MHz MIPS 74K, 128-256 MB memory). After reading this article and googling a bit, I came up with the shorted list: Java ME from Sun Kaffe Jbed Perc HP Chai VM PhoneME - seems the most promising one IBM WEME (Thanks to Thorbjørn Ravn Andersen) Aplix JBlend (Thanks to QuickRecipesOnSymbian) I was quite new to Java and its runtime enviroment. What do you recommend for a Java VM running on MIPS 74K? 回答1: You might want to look

Is low-level / embedded systems programming hard for software developers? [closed]

给你一囗甜甜゛ 提交于 2019-11-29 07:03:21
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 5 years ago . Given my background as a generalist, I can cover much of the area from analog electronics to writing simple applications that interface to a RDBMS backend. I currently work in a company that develops hardware to solve industry-specific problems. We have an experienced

Lightest Database to be packed with an application

一世执手 提交于 2019-11-29 06:21:02
问题 I am developing a Java Desktop Application and want a light database that can be used with Hibernate and that can be packed with an application. I was going to use Derby database. It's size is near 2 MB. But before that I wanted to have views of experts on SO. Will it work with Hibernate ? Actually, I am new to Hibernate and was studying that it requires a Dialect for a database so Is Hibernate has dialect for Derby ? 回答1: JavaDB (Sun's supported distribution of the open source Apache Derby),

Low level qemu based debugging

不羁的心 提交于 2019-11-29 06:01:41
I've to test some low level code on an ARM architecture. Typically experimentation is quite complicated on the real board, so I was thinking about QEMU. What I'd like to get is some kind of debugging information like printfs or gdb. I know that this is simple with linux since it implements both the device driver for the QEMU Integrator and the gdb feature, but I'm not working with Linux. Also I suspect that extracting this kind of functionality from the Linux kernel source code would be complicated. I'm searching from some simple operating system that already implements one of those features.