Building a Sample Application

To test the installation, it is a good idea to compile a sample application. Starting Cygwin, go to the relevant directory and run make.

$ cd /cygdrive/c/BlueLab2 0/apps/hello $ make

The main compiler xap-local-xap-gcc is derived from the GNU C compiler. This compiles the C code and produces an object file hello.o.The linker then works with the assembler xap2asm to analyze the object file, link in libraries and produce the application files hello.app, hello.dbg, hello.sym, and hello.xap. (See Figure 7.3.)

Figure 7.3 The BlueLab Tool Chain

Figure 7.3 The BlueLab Tool Chain

All you have done so far is build a "Hello World" program—this is not a BlueCore image, and you can't download it to the Casira yet. But you can use it to play with the debugging tools.

+1 0

Post a comment