tags:

views:

145

answers:

7

What do most cellphones use to run the hardware? C?

I'm just talking about the "common cellphone", not smart phone/android stuff.

+1  A: 

Phones running a variety of the Symbian OS will very likely have all core OS functionality written in C++, as that is the "native" language of Symbian.

unwind
A: 

Hardware things, like setting registers and handling interrupts to run the radio, are all done in C.

Two problems with C++ are, in my opinion, that

  1. It is harder to design efficient programs in it. The CPU may only be a few hundred MHz.
  2. The compilers for more exotic CPUs barely work in C, so running them in C++ would be a miracle.
Steve Hanov
A: 

Nokia bought Trolltech, the makers of Qt - a cross-platform application and UI framework for desktop and mobile applications. Presumably this includes cell phones. Qt is written in C++. http://www.qtsoftware.com/developer/getting-started

Les
+1  A: 

When talking about cellphones, there are usually two processor components in it.

  1. The "main" processor that covers the user interface.
  2. The "baseband" processor that powers the cellular modem. It handles the low-level radio interface, switching towers, etc.

The code for #1 tends to be higher-level (C, C++, Java, etc). The language used really depends on the OS that it is running (Windows Mobile, Symbian, Linux, something home-grown, etc). Of course, there is almost always SOME low-level assembly for the boot loader.

The code for #2 is pretty low-level. Baseband Processors tend to be little more than microcontrollers. Mostly assembly language and C. Very unlikely to find anything higher level here. (Although I have seen a few cell modems with a Python interpreter built-in.)

Usually the Baseband Processor is running some kind of minimal RTOS, or in some cases OS-less. They are very often running an RTOS called Nucleus from Mentor Graphics.

On some low-cost cell phones, #1 and #2 are joined together to cut costs (only one processor & OS in the system).

msemack
+2  A: 

I work for wireless semiconductor chip provider, and we work on variety of phone platforms from ULC (ultra low cost ) segments to Smart phones.

In our Reference phone design, the entire code (including Protocol stack, Kernel, Middleware, Application and MMI) is written purely in C. AFAIK even first tier customers use C language for their framework, atleast for ULC and Mid category phones, as the memory size tends to be a big requirement.

Chintan
A: 

Phones running Android will use mostly C under the java machine, and the Java in the top layers.

But if you look on most phones they are just like the rest of the embedded market, it is a lot of c and in some project some c++.

And the smaller they are, the more c you will find.

/Johan

Johan
A: 

Most Cellphones have different layers of Software, Largely we can divide this into three parts.

1.Application Layer : anything like BREW,C++ or Android

2.Middle-layer : Consists of real time OS code : C code[mostly as I have seen]

3.Lower-Layer : Device Drivers : Written in C.

please note :Most Common Cellphones are likely to use C++ as an application layer ,Brew is largely used by CDMA phones for application layer

pdssn