Built-in mobile phone code
I work for a wireless semiconductor chip supplier and we work on a variety of phone platforms from ULC (ultra low) to smartphones.
In our reference phone, all code (including protocol stack, kernel, middleware, application and MMI) is written exclusively in C. AFAIK, even first level clients use C language for their structure, at least for ULC and Mid category phones, so how the size of memory matters a lot.
a source to share
Speaking of cell phones, it usually has two processor components.
- The "main" processor that spans the user interface.
- The "baseband" processor that powers the cellular modem. It handles low-level radio interface, switching towers, etc.
The code for # 1 tends to be higher (C, C ++, Java, etc.). The language used really depends on the OS it runs on (Windows Mobile, Symbian, Linux, homemade, etc.). Of course, there is almost always SOME low-level build for the bootloader.
The code for # 2 is pretty low level. Baseband processors are generally nothing more than microcontrollers. Basically assembly language and C. It is very unlikely to find anything higher. (I've seen a few modem cells with a built-in Python interpreter though.)
Typically the baseband processor runs some sort of minimal RTOS, and in some cases OS-less. They use RTOS very often called Nucleus from Mentor Graphics.
On some low-cost cell phones, # 1 and # 2 are bundled together to cut costs (only one processor and OS per system).
a source to share
Hardware such as setup and interrupt handling registers for starting the radio is done in C.
The two problems with C ++ are in my opinion that
- It is more difficult to design effective programs in it. The processor can be as small as a few hundred MHz.
- Compilers for more exotic processors barely run in C, so running them in C ++ would be a miracle.
a source to share
Most cell phones have different software levels, and in many ways we can divide this into three parts.
1.Application Layer: something like BREW, C ++ or Android
2. Middle level: Consists of real-time OS code: C code [mostly as I've seen]
3.Lower-Layer: Device Drivers: Written in C.
note: most common mobile phones will probably use C ++ as the application layer, Brew is mainly used by CDMA phones for the application layer
a source to share
Nokia bought Trolltech, the makers of Qt, a cross-platform application and user interface for desktop and mobile applications. Presumably this includes cell phones. Qt is written in C ++. http://www.qtsoftware.com/developer/getting-started
a source to share