May 11, 2010

living with ax4510 Board....

The board is based on the processor S3C4510B (ARM7TDMI).. So development requires 2 things...
  1. Toolchain: to compile the code
  2. Uploader: to upload the code
Toolchain: a collection of tools which produce end binary to run on a particular board.
cpp ----> gcc ----> as ----> ld
( cpp, gcc ) : Partially generated and downloaded source is compiled into executables

( as, ld ) : Existing executables are directly used (eg for ld:glibc/newlib ). May be h/w stds and std files for a board.

---------------------------------------------------
Two are required for porting other than u r C code.
  1. Startup code : assembler code which does low-level hardware initialization and sets up such things as stack.
  2. linker script : which will tell to the linker where to put which sections of your complied code
The function of the assembler startup file is to run the C program.The linker script explains to the linker where in the memory to put what.

Linker Script contains:
ENTRY : ENTRY( _startup ) means _startup as entry point, which is defined in the startup file and which is visible to linker as it is declared as global.

MEMORY:
MEMORY
{
RAM (rw) : ORIGIN = 0x40000200, LENGTH = (0x00002000 - 0x00000200 - 0x20 - 0x100)
}
RAM as Read/Write region of memory with origin and length of different sections.

SECTIONS:
.text
.rodata
for read-only data
.data read or write data
.bss
for zero-initialized statically allocated variables.


References:
http://only.mawhrin.net/~alexey/prg/lpc2103/tutorial-hello/
http://www.cse.iitb.ac.in/~uday/courses/cs715-09/gcc-code-view.pdf

For Web Developer

  open -a "Google Chrome" --args --disable-web-security