A
arkaitz
Guest
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
the SRAM base address.
9-. I download it to the FPGAs BlockRAMs through the debugger.
OK. Now firstly I compare if the FLASH contents are the same as the
"executable.bin" file. Always they are. Then I copy it to the SRAM and
I check it. Always has the same content as the FLASH.
Finally, the next instruction of the bootloader is a branch to the
SRAM base address. Once I execute MICROBLAZE becomes blocked and
doesn't do anything.
Does anybody know why? Am I doing something wrong?
I hope the details I've done can be easily understood.
Thanks for all the help you can give me.
Arkaitz.
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
the SRAM base address.
9-. I download it to the FPGAs BlockRAMs through the debugger.
OK. Now firstly I compare if the FLASH contents are the same as the
"executable.bin" file. Always they are. Then I copy it to the SRAM and
I check it. Always has the same content as the FLASH.
Finally, the next instruction of the bootloader is a branch to the
SRAM base address. Once I execute MICROBLAZE becomes blocked and
doesn't do anything.
Does anybody know why? Am I doing something wrong?
I hope the details I've done can be easily understood.
Thanks for all the help you can give me.
Arkaitz.