GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > FILE / V3-8-1

Constituent: file_tools     Tag: rad750


Interface   Data Structures   File List   Data Fields   Globals  

tffs_boot_partition.c File Reference

Utility to create bank header and size boot partition for EEPROM initial formatting. More...

#include "vxWorks.h"
#include "stdio.h"
#include "stdlib.h"
#include "tffs/tffsDrv.h"
#include "tffs/fatlite.h"
#include "Memmap.h"
#include "FILE/file_tools.h"
#include "ZLIB/zlib.h"

Include dependency graph for tffs_boot_partition.c:


Defines

#define TFFS_NVRAM_SIZE   256

Functions

int tffs_boot_partition (int drv, unsigned int rtosSize, unsigned int sbcSize0, unsigned int sbcSize1)

Detailed Description

Utility to create bank header and size boot partition for EEPROM initial formatting.

Author:
D.L. Wood

Define Documentation

#define TFFS_NVRAM_SIZE   256
 

The size in bytes to reserve for NVRAM emulation area.


Function Documentation

int tffs_boot_partition int  drv,
unsigned int  rtosSize,
unsigned int  sbcSize0,
unsigned int  sbcSize1
 

First, this function erases (set to all 1's) the EEPROM erase units that will be reserved for the boot partition. This is caculated using the total of the size parameters. The total size must end up aligning to a 64KB boundary. Next, a bank header is written to the head of the boot partition. The bank header size and offset members are determined by the size parameters passed to the function. A checksum is calculated and stored as the first word of the bank header. In addition, 256 bytes of EEPROM in the boot partition is reserved for an NVRAM emulation area.

Parameters:
drv The TFFS drive number (0 or 1).
rtosSize The size in bytes to reserve for the RTOS file in the boot partition.
sbcSize0 The size in bytes to reserve for the SBC file 0 in the boot partition.
sbcSize1 The size in bytes to reserve for the RTOS file in the boot partition.
Return values:
0 Success.
-1 Failure.


Generated on Tue Oct 25 22:44:54 2005 by  doxygen 1.4.4