A second-stage loader is a stand-alone application that is executed at boot time before the actual application is dynamically loaded into memory. It has its own executable file (DXE) and hence,it will consume space in the boot source memory as part of the loader image (LDR). First of all, the SSL is loaded into the first memory location in L1 instruction SRAM. Then,it performs whatever tasks it is intended to do, and it finally completes the boot process, overwriting itself with the actual end application.
The boot routine(rom_Boot()) provides access to boot an application at run-time through a supported peripheral. Also, used for any kind of second-stage boot for supported boot modes.
The method used in this document creates two separate LDR images(SSL and LED blink application). LED blink application is programmed into different offset within the parallel flash memory.
In the SSL, rom_Boot() is called in the main:
App1_startaddress is the start address of the boot stream in the parallel flash memory. dBootCommand parameter configures the boot mode to Memory via the SMC,Boot code , SMC memory bank selection.
Creating LDR Files:
Please refer the attached project loader settings to create loader file for memory boot mode:
1. If the application you are booting is a dual-core application, you must make sure your SSL is also a dual-core application to ensure proper core initialization.
2. If the both application and SSL are single-core application, you have to comment function "adi_core_enable(ADI_CORE_1);" in SSL application.
Programming Multiple LDR Files to parallel Flash Memory:
Use CLDP to flash the ldr images.
1. Load ssl1_Core1.ldr into flash memory:
cldp -proc ADSP-BF609 -emu KIT -driver "C:\Analog Devices\ADSP-BF609_Evaluation_Board-Rel1.1.0\BF609_EZ-Board\Blackfin\Examples\Device_Programmer\parallel\bf609_pc28f128p33_dpia.dxe" -cmd prog -erase all -format bin -offset 0 -file "<path name>\ssl1_Core1.ldr"
2. Load led1_Core1.ldr into flash memory:
cldp -proc ADSP-BF609 -emu KIT -driver "C:\Analog Devices\ADSP-BF609_Evaluation_Board-Rel1.1.0\BF609_EZ-Board\Blackfin\Examples\Device_Programmer\parallel\bf609_pc28f128p33_dpia.dxe" -cmd prog -erase affected -format bin -offset 1048576 -file "<path name>\led1_Core1.ldr"
Using the SSL Example Program:
After all LDR files are programmed into flash memory, reset or power-cycle the ADSP-BF609 EZ-KIT board to load and run the SSL.
Once the SSL is loaded, LED3 & LED4 blinks 5 times and load the application from the parallel flash memory 0xB0100000. Now LED1 and LED2 blinks continuously