We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

AR# 43615

13.2 EDK - How do I boot an application from flash with the SP605?


How can I boot an application, for example "Hello World", out of flash memory on the SP605?


This example is only valid for the SP605 and uses minimal peripherals on the AXI standard:

Using Linear Flash (BPI):

  1. Ensure the MODE pins on the SP605 are set to M[1:0] = 00
  2. Build your Hardware in XPS
  3. In Base System Builder, select the SP605 for your device.
  4. Select DDR, Linear Flash, and UARTLITE for your peripherals
  5. Click Next until Finished
  6. Click Project -> Export Hardware Design to SDK
    • Ensure the "Include bitstrem and BMM file" checkbox is selected
  7. Once SDK launches, create two new Xilinx C Projects (Under File -> New)
    • Hello World
    • SREC Bootloader
  8. Ensure the linker scripts for each projectpoint tothe correct memory locations (right-click on the application -> Generate Linker Script):
    • SREC Bootloader = BRAM
    • Hello World = DDR
  9. Open the blconfig.h file in the SREC bootloader project.
    • Set the address to match the FLASH BASEADDR in the system.xml + 0x0120 0000 offset
    • For example if the FLASH starts at 0x7600 0000, you set the address to 0x7720 0000
  10. Build both applications with Ctrl-B
  11. Attempt to download the SREC Bootloader to the FPGA using Xilinx Tools -> Program FPGA and selecting that elf.
    • It should fail. This just runs DATA2MEM to get a download.bit with the SREC bootloader in it.
  12. Go to Xilinx Tools -> Program Flash
  13. Select your Hello World ELF file (Generally under the workspace_dir/hello_world_0/Debug/hello_world_0.elf)
  14. Check the box that says "Convert to Bootable SREC format"
  15. Set the flash offset to 0x01200000
  16. Program Flash
  17. Back in SDK, click on Xilinx Tools -> Launch Shell
  18. Type in:
    • promgen -p bin -c FF -o swapped.bin -data_file up 0 hello_world_0.elf.srec -w
    • you will need to point"hello_world_0.elf.srec" to wherever your srec is saved (generally under hw_platform_0/cache)
  19. Open iMPACT
  20. Click "Create PROM file" on the left side
  21. Select BPI Flash -> Configure Single FPGA -> [Green Arrow]
  22. Select Spartan-6 in Step 2
  23. Select 32M
  24. [Green Arrow]
  25. Select a save location you will remember
  26. File Format MCS
  27. Data Width x16
  28. Add Non-Configuration files YES
  29. Click OK
  30. Click OK on Start adding device file to Revision 0
  31. Find your download.bit under the hw_platform_0/ folder
  32. Do not add another Device File
  33. Add the swapped.bin file you made in step (18) as the non-configuration/data file
  34. Add it to address location 0x0090 0000
  35. Click Generate on the Left Side
  36. Initialize the Boundary Scan
  37. Right-Click on your device, and Add SPI/BPI flash
  38. Assign the MCS you created in (25)
  39. Right-click on the device's flash, and click Program.
  40. You should be done
AR# 43615
Date 01/27/2013
Status Active
Type General Article
  • EDK - 13.2
Page Bookmarked