Jump to content
  • 0

How To Store SDK Project in Flash for genesys 2


rappysaha

Question

Hi,

I am using genesis 2 board for my ongoing project. For flash programming, I have followed this tutorial. But now I am using Microblaze that's why I need to use SDK. But, I don't know how store SDK project into flash.

I followed the "Getting started with Microblaze". But, If I want to upload the whole project to the flash what should I do? So, when I power up the Genesys 2 and connect the UART port by terminal application (Teraterm), The program will boot up from the flash and display the "Hello world" on the terminal display.

Any suggestion will be very helpful.

Thanks.

Link to comment
Share on other sites

14 answers to this question

Recommended Posts

Hi rappysaha,

I went through the tutorial that JColvin link above with the Genesys 2 just now. For this project I did not compress the bitstream. I used the same offset as the Arty with success and updated the tutorial. The only difference to the getting started with microblaze project in you block design that you need to do is to add the quad spi IP along with adding a clock to the mig( used a roughly 45Mhz clock) ui_addn_clk_0 and connect it to the est_spi_clk on the quad spi IP as shown below. There are two flash memory options that fit Spansion S25FL256S choose 0. Also I will attach my project and screen shots as well. Hope this helps!

cheers,

Jon

quad_spi_genesys2_esc.jpg

quad_spi_genesys2_esc2.jpg

QUAD_SPI_Genesys2.zip

Link to comment
Share on other sites

Hi Jcolvin and Jon,

I am really grateful for your help. I successfully bootup my hello world program.

But, I am not clear about "FLASH_IMAGE_BASEADDR  0x00C00000". Why should I pick up this base address? I mean on the basis of which criteria I should select my "FLASH_IMAGE_BASEADDR"?

Any suggestion will be really helpful.

Thanks

Rappy Saha

Link to comment
Share on other sites

Hi @jpeyron,

Thank you. It is now very clear.

I successfully generated the Hello World and download the whole SDK project into genesys2. It was ok.

I was following this tutorial.

I made an image processing Pipe with different image processing IP. I saw my download.bit file size is 4578 KB. I used bit compression. So, I used my "FLASH_IMAGE_BASE_ADDR" 0x0x004C4B40 = 5 MB.

But, when I am going to use my own application, I faced some error.

At step 2.2 of previously mentioned tutorial:

     - I tried to generate an "Empty application" and after hitting the finish button I am facing following error (attached image file 1st and 2nd).

     - I also attached my ADDRESS MAP of my project (attached image file 3rd).

Why does this kind of error happen? How can I remove this error?

Any suggestion will really helpful.

Thank you

Rappy saha

Error at Flash programming.JPG

Error at Flash programming2.JPG

Address Map.JPG

Link to comment
Share on other sites

Hi,

For my application, I am using VDMA IP. My project ran successfully without SREC bootloader program. But, when I am using SREC bootloader and trying to follow same procedure for SDK flash programming tutorial , I am having following error (Attached image). I am using flash image base addr= 0x00C00000.

Why this kind error is happening? How can I handle this kind of error??

Any suggestion will be really helpful.

Thank you

Rappy Saha

SREC_error.JPG

Link to comment
Share on other sites

Hi Rappy,

The errors are from the sdk code for the VMDA. The elf loads successfully but the write config and set up failed. I would suggest running the program normally and stepping through the code in the sdk debugger to see what is happening with config and setting up write.

cheers,

Jon 

Link to comment
Share on other sites

Hi @jpeyron,

Thank you for answering back.

With the SDK debugger (GDB) I also found same result. Without using SREC boot loader program the code for VDMA works fine. For VDMA, I am using the example code of Xilinx. Here I attached my code files.

If you need anymore information to understand my problem please let me know.

Any suggestion will be really helpful.

Thanks

Rappy Saha

 

vdma.c

vdma_api.c

Link to comment
Share on other sites

FYI, In regards to the segmentation fault, I've had a few of those with SDK and recreating the workspace usually resolves it. Seems to be a sporadic issue with the tools. 

Can you attach the linker script for your VDMA project? It is the file that ends in .ld. 

The error you are getting is a "device busy" error, which doesn't make a lot of sense, but also seems to occur at potentially the first place where the VDMA registers are accessed. This means it could be that the VDMA is in a bad state, doesn't exist (meaning the wrong bitfile was programmed), or maybe is expected to be at a different address. Are you certain that you programmed the first portion of the Flash with the correct download.bit file that was generated with your Vivado project that has the VDMA core?

Another hunch is that this is caused by a difference in how your static and global variables are getting initialized when loaded over JTAG vs. bootloader. To check this, I would add a lot more debugging messages to the program and then compare the output when booted using the two methods. I recommend adding a message inside the place where you check context_init (at the beginning of run_triple_frame_buffer) to be sure it is getting entered. Also, I would print the entire contents of the following variables in WriteSetup directly before calling XAxiVdma_DmaConfig:

  • Every field of vdma_context
  • Every field of vdma_context->WriteCfg
  • Every field of vdma_context->InstancePtr->WriteChannel
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...