Does anyone have a second stage loader for 8-bit flash?
I have my code running on a single core, and I want to migrate to a dual-core project architecture.
To follow up, I'm using the "Booting(C)" project as a reference project, and it includes the BF561_prom16.dxe project as the second stage loader, except that it's included as the boot kernel instead of the init file. Which is the preferred method?
It would depend on your requirements. There is already a boot kernel that can perform booting from 8-bit and 16-bit flash. You would use a user kernel on top of it, only if the booting method is not sufficient for your system. You would use an init code just to initialize few items such as PLL, SDRAM Controller etc and quickly go back to boot rom.
For both 8-bit and 16-bit case, the processor does a fetch of 16-bit always, so you need to ignore the upper byte.
In fact the boot rom for older processors (such as BF561) is not that complicated compared to newer ones. You can take a look at the code here and see how it can help you.:: C:\Program Files\Analog Devices\VisualDSP 5.0\Blackfin\ldr\Boot ROM\src\bk_ad00
Other than that, you could use the information from Application Note EE-314.
Perhaps I didn't ask the question properly. My single core project has a custom init_asm file that sets up the PLL and SDRAM to load properly, and no kernel. The Booting(C) project has a kernel but no init file. Can I just add my init file as well as the kernel? Is the loader in the kernel overwritten or does it linger in L1?
The ADSP-BF561-ROM-V05.asm file is quite different than the Teton-Lite bf561_prom16.dsp file/project. I find it confusing when the different ADI examples are structured in different ways.
Which is the better starting point?
Apologies for this long delay. Have you settled at a method, or are you still puzzled about the usage?
Usually if you use the second stage loader (SSL), you need not use init code, since former can perform any house keeping operation that is otherwise done with init code. For instance, the default code performs operations such as initializing SDRAM Controller settings. User may even change PLL settings, if required. You may perhaps want to have these configured in the init code itself, if the SSL is quite large, and if really need to speed up the booting of that SSL - although in most cases SSL is not that large (and only in specific application cases you would really use an SSL).
At the same time, you could add both init code dxe, as well as the second stage loader dxe in to one BF561 project. If you do that, the Loader file will have contents in this order (use the LDR Viewer to see the blocks):
DXE 0: contains the init LDR DXE (init flag)
DXE 1: the second stage kernel
DXE2/DXE3: then the application DXEs …
I was advised that for SSL, you could look at the more up to date code here: ...\VisualDSP 5.0\Blackfin\ldr\561_prom16
Thanks for the follow-up. I have not looked into this further yet. You outlined the options well, but I will have to look at how difficult it will be to adapt the _16 loader to my 8-bit flash.
I'll let you know when I get it resolved.
Retrieving data ...