views:

246

answers:

4

I am writing embedded applications for different hardware (avr, arm7, tms55xx…) and different rtoses (freeRTOS, rtx, dsp/bios). And every second of them needs to communicate with PC or another digital device. Sometimes interactions logic is very advanced. So I'm interesting in common methodology (like state-machine programming style), protocol specification or library, that could simplify developing such things.

+1  A: 

Here is an article on Embedded.com on CORBA on embedded systems and 'lightweight' or minimal implementations. The commercial solutions mentioned are for QNX, VxWorks and LynxOS. And another article on RPC on Embedded.com (this one authored by a TI DSP trainer and specifically referencing DSP, so may be relevant to DSP/BIOS).

I strongly recommend that you use Embedded.com's article search, there are probably many similar articles that you will find useful.

VxWorks supports RPC, as does QNX Neutrino.

"Roll your own" has always been my solution where standards compliance and inter-system compatibility is not an issue (i.e. my systems talking to my systems). Doing only exactly what you need is the best way to achieve 'lightweight' perhaps at the expense of flexibility and maintainability.

Clifford
I've read these articles. CORBA is intended for much more advanced interactions than my programs do.RPC protocol from TI's codec engine is lightweight enough, but very specific and doesn't suits my applications.
Mtr
+2  A: 

I've been very happy with google's protocol buffers on embedded systems for both data passing and RPC mechanisms. They are quite a bit lighter than XML based systems since the data is transmitted is binary encoded and the decoding the data sent requires minimal processing which is a big plus on cpu usage on the embedded side of the link.

There are readily available libraries for various languages but most importantly C for embedded apps.

Mark
Can you recommend any particular implementations for embedded C?
Craig McQueen
http://code.google.com/p/protobuf-c/
Mark
A: 

Protocols are a natural fit for state machines, so perhaps you could use the very lightweight, open source QP state machine frameworks (state-machine.com). Ready to use QP ports and examples for various compilers are available for AVR, MSP430, ARM7/ARM9, TMS320C28x, PSoC, HC08, M16C/R8C, H8, 8051, PIC18, PIC24/dsPIC, ARM Cortex-M3/M0, and many others.

Note: I work for http://state-machine.com

Miro
Not quite spam. However, Miro, we don't use signatures on SO. I've edited your answer to show one way to get the same information across. I'm also going to downvote the answer because I don't think it directly addresses the question.
John Saunders
Yes, it was my intent to indicate that I work for state-machine.com.
Miro
+2  A: 

OpenJAUS.

It's reflective, composable and standardized (ish) Works cross-language-cross-platform.

Provides a lot more framework than Protocol Buffers ( which is a neat messaging stack) It's focussed on robotics, but works for control systems.

In theory a JAUS user interface can operate any JAUS-compliant device, and JAUS systems are intended to compose into a syste-of-systems.

If those things don't make sense then please ignore this suggestion.

Tim Williscroft