Page 1 of 1

Adjust Boot Image to load multiple .rgba data files

Posted: Mon Jul 03, 2017 3:33 pm
by Boitumelo_Ruf
Hi everyone,

I am currently working HDMI Test example from the starter guide, which loads and image at startup and displays it on the screen. I now want to adjust it in order to load multiple images (two for the start), as input data for our stereo algorithm. How do I need to adjust the boot image file. I tried two options:

1. Load a second image to a different address that the first (with [load=...]). This didn't work at all. The board didn't even start.
2. Load a second image with an offset address (with [offset=...]). With this the board started up, but there was no data at the expected address.

Can someone please help me?

Thanks.
\Boitumelo

Re: Adjust Boot Image to load multiple .rgba data files

Posted: Fri Jul 07, 2017 12:51 pm
by Emilie_Wheatley
Dear Boitumelo,

What I just tried:

1- Add a second image that load to a different address to the first one to your boot.bin file. I don't know why that solution didn't work, which address did your load your second image to?
Here is my bif file

Code: Select all

the_ROM_image:
{
   [bootloader]D:\SDSoC\platforms\BIF\fsbl.elf
   D:\SDSoC\platforms\BIF\design_1_wrapper.bit
   [load = 0x38000000]D:\SDSoC\platforms\BIF\EMC2_with_logo.rgba
   [load = 0x38400000]D:\SDSoC\platforms\BIF\input_70x46.rgba
}


2- In the code I set the VDMA framebuffer address to the one of my first image then start the vdma.
I do a sleep for 20s before changing to the second image.
To do so I stop the vdma, then set the vdma framebuffer address to the one of my second image then start the vdma again.
And I see the second image on my monitor.
Here is my code:

Code: Select all

   // Set the framebuffer to the address of the first image
   ReadCfg.FrameStoreStartAddr[0] = 0x38000000;

   Status = XAxiVdma_DmaSetBufferAddr(&Vdma, XAXIVDMA_READ, ReadCfg.FrameStoreStartAddr);
   if (Status != XST_SUCCESS) {
         xdbg_printf(XDBG_DEBUG_ERROR,"Read channel set buffer address failed %d\r\n", Status);
         return XST_FAILURE;
   }

   // Start the VDMA
   Status = vdma_start();
   if (Status != XST_SUCCESS) {
         xil_printf("error starting VDMA..!");
         return Status;
   }

   sleep(20);
   
   // Stop the VDMA
   vdma_stop();
   
   // Set the framebuffer to the address of the secondimage
   ReadCfg.FrameStoreStartAddr[0] = 0x38400000;

   Status = XAxiVdma_DmaSetBufferAddr(&Vdma, XAXIVDMA_READ, ReadCfg.FrameStoreStartAddr);
   if (Status != XST_SUCCESS) {
         xdbg_printf(XDBG_DEBUG_ERROR,"Read channel set buffer address failed %d\r\n", Status);
         return XST_FAILURE;
   }

   // Start the VDMA
   Status = vdma_start();
   if (Status != XST_SUCCESS) {
          xil_printf("error starting VDMA..!");
           return Status;   
   }
   


I hope that helps.

Regards,

Emilie

Re: Adjust Boot Image to load multiple .rgba data files

Posted: Tue Jul 11, 2017 12:06 pm
by Boitumelo_Ruf
Hi Emilie,

thanks, that worked.

With what criteria did you choose the second load address (0x38400000)? I tried multiple addresses such as 0x40000000, 0x42000000 or 0x72000000. All of them didn't work.

\Boitumelo

Re: Adjust Boot Image to load multiple .rgba data files

Posted: Tue Jul 11, 2017 1:21 pm
by Emilie_Wheatley
Hi Boitumelo,

The data is loaded in the DDR and all the addresses you suggested (0x40000000, 0x42000000 or 0x72000000) are out of range of the DDR (0x0 - 0x3FFFFFFF).

Regards,

Emilie

Re: Adjust Boot Image to load multiple .rgba data files

Posted: Tue Jul 11, 2017 3:18 pm
by Boitumelo_Ruf
I see. Makes sense. ;)

Thanks a lot.

\Boitumelo