wiki:sysace/sreconfig

Reconfiguring on Flash Using Software

Peforming a soft-reconfiguration on flash requires a little extra work – specifically: the project MUST have the SysACE peripheral included, a modification to the system MSS file, and the addition of several software libraries included in the project’s C-code.
After building the system with the SysACE peripheral, the user must attach the following lines of code to the end of the system MSS file (this can also be automatically generated by adding the library and modifying the parameters for it in “Software”->”Software Platform Settings…”):

BEGIN LIBRARY
 PARAMETER LIBRARY_NAME = xilfatfs
 PARAMETER LIBRARY_VER = 1.00.a
# # add write capabilities
 PARAMETER CONFIG_WRITE = true
# # add make/change dir support needed for the libs to work correctly.
 PARAMETER CONFIG_DIR_SUPPORT = true
# don't not work with FAT12 systems. Use 16 and/or 32
 PARAMETER CONFIG_FAT12 = false
# max files alloted
 PARAMETER CONFIG_MAXFILES = 5
# buffer size
 PARAMETER CONFIG_BUFCACHE_SIZE = 10240
 PARAMETER PROC_INSTANCE = ppc405_0
END

Next, the following libraries must be included into the project:

  • xsysace_l.h (does not require the user to manually add the *.c & *.h files)
  • xsysace.h (does not require the user to manually add the *.c & *.h files)
  • sysace_stdio.h (does not require the user to manually add the *.c & *.h files)
  • warpsysace.h (requires the user to add the library files manually)
  • warplib.h (requires the user to add the library files manually)


Once these changes and libraries have been applied to the project, writing the code to perform the reconfiguration is simple:

  • Before calling the reconfigure function, WarpSysace_GetLock must be called.
    • The format for this is: WarpSysace_GetLock(base_addr)
    • base_addr is the name of the SysACE peripheral’s base-address found in xparameters.h (you may have to “generate libraries and BSPs” first)
    • xparameters.h is available under the Project’s “Applications” tab, under the active Project (in Bold) under the expanded “Processor: ppc405_0” listing
  • The reconfiguration function can be placed anywhere in the code as long as the lock function has been called first.
    • The format for this is: WarpSysace_reconfigure(base_addr, proj_addr)
    • base_addr is the name of the SysACE peripheral’s base-address found in xparameters.h (see above)
    • proj_addr is a type int between 0 and 7 which is the configuration-address for where the project sits on the flash card. Thus, it’s important to plan ahead of time where you want your projects to sit on the card for when you load them – otherwise this won’t work! See the section: Formatting and Loading Systems on to a Compact Flash
  • Once you have finished the coding, prepare the flash card using the first section of this document as a reference. The current project calling the reconfiguration may be downloaded to the board in any way (JTAG, CF, etc), so long as the project to be switched to is sitting on the correct configuration address of a properly formatted flashcard (and is inserted on WARP).


PREV: Reconfiguring on Flash Using Hardware
| HOME | NEXT: Implementing a FAT File System
Last modified 14 years ago Last modified on Jul 19, 2006, 10:19:12 PM