Programming Examples
24-88
ADSP-BF50x Blackfin Processor Hardware Reference
void xor_initcode (ADI_BOOT_DATA *pBS)
{
pBS->pCallBackFunction = xor_callback;
}
Note that the callback routine is not volatile. It should not be overwritten
by subsequent boot blocks. It can, however, be overwritten after process-
ing the last block with
BFLAG_CALLBACK
flag set.
The checksum algorithm must be booted first and cannot protect itself.
Problems can be avoided by letting initcode and callback execute directly
from off-chip flash memory. The ADSP-BF50x processors provide a
CRC32 checksum algorithm in the on-chip L1 instruction ROM, that can
be used for booting under this scenario. For more information see
“CRC
Checksum Calculation” on page 24-33
.
Example Direct Code Execution
This code example illustrates how to instruct the CCES or Vi+
tools to generate a flash image that causes the boot kernel to start code
execution at flash address 0x2000 0020 rather than performing a regular
boot. See
“Direct Code Execution” on page 24-22
.
First, a 32-byte data block is defined in an assembly file that contains the
initial block.
.section bootblock;
.global _firstblock;
.var _firstblock[4] = 0xAD7BD006,
0x20000020,
0x00000010,
0x00000010;
Summary of Contents for EZ-KIT Lite ADSP-BF506F
Page 50: ...Contents l ADSP BF50x Blackfin Processor Hardware Reference ...
Page 92: ...Development Tools 1 30 ADSP BF50x Blackfin Processor Hardware Reference ...
Page 110: ...Interface Overview 3 12 ADSP BF50x Blackfin Processor Hardware Reference ...
Page 236: ...Internal Flash Memory Control Registers 6 92 ADSP BF50x Blackfin Processor Hardware Reference ...
Page 650: ...Programming Examples 15 56 ADSP BF50x Blackfin Processor Hardware Reference ...
Page 804: ...Programming Examples 17 92 ADSP BF50x Blackfin Processor Hardware Reference ...
Page 1194: ...Programming Examples 24 90 ADSP BF50x Blackfin Processor Hardware Reference ...
Page 1256: ...ACM Registers A 50 ADSP BF50x Blackfin Processor Hardware Reference ...
Page 1264: ...Boundary Scan Architecture B 8 ADSP BF50x Blackfin Processor Hardware Reference ...