A compiler is a computer program (or set of programs) that transforms source code written in a computer language (the source language) into another computer language (the target language, often having a binary form known as object code). The most common reason for wanting to transform source code is to create an executable program.
Read more at http://en.wikipedia.org/wiki/Compiler .
For these applications, we use IAR Embedded Workbench. It compiles our C++ source code into ARM ELF format, which is used on the phones.
Get IAR at http://www.4shared.com/file/76157665/8439f581/IAR442A.html .
Install it somewhere and run Embedded Workbench 4.0 Evaluation\common\bin\IarIdePM.exe
It shall associate all eww files with itself. They are workspace files.
I opened BcfgEdit's source code (eww file), it looks like this.
You must set it to Release under Workspace on the left.
Then press F7 (or Project → Make).
Now you have an .elf file in Release\Exe directory.
To be honest, IAR is not really good for programming. It's a fine compiler and it is the only compiler we have for elves, but it's not a great IDE.
Even Notepad++ 1) has better interface, but what I use now may be even better: UltraEdit. It has a lot of features an IDE should have, even though it's just a text editor. My favourite is the Function list, which you can see on the right side. It analyzes the cpp file opened and finds all functions in it.
It can even compile! Actually you have to make your own batch file to do it. Batch is not compulsory, but better, in case you have to reinstall Windows or so, it remains.
@echo off echo Peti compile "c:\Program Files\Embedded Workbench 4.0 Evaluation\common\bin\iarbuild.exe" "...\main.ewp" -make "Release" echo Done, bluetooth
If you run this batch file, it creates the elf automatically, without even opening IAR's IDE. Now this can be used in UltraEdit too.
There you have the button on the toolbar between text editor and output, on the right side, also Ctrl+Shift+0 builds the elf.
| elf_techniques/compiling.txt · Last modified: 2009/02/01 05:34 by peti |