Forum Discussion
Altera_Forum
Honored Contributor
14 years agoI have given up on using the uSD Card slot... I have managed to get the web server running from EPCS memory, the guide is as follows:-
1) update the simple web server as in the first post, source code and bsp, make sure it runs2) go to the bsp editor, software packages….. change the following:- ro_zipfs_base: to 0xa003800 (which is the base address of ecps memory) and make sure :- ro_zipfs_offset: is 0x100000 (offset to where we will program the flash pages) (reference attachment)
3) generate the bsp 4) the code (ro_zipfs.c) for extracting web pages from memory mapped parallel flash will not work with epcs serial flash, this has to be modified:-
reference attached zip file,altera_ro_zipfs.c.zip,which contains the original Altera file and a corrected version of DrinkFish file Replace the original for the corrected one, reference this post for additional details http://www.alteraforum.com/forum/showthread.php?p=132498#post132498 The following commands are run using the noisII command shell 5) Convert the webpages (ro_zipfs.zip) to an S record file with an offset of 0x100000, use the following command bin2flash --location=0x100000 --input=ro_zipfs.zip --output=ro_zipfs.flash 6) To program the web-server pages to the serial epcs memory use the following command nios2-flash-programmer --epcs --base=0xa003800 ro_zipfs.flash (note:- it will be programmed at the offset specified in 5, in this case in the middle of epcs memory and does not affect the fpga configuration section)Using cable "USB-Blaster [USB-0]", device 1, instance 0x00 Resetting and pausing target processor: OK Checksummed/read 26kB in 0.6s Erased 64kB in 0.6s (106.6kB/s) Programmed 39KB +25KB in 0.6s (106.6KB/s) Did not attempt to verify device contents Leaving target processor paused 6a) Additional Info - You can read the whole contents from the epcs memory by running the following command:- nios2-flash-programmer --epcs --base=0xa003800 --read=epcs_memory_contents.srec --read-bytes=0,0x200000Using cable "USB-Blaster [USB-0]", device 1, instance 0x00 Resetting and pausing target processor: OK Read 2048KB in 49.7s (41.2KB/s) Writing EPCS contents to current.srec Leaving target processor paused 6b) Additional Info - To visually see the contents of this file (i.e. in a binary format) can be done by using the s record import function in “hexworksshop” (remember to re name the file epcs_memory_contents.srec to epcs_memory_contents.srec .mot i.e. mot extension) [/INDENT]7) First Clean and Compile BSP, then Clean and Compile the application That’s it...