1. Create MCS file for PROM programming which includes also

1. Create MCS file for PROM programming which includes also
Microblaze Firmware (and loads it).
The problem arose because in the past versions of ISE, an option called “Update bitstream with processor
data” was present but is missing after ISE release 13.
As far as can we understand from the poor xilinx documentation, now a data2mem command line process is
needed to update the bitstream with the processor firmware. This procedure appears to be automatically
done during “generate programming file” process in ISE. For this reason the ELF file must be added to the
project. The procedure is the following:
0. This procedure works only if your firmware can be contained in the Microblaze internal Blockram (As
Firmware it is meant the Microblaze program designed in C, otherwise I will refer as FPGA-Firmware).
1. Create your top level in ISE with correct ports and ucf file if needed (not already contained in EDK)
2. Add microblaze processor and edit it using EDK (introduce peripheral, memories, port and addresses).
In this case the elf file is not yet in the EDK project:
You see the UCF, the MHS and a lot of other useful files, but no ELF file.
3. In ISE, selecting the microblaze processor, run export to SDK with bitstream
4. Go to SDK and create your C project and firmware. You need three folders in the Project Explorer
navigator panel:
a. The C project files with includes and C sources and ELF files
b. The board support platform (bsp)
c. The HW platform with SDK generated .bit .bmm .xml
Edit linker script if necessary or if you wish or for other purposes.
5. After debug and test using SDK go back to ISE and select “add source file”, looking for the ELF
generated by SDK (browse until you find it). If you open EDK you will find something like this:
Now the ELF file is in both the ISE project and the EDK project.
6. After adding the ELF to the design rerun all (maybe a cleanup project files is necessary) to generate a
.bit file which includes the ELF (data2mem is automatically called by ISE during “generate
programming file”, you see it in the console or in the bit file messages).
7. Generate the MCS file for your PROM (in my case the SPI flash on SP605 xilinx board) using the ISE
generated .bit file and load the PROM. After programming/power up your FPGA loads the
configuration file with a running version of Microblaze Firmware.
8. Very oddly if you go to impact and load the generated .bit to the FPGA, the firmware for microblaze
is not loaded/not working, but if you generate the PROM file (example SP605 board, SPI Flash) after
loading from PROM after power up, the microblaze firmware is correctly loaded in the FPGA.