Several tools are involved in the compilation toolchain. This article will only present the basic tools to compile a simple application (this should work for both Series 60 and UIQ environment).
Command line tools
The first tool involved is bldmake: this tools is typically used to generate the command file that you will use to compile and link your application (abld). Bldmakerequires the bld.inf file to do this [1].
The abld.bat file is the key entry point for compiling your application :
Depending of the parameters you will pass to the abld command, you will generate: a Visual C++ workspace and project file (abld makefile vc6), a Windows emulator application (abld build wins udeb) or a target phone application (abld build thumb urel).
The parameters value vc6 and wins are quite straightforward to understand (vc6 = Visual C++ 6, wins = Windows). Udeb means "Unicode - Debug" and Urel stands for "Unicode - Release". Unicode indicates a character coding scheme (a little bit like ASCII but Unicode character coding allows exotic character to be coded). Debug means you will generate Debug information for your application (this is probably the case for the Emulator version) and Release that the Debug information will not be included (this is probably the case for the target executable).
ARMI vs ARM4 vs THUMB
Current ARM processors (at least ARM7 and ARM9) have two instruction sets:
one with instructions on 32 bits which is ARM4
one 16 bits instructions which is THUMB
ARM4 mode has a slightly richer instruction set. THUMB mode is more compact. A general rule is that program compiled in THUMB mode are smaller than program compiled in ARM4 mode. And program compiled in ARM4 are faster.
However, this may not be true for all mobiles, depending on their hardware architecture. As a matter of fact, most mobile phones have a 16 bit memory bus, and then use THUMB mode. In that particular case, a THUMB mode program is generally smaller and quicker because one memory access is enough to fetch an instruction.
ARMI stands for ARM Intermediate. This is the safest choice to use since ARMI program can be linked with THUMB or ARM4 libraries while THUMB compiled code can only be linked with THUMB code and ARM4 code with ARM4 code.
[1] the bld.inf file in this case is just a list of .mmp files
|