0
1.9kviews
Explain the structure of a typical C source program for ARM based target processor. Typically list the various types along-with memory size supported by a C compiler.
1 Answer
0
6views

enter image description here

  • The various steps involved in conversion of a program written in C to a corresponding binary file. Machine language is illustrated in the figure above.
  • An integrated development environment provides a text editor for creating and saving the source file. The source file is saved with
  • .c extension Most of the high level languages support modular programming approach and hence multiple source files can be included.
  • Translation of high level source code to an object file is done using a cross-compiler. It should be noted that each high level language for same target processor are different.
  • Different libraries used in the project must also be included.
  • The linker/locator is another software utility responsible for linking the various object modules in a multi-module project and assigning absolute address to each module.
  • Object to hex file converter converts the assembly language gauge to machine understandable language. Hex file is the representation of the machine code and the hex file is dumped into the code memory of the processor/controller.
Type Storage Size Value Range
char 1 byte -128 to 127 or 0 to 255
unsigned char 1 byte 0 to 255
signed char 1 byte -128 to 127
int 2 bytes -32,768 to 32,767
unsigned int 2 bytes 0 to 65,535
short int 1 byte -128 to +127
unsigned short int 1 byte 0 to 255
long int 4 bytes -2,147,483,648 to 2,147,483,647
unsigned long int 4 bytes 0 to 4,294,967,295
Please log in to add an answer.