Boot Sequence; Start() - Entry Point - Freescale Semiconductor DSP56800E User Manual

Hide thumbs Also See for DSP56800E:
Table of Contents

Advertisement

In the DSP56800E_Quick_Start tool, the vector table (vectors.c) is always linked at address
0x0000 for any processor configuration. To assure the startup code gets called after reset even for
the configurations where 0x20000 is the default vectors base, two jumps to the Start() are linked
at these addresses from the boot_jump section of the vectors.c file for both reset vectors. The
startup code then configures the interrupt controller to use the address 0x0000 as the vector table
base address.

Start() - entry point

2.1.2
The entry point of all projects developed with the DSP56800E_Quick_Start tool is the Start()
assembly routine located in the startup.c file in {project}\SystemConfig directory. This routine
performs the following initialization:
configures the interrupt controller to use the address 0x0000 as the vector base address
sets the OMR register according to the settings in global application configuration file (appconfig.h)
initializes the On-chip Clock Synthesis (OCCS) module, sets the PLL (by values from appconfig.h)
and waits while the generated clock is stable
sets the External Memory Interface unit (SEMI) to generate the proper chip select signals and the
wait states for the external memories according to the appconfig.h file
[optionally] runs the internal memory tests with halting the processor if memory module is not
usable
initializes the stack pointer (SP) to the address after any data segments
clears the .bss segment which holds the uninitialized global and static C variables
copies the initial values from Flash memory to initialized global C variables (.data segment). Either
xFlash or pFlash memory can be chosen to hold the initialization data.
clears and initializes variables in the fardata.bss and fardata.data segments
clears and initializes variables in the .bss.pmem and .bss.data segment (program RAM-based
variables)
initializes the program RAM-based code of the pramcode section.
When all the initialization is done, the functions userPreMain(), main(), userPostMain() are
called.
2.1.3
userPreMain()
The userPreMain() function is called before the main application code in the main() function. The
user can add any additional initialization code here. The function is located in the appconfig.c file.
2.1.4
main() the User's Application Code
The main() function is called after all the code described above is executed (i.e. the processor is
initialized and the user's pre-main code is executed). It is the place where the user writes the
application code. By default the function is located in the main.c file, but the file can be renamed
by the user.
FREESCALE SEMICONDUCTOR
Targeting 56F8xxx Platform

Boot Sequence

2-3

Advertisement

Table of Contents
loading

Table of Contents