Presentation is loading. Please wait.

Presentation is loading. Please wait.

Software Development and Software Loading in Embedded Systems.

Similar presentations


Presentation on theme: "Software Development and Software Loading in Embedded Systems."— Presentation transcript:

1 Software Development and Software Loading in Embedded Systems

2 Cross Compilation Development of embedded software is not generally done on the target processor - Software development is done on a host: The compiler may run on one kind of processor (80x86); produce code for another ( 8051) This is called a cross-compiler, but is otherwise not unlike any other compiler.

3 The Build and Load Process of Embedded Application Programs

4 Linking and Locating After compilation of modules, a set of object files must be linked together - The linker runs on the host and does this - The output is a relocatable program, with no fixed addresses yet assigned to the code/data A separate relocation step must be performed to create the executable binary image - general-purpose computers generally do this automatically, as the relocatable is loaded

5 Linking

6 Locating

7 Startup Code Embedded software generally runs out of ROM, with all the modules linked together - It is itself responsible for booting/initializing the system In addition to your application code, it is necessary to have code to prepare the CPU for the execution of your C/C++ application.

8 C/C++ Startup Code Details Copy initialized data from ROM to RAM Zero uninitialized data area Allocate space for and initialize the stack Initialize the processor’s stack pointer Create and initialize the heap (optional) Execute constructors and initializers for all global variables (C++ only) Enable interrupts Call main()

9 Reset Vector When a processor is started or reset, it must read its first instruction from a fixed known address - A small piece of reset code is stored at that address typically in a nonvolatile memory device The reset code might just disable interrupts (since the vector table isn’t initialized yet) and jump to the startup code - Though sometimes additional hardware initialization is required before the startup code can get control

10 The World Before main() Reset code (assembly, at known address in ROM) Hardware intialization (assembly, in ROM) Startup code (assembly, in ROM) C/C++ program (starting from main)


Download ppt "Software Development and Software Loading in Embedded Systems."

Similar presentations


Ads by Google