element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Avnet Boards Forums
  • Products
  • Dev Tools
  • Avnet Boards Community
  • Avnet Boards Forums
  • More
  • Cancel
Avnet Boards Forums
ZedBoard Hardware Design Writing a File to Flash memory and reading it from PS/PL
  • Forum
  • Documents
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Avnet Boards Forums to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 9 replies
  • Subscribers 326 subscribers
  • Views 5456 views
  • Users 0 members are here
Related

Writing a File to Flash memory and reading it from PS/PL

Former Member
Former Member over 10 years ago

Is it possible to write a file to Flash memory in Zedboard without Linux?
Suppose the file has some hex values, can we directly write it to flash memory using any software? Can it be done with vivado 2014.1?
After writing the data to Flash memory is it possible to read this data from PL through vhdl file?
Or should it be read from PS first(using SPI code in C)?

  • Sign in to reply
  • Cancel
  • bhfletcher
    0 bhfletcher over 10 years ago

    I would start with some of the bare metal examples that Xilinx provides. Here's where to find them in 2014:

    C:\Xilinx\SDK\2014.4\data\embeddedsw\XilinxProcessorIPLib\drivers\qspips_v3_1\examples

     

    And 2015.2:

    C:\Xilinx\SDK\2015.2\data\embeddedsw\XilinxProcessorIPLib\drivers\qspips_v3_2\examples

     

    I do not believe it is possible to readback the QSPI attached to the PS MIO through the PL. If really wanted to do that (and you don't care to have a QSPI that isn't a boot source), then you could add a QSPI Pmod to one of the PL Pmods. Then you can use IP in the PL to talk to the QSPI.

     

    Bryan

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • zedhed
    0 zedhed over 10 years ago

    Hi ash3409,

    There is also an example of how to do this as part of Lab 11 of "Developing Zynqu00AE-7000 All Programmable SoC Software" on the training page.

    http://microzed.org/support/trainings-and-videos

    That lab has an example application that writes a MAC address (byte data) into Flash memory and then reads it back.

    Regards,

    -Kevin

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 10 years ago

    Bryan,

    Thanks for your reply. I went through those examples. It helped understanding QSPI better.
    Regarding Pmod, I want to use the available flash memory instead of an external peripheral. So trying to use the QSPI Nor Flash.

    Kevin,
    Thanks for the reply. I happened to go through the tutorial and had tried it before. But the problem is the application they have developed for this is too specific. It reads just 6 bytes from the teraterm and writes it to Flash. That too it needs it with a prefix mac. My file will be very big and I couldnt figure out how to send file from tera term application. So I think there will be lot of changes needed in the c code they have.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 10 years ago

    Also, another option I was thinking was Xillybus. Can I do the writing/reading operation to flash memory using Xillybus?
    Please let me know.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • zedhed
    0 zedhed over 10 years ago

    Hi ash3409,

    You are correct, the lab application is a simplistic adaptation of the example code that Bryan pointed out.  Now I have a better understanding that you have some file with HEX data that you simply want to transfer over to flash without having to use Linux.

    If you are just trying to program a file into flash memory, have you looked into how U-Boot accomplishes this?

    Before Xilinx SDK added support for programming QSPI Flash with an MCS file, we used U-Boot to program BOOT.BIN from an SD card into the QSPI Flash on ZedBoard using the following commands:

    1) mmcinfo

    2) sf probe 0 0 0

    3) sf erase 0 0x800000

    4) fatload mmc 0 0x8000 BOOT.BIN

    5) sf write 0x8000 0 0x800000

    Basically, these steps copy BOOT.BIN from the SD card into memory and then write that data found in memory over to the QSPI Flash.

    This is also documented here:

    http://www.wiki.xilinx.com/U-boot

    Regards,

    -Kevin

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 10 years ago

    Thanks Kevin.
    I will go through this.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 9 years ago

    I see this mention in the Zynq Evaluation and Development Hardware User's guide:

    Spansion provides Spansion Flash File System (FFS) for use after booting the Zynq EPP.

    Where can I find the File System? I want to use it to write and read QSPI flash in Linux.

    Thanks,
    Mike

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 9 years ago in reply to Former Member

    Hello Michael,

     

    Take a look here: http://www.spansion.com/Support/Pages/DriversSoftware.aspx

     

    -Gary

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • ahmad.zaklouta
    0 ahmad.zaklouta over 3 years ago in reply to zedhed

    Is the labs file still available somewhere? I have been trying to find them

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube