MICROBLAZE: executing program from external memory

Hi all,

I can't execute any program from external SRAM memory.

The program is copied from FLASH to SRAM and the executed. This is done with a bootloader.

Here you are the details of the steps I do:

1-. I create a C program 2-. I compile in EXECUTABLE mode with _TEXT_START_ADDRESS = SRAM base address. 3-. I create the binary file of the "executable.elf" from the XMD with the next GCC command: "mb-objcopy -O binary executable.elf executable.bin"

Now I have 2 options:

-- FIRST

4-. I compile the FLASH charger in EXECUTABLE mode with _TEXT_START_ADDRESS = 0, in order to be stored in the internal BlockRAMs. 5-. I program the FPGA with the resulting "download.bit" bitstream. 6-. I burn the "executable.bin" file to the FLASH memory using a FLASH writer I have done that communicates the PC with the MicroBlaze's flash charger via serial port.

--SECOND

7-. I burn the "executable.elf" file with a tcl file that some people have sent me. This tcl uses the XMD tcl command "xdownload".
--
8-. I compile the bootloader in XMDSTUB mode. This program copies the
contents of the flash memory into the sram memory and then branches to
 Click to see the full signature
Reply to
arkaitz
Loading thread data ...

Have you actually connected the OPB to the instruction side of the microblaze, as well as the data side...?

Since you can verify the contents of the external ram (as data reads), that's the only possible explanation I can think of...

In MHS, it should look like this (in microblaze section):

BUS_INTERFACE DOPB = d_opb_v20 # or whatever the bus instance is called BUS_INTERFACE IOPB = d_opb_v20 # same bus, EDK will create an arbiter

Regards,

John

Reply to
John Williams

Thanks a lot John!!

The problem what you've told me. I didn't have connected the to the IOPB.

Regards,

Arkaitz.

Reply to
arkaitz

I'm very glad to hear that - I probably should have thought of it earlier!

Given that this topic comes up pretty often (and I get a lot of private email about it too) Xilinx might consider documenting more explicitly the process for executing code from external memory on Microblaze...

Cheers,

John

Reply to
John Williams

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.