If your required files together are smaller than the Flash disk (see manual, currently 640 kBytes for V07.AA), you can copy everything to the Flash disk and then use roloFlash without an SD card. This gives you the following advantages:
We recommend the following procedure:
First test your procedure as usual using an SD card. You will have a
RUN_V07.BIN on the SD card to execute, and probably also
one or more files to flash. For simplicity, we will refer to
FLASH.HEX from here on.
Create a folder named TO_RF on the SD card and copy all
necessary data from the previous step into this folder.
Also, create a file RUN_V07.BAS in the root directory of
the SD card, which is supposed to copy the data from the
TO_RF folder to the Flash disk. You can find the
copyFile procedure for this purpose at the end of this
document in the appendix. Copy this procedure into your roloBasic file,
e.g. like so:
! -- copy "FLASH.HEX" from SD-card (folder TO_RF) to FlashDisk (root folder):
copyFile SDCARD, "TO_RF/FLASH.HEX", FLASHDISK, "FLASH.HEX"
! -- copy "RUN_V07.BIN" from SD-card (folder TO_RF) to FlashDisk (root folder):
copyFile SDCARD, "TO_RF/RUN_V07.BIN", FLASHDISK, "RUN_V07.BIN"Compile this into the RUN_V07.BIN file on the SD card’s
root folder.
Insert the SD card into the roloFlash and execute the process once using any target.
Remove the SD card and now test the procedure without the SD card.
RUN_V07.BIN on the Flash DiskA RUN_V07.BIN located on the Flash disk is executed in
preference to a RUN_V07.BIN on the SD card.
RUN_V07.BIN from the SD card again?There are two options:
The RUN_V07.BIN on the Flash disk checks whether an
SD card with a RUN_V07.BIN is present. If so, execution is
started from there. This can be achieved like this:
if mediaExists(SDCARD)
  if fileExists(SDCARD, "RUN_V07.BIN")
    chain(SDCARD, "RUN_V07.BIN")
  endif
endifYou reflash the roloFlash firmware. This deletes the entire content of the Flash disk and Flash variables.
procedure copyFile fsSrc, filenameSrc, fsDst, filenameDst
  dataSize = fs_fileSize(fsSrc, filenameSrc)
  fs_create fsDst, filenameDst, dataSize
  src = fs_open(fsSrc, filenameSrc)
  dst = fs_open(fsDst, filenameDst)
  blockSize = 512
  filePos = 0
  do while dataSize > 0
    mySize = blockSize
    if mySize > dataSize
      mySize = dataSize
    endif
    a = fs_read(src, filePos, mySize)
    fs_write dst, filePos, a
    filePos = filePos + mySize
    dataSize = dataSize - mySize
  loop
  fs_close dst
  fs_close src
end