jielie

SDFILE / SYDFS

This is a simple “filesystem” that can contain a number of named files, in a flat structure.

Format

Flash header

struct sydfs_hdr {
  uint16_t  hdr_crc;    /* Header CRC */
  uint16_t  list_crc;   /* File list CRC */
  uint32_t  info1;
  uint32_t  info2;
  uint32_t  count;      /* File count */
  uint32_t  version1;
  uint32_t  version2;
  uint8_t   chiptype[8];
};

File header

struct sydfs_ent {
  uint8_t   type;       /* File type */
  uint8_t   resvd;      /* (reserved) */
  uint16_t  data_crc;   /* Data CRC */
  uint32_t  offset;     /* Data offset */
  uint32_t  size;       /* File size */
  uint32_t  index;      /* Index */
  char      name[16];   /* File name */
};