Presentation is loading. Please wait.

Presentation is loading. Please wait.

Development Environment C Toolchain C toolchain steps: Preprocessor Processes C code, handles include, pragma and macro expressions Compiler Transforms.

Similar presentations


Presentation on theme: "Development Environment C Toolchain C toolchain steps: Preprocessor Processes C code, handles include, pragma and macro expressions Compiler Transforms."— Presentation transcript:

1 Development Environment C Toolchain C toolchain steps: Preprocessor Processes C code, handles include, pragma and macro expressions Compiler Transforms C language source code into assembly code Assembler Converts Assembly code into object code Linker Links one or more object code files with multiple libraries and generates executable code Cross development: the same toolchain is used, but cross-compiler, cross-assembler, and cross-linker are used instead of common tools Object code C code Assembler Linker Assembly Code Library Executable code (Binary code) Preprocessor Compiler Copyright © 2011 DSR Corporation 1

2 Development Environment GNU Toolchain Example To build an application gcc is used Preprocessor: cpp Compiler: cc1 Assembler: as Linker: ld Example: $gcc -v -Wl,-v a.c Reading specs from /usr/lib/gcc/i686-pc-cygwin/3.4.4/specs.. /usr/lib/gcc/i686-pc-cygwin/3.4.4/cc1.exe -quiet -v -D__CYGWIN32__... /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/as.exe -o \ /cygdrive/c/DOCUME~1/honda/LOCALS~1/Temp/cc0KPUpz.o ….. /usr/lib/gcc/i686-pc-cygwin/3.4.4/collect2.exe -Bdynamic … /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/ld.exe … Copyright © 2011 DSR Corporation 2

3 Development Environment Cross-development Toolchain Example The GNU compiler supports many processors for cross- development ARM, SH, MIPS, PowerPC, AVR, V850 Toolchain Similar to common toolchain Example for ARM $arm-none-eabi-gcc -v -Wl,-v a.c gcc version (CodeSourcery ARM 2006q1-6).. c:/arm/sourceryg++/bin/../libexec/gcc/arm-none-eabi/4.1.0/cc1.exe -quiet... c:/arm/sourceryg++/bin/../lib/gcc/arm-none-eabi/4.1.0/../../../../arm-none-eabi/bin/as.exe … … c:/arm/sourceryg++/bin/../libexec/gcc/arm-none-eabi/4.1.0/collect2.exe … c:/arm/sourceryg++/bin/../lib/gcc/arm-none-eabi/4.1.0/../../../../arm-none-eabi/bin/ld.exe … Copyright © 2011 DSR Corporation 3

4 Embedded Specific 8051 Memory Areas (cont.) Internal data memory Resides within the 8051 MCU and is read/write Up to 256 bytes of internal data is supported Very fast access because it is 8-bit addressable Types of internal data memory: data – the first 128 bytes, uses direct addressing idata – all 256 bytes, uses indirect addressing bdata – 16 bytes of bit addressable memory SFR memory 128 bytes of memory for Special Function Registers Cannot be accessed indirectly History of development: 8051 was designed to use 128 bytes of memory, was good for small devices To support compatibility with previous devices, new devices keep its architecture but expanded it with new features This caused a variety of memory types and system complicity Copyright © 2011 DSR Corporation 4

5 2. Embedded Specific 8051 Memory Areas (cont.) External Data Memory Read/write memory, up to 64 KByte Indirectly accessible Peripheral device may be mapped to this memory space => memory-mapped I/O 8051 memory types to access external memory xdata refers to any location in the 64K Byte address space of external data Copyright © 2011 DSR Corporation 5


Download ppt "Development Environment C Toolchain C toolchain steps: Preprocessor Processes C code, handles include, pragma and macro expressions Compiler Transforms."

Similar presentations


Ads by Google