User`s guide
DSP/BIOS Startup Sequence
Program Generation 2-21
Note:
When configuring an interrupt with the Configuration Tool, DSP/BIOS plugs
in the corresponding ISR (interrupt service routine) into the appropriate
location of the interrupt service table. However, DSP/BIOS does not enable
the interrupt bit in IER. It is your responsibility to do this at startup or
whenever appropriate during the application execution.
■ HST_init initializes the host I/O channel interface. The specifics
of this routine depend on the particular implementation used for the
host to target link. For example, in the C6000 platform, if RTDX is
used, HST_init enables the bit in IER that corresponds to the
hardware interrupt reserved for RTDX.
■ IDL_init calculates the idle loop instruction count. If the Auto
calculate idle loop instruction count box was chosen in the Idle
Function Manager in the Configuration Tool, IDL_init calculates the
idle loop instruction count at this point in the startup sequence. The
idle loop instruction count is used to calibrate the CPU load displayed
by the CPU Load Graph (see section 3.4.2, The CPU Load, page 3-
20).
4) Process the .pinit table. The .pinit table consists of pointers to
initialization functions. For C++ programs, class constructors of global
objects execute during .pinit processing.
5) Call your program’s main routine. After all DSP/BIOS modules have
completed their initialization procedures, your main routine is called. This
routine can be written in assembly, C, C++ or a combination. Because the
C compiler adds an underscore prefix to function names, this can be a C
or C++ function called main or an assembly function called _main.
Since neither hardware nor software interrupts are enabled yet, you can
take care of initialization procedures for your own application (such as
calling your own hardware initialization routines) from the main routine.
Your main function can enable individual interrupt mask bits, but it should
not call HWI_enable to globally enable interrupts.
6) Call BIOS_start to start DSP/BIOS. Like BIOS_init, BIOS_start is also
generated by the Configuration Tool and is located in the programcfg.snn
file. BIOS_start is called after the return from your main routine.
BIOS_start is responsible for enabling the DSP/BIOS modules and
invoking the MOD_startup macro for each DSP/BIOS module. If the TSK
Manager is enabled in the Configuration Tool, the call to BIOS_start does
not return. For example:










