embedded

Microchip PIC C18 Programming File Format .COFF vs .HEX

I am developing code in the MPLAB IDE and I was wondering if it is better to program a chip using the .COFF or .HEX file generated by the compiler. I'm not sure what the difference is between the two and I am assuming they will both perform the same job. ...

what are the steps/strategy to analyze and improve performance of an embedded system

I will break down this question in to sub questions. I am confused if I should ask them separately or in one question. So I will just stick to one SO question. What are generally the steps to analyze and improve performance of C applications? Do these steps change if I am developing for an embedded system? What tools are out there whic...

change visibility of symbols in shared library files

Hi all, I tried to compile sigintr.c in DD-WRT/src/router/rflow with arm-linux-gcc. The problem I encountered is: sigintr.o: In function siginterrupt': sigintr.c:(.text+0x88): undefined reference to_sigintr' collect2: ld returned 1 exit status make[1]: * [rflow] Error 1 I can find '_sigintr' in libc.so, but unfortunately...

GPRS Modem based data communication for Embedded Remote Client and Server

For SAGEM HiLo GPRS based data communication, it has TCP/IP stack and there are two ways to get connected: (1) Using basic GPRS commands and then ppp dialing to brings the modem to public network/Internet like AT+CGDCONT=1,"IP","APN","0.0.0.0",0,0 OK atd*99***1# CONNECT (2) Using GPRS attach and then using TCP socket commands such as...

How to enable ARM1136JFS (ARM v6) MMU to have one to one mapping between physical and virtual address space?

I want to enable data cache. I dont have much experience with ARM as I have mostly programmed for IA32. My understanding is that I need to enable MMU to enable data cache. As I dont need the virtual memory other wise so I want to enable MMU with one-to-one mapping between physical and virtual address space for all applications. Any help...

Looking for a fast polygon rendering algorithm

I am working with a Microchip dsPIC33FJ128GP802. It's a small DSP-based microcontroller, and it doesn't have much power (40 million instructions per second). I'm looking for a way to render a convex (i.e. simple) polygon. I am only dealing with 2D shapes, integer math, and set or clear pixels (i.e. 1 bit per pixel.) I already have routin...

Does the Cortex-M3 STM32F103 core stall during a flash page erase because the FPEC is busy and can't fetch any more instructions from flash?

On the STM32F103, the erasing of a flash page takes 20ms during which the core stalls for me. It's not clear from the ST PM00042 Flash programming manual whether the core would always stall when erasing a flash page or whether it just stalls because the instruction stream itself is in flash memory (in my project) and the FPEC (the flash ...

How do I get the Keil RealView MDK-ARM toolchain to link a region for execution in one area in memory but have it store it in another?

I'm writing a program that updates flash memory. While I'm erasing/writing flash I would like to be executing from RAM. Ideally I'd link my code to an execution region that's stored in flash that on startup I would copy to the RAM location to which it is linked. I don't include any of the normal generated C/C++ initialization code so I ...

Sending sqlite db over network

I have an sqlite database whose data I need to transfer over the network, the server needs to modify the data, and then I need to get the db back and either update my local version or overwrite it with the new db. How should I do this? My coworker at first wanted to scrap the db and just use an .ini file, but this is going to be data tha...

How can I most effectively share code between C and C# (both Mono and Silverlight)

Our desktop application consists of a Mono/.NET 3.5 back end that communicates via USB with a variety of devices and a Silverlight front end that communicates with the back end via sockets. The firmware for the devices is developed in-house with C. To accelerate our development process and reduce bugs, we would like to share code betwe...

[embedded] polling hardware button's state

I need to implement the following feature for my device running embedde linux on a 200mhz MIPS cpu: 1) if a reset button is pressed and held for less then a second - proceed with reboot 2) if a reset button is pressed and held for at least 3 sec. - restore the system's configuration with default values from NVRAM and then reboot. I'm th...

How do I debug a arm9 2.4.19 linux hang?

Hi everyone, I'm trying to debug this arm9 ... it's running some variation of Linux 2.4.19. When I load a pci driver, the arm9 just hangs and reboots. I've tried to enable to kernel hacking options in the menuconfig, but I don't see any error messages at all. Just a hang, and a reboot. That's all. What else could I try? I've neve...

How can I debug multiple apps by loading multiple symbol definitions with GDB?

I am doing embedded software development. By nature, I have 3 different applications running simultaneously that are guaranteed to run in different ranges of virtual addresses, e.g. App 1 runs on 0x10000000 - 0x20000000, App2 runs in 0x20000000 - 0x30000000 and so on. Generally GDB seems to accept only one symbol definition file. But i...

Safe c++ in mission critical realtime apps

I'd want to hear various opinions how to safely use c++ in mission critical realtime applications. More precisely, it is probably possible to create some macros/templates/class library for safe data manipulation (sealing for overflows, zerodivides produce infinity values or division is possible only for special "nonzero" data types), a...

How can I plan my software to avoid excessive rewriting and interdependencies

I'm writing a motor controller that has a couple of interfaces (buttons, Bluetooth, haptic knobs) which is a task that is steadily growing to be a larger than I figured. I've tried to just go at it by starting with low-level modules (e.g. write code to talk on the I2C bus), then ones above that (code to talk to a particular device on th...

extend the size of already existing ext2 image

Is there a possibility to extend the size of already existing ext2 image? This image is a ramdisk based root file system. I already have an image. but I want to extend the size of this image. Is it possible to extend the size of this image. ...

Programming USB in embedded system for sending some data to host for printing

I have been tasked with writing a USB driver for our embedded software to send raw data to Host. This will be used to send some logging data to host. We are using iMX31 litekit for development. From the documents that I have read on USB, my understanding is that the embedded device will be in device mode only. Also it will only be commu...

Fast Hypotenuse Algorithm for Embedded Processor?

Is there a clever/efficient algorithm for determining the hypotenuse of an angle (i.e. sqrt(a^2 + b^2)), using fixed point math on an embedded processor without hardware multiply? ...

Good (preferable free) learning resources / books for embedded C / C++ programmers.

Well, initial reason I ask this question is I need from time to time learning materials for struggling C / C++ developer who is in general competent but needs to improve some aspect directly related to embedded system software development (telecom mainly). And I found I have not so many useful things to recommend. Could community help w...

real-time synchronization between two devices over a wireless signal

i have never done embedded (i dont know if thats what you call this) programming and know nothing about it. my question: is it possible to have two devices sharing a wireless connection (no internet, just between themselves, perhaps bluetooth, but i dont know what ever is best) ? is it possible to have one editing a file and the other ...