UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

Reply

Multicore booting from SD

Highlighted
Adventurer
Posts: 66
Registered: ‎03-03-2015

Multicore booting from SD

Hey all!

I've been struggling quite a bit trying to get two applications running on both ARM CPUs in my Zedboard.

Thanks to the help I got in a previous post,
(https://forums.xilinx.com/t5/Embedded-Processor-System-Design/Setting-up-a-Zynq-FreeRTOS-dual-core-project/td-p/793183)

I've managed to upload a FreeRTOS and a baremetal executable to CPU0 and CPU1, respectively, and got them to run under the Debug Configuration setup in SDK.

 

I now need to do the same but have the Zedboard boot independently (say, an SD card or QSPI). Which means, I now have to add an FSBL to the mix. I've been reading the Zynq TRM and taking a look at the latest XAPP1079 version (which I've got from http://www.wiki.xilinx.com/XAPP1079+Latest+Information) but, so far, I've only managed to get CPU0 to load properly. I'm generating the boot image the same way I would for a single-core application, with the only difference being the addition of CPU1's .elf file in SDK's Boot Image Creation menu.

 

I understand that CPU0 needs to wake CPU1 up by writing CPU1's program entry point (defined in its linker script) to 0xfffffff0 and call the sev() command. I do this procedure at the very beginning of CPU0's program. However, I'm noticing that CPU1 continues stuck in its 'wfe' loop (picture below). Furthermore, if I execute 'mrd' at 0xfffffff0, I do see the proper entry-point address. Should this "waking CPU1" procedure be done at the FSBL level?

 

zynqMulticore.jpg

 

Another possible cause of error might be the fact that XAPP1079 uses a modified BSP version (5.19) for the FSBL project. I followed the steps in the example's readme file for creating the FSBL project, but I'm getting compile errors when building.

 

Any help is greatly appreciated. I've tried to get some possible debug messages from the FSBL code but, for some odd reason, I'm not able to connect to the UART port while the FSBL is running. I'm getting a "port busy" error when using GtkTerm and a "already connected" error when using the built-in terminal in SDK.

 

Thanks in advance.

 

Vivado & SDK version used: 2016.4
XAPP1079 Vivado version: 2015.2

Observer
Posts: 63
Registered: ‎06-19-2015

Re: Multicore booting from SD

Hi @zpac

 

If you have followed the XAPP1079, in the source folder they given examples. Copy the cpu0 & cpu1 linker files from the example source to your project source. 

 

In cpu0 soucre, 

#define APP_CPU1_ADDR 0x03000000

 

this define you need to change as per your starting address of cpu1 in linker file.

 

Hope you understand,


----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------

 

Thanks

Madhu

Observer
Posts: 63
Registered: ‎06-19-2015

Re: Multicore booting from SD

Hi @zpac

 

--Another possible cause of error might be the fact that XAPP1079 uses a modified BSP version (5.19) for the FSBL project. I followed the steps in the example's readme file for creating the FSBL project, but I'm getting compile errors when building.

 

To build the fsbl dont go with the modified bsp... If you are getting errors, goto fsbl_bsp settings and change the bsp version to standard bsp.


----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------

Thanks 

Madhu