embedded

C++ usage in embedded systems

What features of C++ should be avoided in embedded systems? Please classify the answer by reason such as: memory usage code size speed portability EDIT: Lets' use an ARM7TDMI with 64k ram as a target to control the scope of the answers. ...

"Code Smells" in non OO forms...

So, we saw the post on Code Smells and how to fix them...but what about for us NON object oriented folk? I use embedded C a LOT and while all the responses to the said post were great, I wondered if anyone had some input about the straight-C world? Some of the things mentioned in the other post do not apply (and some were even complete...

FORTH love if honk then

Does anybody use FORTH for embedded programming? ...

How do I define my own errno values?

When developing a module (device driver, middleware, etc...) that will run in the kernel space, we would like to have some way to capture the reason an operation might fail. In VxWorks, The errno mechanism seems to be a good way to do this. Is it possible to define my own errno values? ...

How can adding data to a segment in flash memory screw up a program's timing?

I have a real-time embedded app with the major cycle running at 10KHz. It runs on a TI TMS320C configured to boot from flash. I recently added an initialized array to a source file, and all of a sudden the timing is screwed up (in a way too complex to explain well - essentially a serial port write is no longer completing on time.) T...

Simple serial AVR programmer for beginner

What is the cheap and good way to make a serial (RS232) programmer for AVR atMega and atTiny? There are several circuits in the Internet, but which one is better? I'd like to be able to program my controller from Linux and Windows using some standard tools. ...

How to preserve stack space with good design?

I'm programming in C for RAM limited embedded microcontroller with RTOS. I regularly break my code to short functions, but every function calling require to more stack memory. Every task needs his stack, and this is one of the significant memory consumers in the project. Is there an alternative to keep the code well organized and reada...

AVR or PIC to start programming Microcontroller?

Which family should I start to learn? (Never did any programming on microcontroller) ...

Font graphics routines

How do you do your own fonts? I don't want a heavyweight algorithm (freetype, truetype, adobe, etc) and would be fine with pre-rendered bitmap fonts. I do want anti-aliasing, and would like proportional fonts if possible. I've heard I can use Gimp to do the rendering (with some post processing?) I'm developing for an embedded device ...

Best way to get started with programming other things than your computer?

What is the best way to get started with programming things outside of your computer? I don't mean mainstream things like cell phones with APIs. Please assume working knowledge of C/C++ ...

Programming on a Nintendo DS

I was reading this answer previously and it got me interested in purchasing a Nintendo DS Lite for learning to program embedded devices. Before I go out and splurge on a DS I had a few questions: Are there any restrictions on what you can program? The post I indicated earlier seemed to say there weren't, but clarification would be nic...

Nintendo DS homebrew with Ada?

Note: I know very little about the GCC toolchain, so this question may not make much sense. Since GCC includes an Ada front end, and it can emit ARM, and devKitPro is based on GCC, is it possible to use Ada instead of C/C++ for writing code on the DS? Edit: It seems that the target that devKitARM uses is arm-eabi. ...

Where do you send the kernel console on an embedded system?

I'm developing an embedded system which currently boots linux with console output on serial port 1 (using the console boot param from the boot loader). However, eventually we will be using this serial port. What is the best solution for the kernel console output? /dev/null? Can it be put on a pty somehow so that we could potentially ...

Simple Debounce Routine

Do you have a simple debounce routine handy to deal with a single switch input? This is a simple bare metal system without any OS. I would like to avoid a looping construct with a specific count, as the processor speed might fluctuate. ...

How to communicate between CE 6.0 device (as server) and PC (as client)

We're in the process of developing a measurement device that will be running CE 6.0 with CF 3.5 on x86 embedded hardware, a PC is used to control the device and is connected with it using ethernet. We would like to communicate using interfaces (using DCOM (we know it is not supported by default on CE6), .NET Remoting or Web services)...

Switching from std::string to std::wstring for embedded applications?

Up until now I have been using std::string in my C++ applications for embedded system (routers, switches, telco gear, etc.). For the next project, I am considering to switch from std::string to std::wstring for Unicode support. This would, for example, allow end-users to use Chinese characters in the command line interface (CLI). What ...

Using boost in embedded system with memory limitation

Hi, We are using c++ to develop an application that runs in Windows CE 4 on an embedded system. One of our constraint is that all the memory used by the application shall be allocated during startup only. We wrote a lot of containers and algorithms that are using only preallocated memory instead of allocating new one. Do you think it...

How to improve garbage collection performance?

What kind of optimization patterns can be used to improve the performance of the garbage collector? My reason for asking is that I do a lot of embedded software using the Compact Framework. On slow devices the garbage collection can become a problem, and I would like to reduce the times the garbage collector kicks in, and when it does,...

User interface design for small displays - resources?

I'm developing an application for a small display (1.8" diagonal, 128x160). Lots of people must be developing for cell phones, so I'm hoping for pointers to online resources for user interfaces with small displays and limited input. ...

Blackbox type data logging

In a Linux embedded application I'm developing, there is the need to record some events that happen from time to time. These records are saved on a MTD flash device and once written there is no need to change them or do efficient searches, but read access is required to show the data back to the user. A big problem is that power can go a...