Xilinx SP606 FPGA + MicroBlaze + LWIP // SPI Flash Bootloader Generation

General Project Setup
One of the most important points here is that if you’re attempting to create an embedded system is that your linker script is setup properly. When using LWIP, I had to increase the heap and stack size of my main application to 0x0A00 as seen below.


Bootloader Generation
From the SDK, create a default bootloader (srec_bootloader)

Here’s it’s linker script…


Ensure that in your blconfig.h file you have the following line
#define FLASH_IMAGE_BASEADDR 0x87200000
This tells the bootloader where to begin pulling the SREC data (your actual executable application)

Program the FPGA w/ the system bit file and the srec bootloader.

Program FPGA  (on worklaptop)_006

Take the download.bit file from the hardware platform
Run the following commands

impact -batch make_bpi_up.impact
xmcsutil -accept_notice -18 pi outfile.hex -o bootloader.bin

(The last command above creates a bootable image w/ your FPGA bit file and the bootloader)

Program your application @ the offset specified by your bootloader using XSDK…

Next, program the bootloader @ 0x0 using XSDK

Note, when you’re selecting “Program Flash” from XSDK, you’ll need to browse to the bootloader.bin and select * as opposed to “.bin;.elf;*.srec” in the file type filter in the browser window so you’ll be able to select the bootloader.bin file itself.


Let me know if you need me to clarify any of the steps in the comments below

The make_bpi_up.impact file consists of the following

setMode -pff
setSubmode -pffparallel
setPreference -pref StartupClock:Auto_Correction
addPromDevice -p 1 -size 32768
addDesign -version 0 -startaddress 000000
addDeviceChain -index 0
addDevice -p 1 -file download.bit
generate -format hex -fillvalue FF -output outfile

2 comments Add yours
    1. Martin,

      Sorry for the delay, these e-mails were going to spam and I missed your message. You should be able to find the xmscutil in the Xilinx installation bin directory. Let me know if you’re still having issues and I’ll dig up the computer I had that saved to.

Leave a Reply

Your email address will not be published. Required fields are marked *