My question : how to boot dual-core application from different location in Flash memory ?
Enviroment : BF609-EZKIT , CCES 188.8.131.52 , emulator 100B or HPUSB-ICE
1. I wrote simple dual-core application , i.e. LED Blink :
Core0 - LED 1 and LED 2 on the BF609-EZKIT board
Core1 - LED 3 and LED 4 on the BF609-EZKIT board
2. My CCES setup for dual core-application (in Post-build steps field)
elfloader.exe -proc ADSP-BF609 -si-revision 0.1 -b MEMORY -f binary -width 16 -bcode 0x01 C:\CCES\App_Core0\Debug\App_Core0.dxe -NoFinalTag C:\CCES\App_Core1\Debug\App_Core1.dxe -o c:\tftp-root\prog0.ldr
It means that I link 2 *.dxe files into one *.ldr file (prog0.ldr) . In LdrViewer it is visible as multi-dxe structure (2 dxe blocks) without Final Flag after first block. So it looks good.
3. If I run this application via Emulator : it works OK !!! (both cores OK )
4. If I programmed prog0.ldr file into default location in Flash memory ( 0xb0000000) and press RESET : it works OK !!! (both cores OK)
5. If I programmed prog0.ldr file into any different location ( i.e. 0xb0100000 ) and I tried to use rom_Boot () function it DOESN'T WORK !!!
( none core doesn't work !!!!)
Example of use rom_Boot() function below :
#define _BOOTROM_MEMBOOT 0xC800000C
int (*BOOTROM_MEM)(void *, int, int, void *, int , void *) = (void *) _BOOTROM_MEMBOOT; // => 0xC800000C
BOOTROM_MEM(0xb0100000 , 0x00, 0 , NULL, 0x01,NULL); (call rom_BOOT () function !!!)
I checked a lot of argument combinations in the BOOTROM_MEM () function call , but without any success .
6. If I use the same method for booting single-core application it works OK !!!
(but only when the application doesn't include InitCode !!! ) .
The application with InitCode included looks like multi-dxe application ( has got 2 dxe blocks)
May be it is similar problem ?
So I am surprise why the same file ( prog0.ldr ) works properly from default location but doesn't work from any other ?
I'd like to write a Second Stage Loader Application and I very need this possibility .
Where is the problem ? Could anybody help me , please ?
Thank you in advance
I solved this problem. The solution is simple but unfortunately there is no way to find it in any docs !!!
I spent a lot of time to do it.
Here it is: Your calling application MUST be dual-core application too !!!
So (as in my case) , if you use U-boot bootloader as calling application it will not work !!!
By default u-boot is built as a single-core application and you MUST change u-boot to dual-core application !!!
I performed following steps:
1. Rebuilt u-boot code (in Linux enviroment) with defined :
2. Merge obtained u-boot code (u-boot) with any Core 1 application (Uboot_Core1.dxe) as follow:
bfin-elf-ldr -T bf609 -c u-boot2.ldr u-boot Uboot_Core1.dxe --bmode PARA --use-vmas --initcode arch/blackfin/cpu/initcode.o -J --punchit $((0x8000)):$((0x8000)):env-ldr.o
3. In result we obtained dual-core u-boot2.ldr application
4. This application can boot another dual-core application !!!!
May be it will be usefull for somebody