cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
moharram2009
Contributor
Contributor
4,056 Views
Registered: ‎03-16-2009

xapp983 & flash problems

Jump to solution
since the project is small, we can generate one bit file and program it directly to the FPGA and finally we can generate mcs file and program the FPGA to avoid programs to be volatile. when the projects are big, we have one bit file (representing the hardware) and one elf file (representing the software). we can generate mcs from bit file & program the FPGA, but for debugging purpose we can download elf file to the board with "dow command" in XMD. my question is "how can we make programs non-volatile".
according xapp983 we can seperate elf file into read-only & volatile sections. i test it in spartan3e starter board, the read-only section programmed into flash & volatile section (new elf file) programmed with XMD. but i want to eliminate XMD programming. in other words, i want to start system by powering up the board, without any new programming like XMD or dow command.
Message Edited by moharram2009 on 08-24-2009 05:24 PM
0 Kudos
1 Solution

Accepted Solutions
moharram2009
Contributor
Contributor
4,631 Views
Registered: ‎03-16-2009

I solved my problem.

 

I set my program to be loaded from DDR SDRAM. I test it with XMD & it works good. Then in Program Flash Memory window I set the generated elf file to be programmed, also I turned on the auto convert file to bootloadable. By this check a srec file will be generated containing the binary information of FLASH (like bin file in XAPP983).


I don't change the Flash Memory Properties.

 

I set DDR SDRAM for Scratch memory Instance. Program will copy from FLASH to DDR.

 

Then I turned on the "create flash bootloader application". This small application (approximately 4KB) will copy program from FLASH to Scatch memory (DDR SDRAM).

 

After a few seconds XPS will program the FLASH.

 

i enable the Mark to initialize BRAM for bootloader application. After synthesizing the generated bit file can be converted to mcs & be programmed to flash of FPGA (like xcf0s4)

 

Now I restart the board. Bootloader will execute & load the application from Flash, copy it to DDR SDRAM. Then the main project will start.

Here 4KB bootloader application will boot my 600KB application. Of course there is no limit for the size of the main application and it can be as large as Flash or DDR SDRAM size.

Note:

  1. the test board is Spartan3e Starter Board.
  2. We can read FLASH contents with XIo_In32. The read data is like the generated srec file.

View solution in original post

0 Kudos
2 Replies
moharram2009
Contributor
Contributor
4,632 Views
Registered: ‎03-16-2009

I solved my problem.

 

I set my program to be loaded from DDR SDRAM. I test it with XMD & it works good. Then in Program Flash Memory window I set the generated elf file to be programmed, also I turned on the auto convert file to bootloadable. By this check a srec file will be generated containing the binary information of FLASH (like bin file in XAPP983).


I don't change the Flash Memory Properties.

 

I set DDR SDRAM for Scratch memory Instance. Program will copy from FLASH to DDR.

 

Then I turned on the "create flash bootloader application". This small application (approximately 4KB) will copy program from FLASH to Scatch memory (DDR SDRAM).

 

After a few seconds XPS will program the FLASH.

 

i enable the Mark to initialize BRAM for bootloader application. After synthesizing the generated bit file can be converted to mcs & be programmed to flash of FPGA (like xcf0s4)

 

Now I restart the board. Bootloader will execute & load the application from Flash, copy it to DDR SDRAM. Then the main project will start.

Here 4KB bootloader application will boot my 600KB application. Of course there is no limit for the size of the main application and it can be as large as Flash or DDR SDRAM size.

Note:

  1. the test board is Spartan3e Starter Board.
  2. We can read FLASH contents with XIo_In32. The read data is like the generated srec file.

View solution in original post

0 Kudos
ahs23
Contributor
Contributor
3,849 Views
Registered: ‎05-17-2009
i followed the procedure above.it did create a bootloader application but i did not program the flash and gave the following error.


Starting GDB server for "mb" target (id = 0) at TCP port no 1234
done.
* Opening image file to be programmed...done.
* Setting up Flashwriter sources for compilation...
Error: Invalid option -h
child process exited abnormally
Error Executing xmd Script : E:/Xilinx10.1/EDK/data/xmd/flashwriter.tcl
Error :: Unable to find address for symbol "rcvptr" in file "./etc/flashwriter/flashwriter.elf"
Done!
this is only a portion of the messages displayed in the console window. i have just shown the end point where the errors occured
0 Kudos