User`s manual

Dynamic C Users Manual digi.com 155
tions will be formatted. Be forewarned that on removable media, using multiple partitions will typically
make the device unusable with PC readers.
The sample program FAT_Write_MBR.c is distributed with FAT version 2.13. It is also compatible with
FAT versions 2.01, 2.05 and 2.10. If you have one of these earlier versions of the FAT and would like a
copy of FAT_Write_MBR.c, please contact Technical Support at www.digi.com/support/.
There is a way to create multiple partitions without using the utility FAT_Write_MBR.c; this auxiliary
method is explained in Section 10.2.5.3.5.
10.2.4.1.3 Preserving Existing Partitions
If the flash device already has a valid partition that you want to keep, you must know where it is so you
can fit the FAT partition onto the device. This requires searching the partition table for both available parti-
tions and available space. An available partition has the partsecsize field of its mbr_part entry
equal to zero.
Look in lib/.../RCM3300/RemoteApplicationUpdate/downloadmanager.lib for the
function dlm_initserialflash() for an example of searching through the partition table for avail-
able partitions and space. See the next section for more information on the download manager (DLM) and
how to set up coexisting partitions.
10.2.4.1.4 FAT and DLM Partitions
The RabbitCore RCM3300 comes with a download manager utility that creates a partition on a serial flash
device, which is then used by the utility to remotely update an application. You can set up a device to have
both a DLM partition and a FAT partition.
Run the program Samples/RCM3300/RemoteApplicationUpdate/DLM_FAT_FORMAT.C.
This program must be run on an unformatted serial flash, i.e., a flash with no MBR. To remove an existing
MBR, first run the program Samples/RCM3300/SerialFlash/SFLASH_INSPECT.C to clear the
first three pages.
The program DLM_FAT_FORMAT.C will set aside space for the DLM partition and use the rest of the
device to create a FAT partition. Then, when you run the DLM software, it will be able to find space for its
partition and will coexist with the FAT partition. This shows the advantage to partitions: Partitions set hard
boundaries on the allocation of space on a device, thus neither FAT nor the DLM software can take space
from the other.