Lucky Resistor
Menu
  • Home
  • Learn
    • Learn C++
    • Product Photography for Electronics
      • Required Equipment and Software
    • Soldering for Show
  • Projects
  • Libraries
  • Applications
  • Shop
  • About
    • About Me
    • Contact
    • Stay Informed
  •  
Menu

Micro Disk

Micro Disk is an application to generate a micro disk images for SD cards. This is a special minimal file system for embedded projects with very low available resources. Using this file system you can provide large amounts of data from a attached SD card. The file system is strictly read-only, it is not meant to modify the SD card.

The SD card library used in the Cat Protector project uses this format to save a number of sound files on the SD card.

Update 2017-03-06: Released version 1.1.0 of the software with an option to generate images for older non-HC SD cards.

File System Features

  • File directory with ASCII file names.
  • Single file list which can store any number of files.
  • For each file, a name, the start block and the size in bytes is stored.
  • All files are stored in sequential blocks which makes reading simple and fast.
  • All files are aligned to the 512 byte blocks for a SD card.

Screenshots

Here screenshots of the Mac and Windows version of the tool.

MicroDisk Screenshot Mac
MicroDisk Screenshot Windows

Download

  • LuckyResistor Micro Disk 1.1.0 Mac
    SHA1 = 0033aec2e11d74581bd5623b65a6d4ce6529ad11
  • LuckyResistor Micro Disk 1.1.0 Windows
    SHA1 = ced421844e4fb1415f3fb8942e4418589fe78f15

Usage

The usage of the tools is very simple:

  1. Start the Micro Disk tool.
  2. Add files using the “Add File” button, or the “Add File…” menu entry. You can select and add multiple files.
  3. Change the identifier of the files how they should be named in the image.
  4. Click on the “Generate…” button, or select “Generate…” in the menu to create a disk image from the files in the list.
  5. Select a file name and directory and click on “Save”.

Now you have an image file. You can copy the image file on a SD card, similar like a Raspberry Pi operating system, as explained in this great documentation:

  • Installing Operating System Images

Old non-HC SD Cards

If you generate an image for an old non-HC SD card, please check the option below the file list to make this images compatible with some software.

Micro Disk Format

The micro disk format is an open format which you can use and adapt in your own projects.

Micro Disk Format

Header

Each disk image starts with the four “magic” bytes 0x48, 0x43, 0x44, 0x49 which are the ASCII text “HCDI“.

File Directory

The file directory can contain any number of file entries. Each entry starts with a four byte, little endian integer which points to the start block of the data of the file. Next is a four byte, little endian integer with the file size in bytes. After this one byte with the length of the file name follows. The length must not be zero. After the byte with the length, the bytes for the file name follow. There are no restrictions about the file name, but it should be as short as possible and ideally encoded as ASCII text.

This structure is repeated for each file entry. At the end of the file directory, there are four zero bytes. Because this would be the start block of the next entry, you just can check for a zero start block which marks the end.

The directory can span any number of blocks. After the end of the directory padding bytes follow until the end of the current block.

File DATA

File data always starts at a new block. The data is written sequentially over the following blocks. At the end, any remaining bytes of the block are filled with zero bytes. This is also true for the last block of the image.

This is repeated for every file on the disk.

Source

You can find the sources of the application on GitHub:

  • Micro Disk on GitHub

License

The sources are licensed under the GNU General Public License version 3.

1 thought on “Micro Disk”

  1. Pingback: #Define Electronics | Electronic and Mechanical Design | Robotics | Opensource | Mechatronic | Youtube | Podcast | KiCad | Ronald Sousa | Hash Define Electronics Ltd | Leeds

Leave a Reply Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Stay Updated

Join me on Mastodon!

Top Posts & Pages

  • Storage Boxes System for 3D Print
  • Use Enum with More Class!
  • Simple Box with Lid for 3D-Print
  • Fan Controller
  • Shop
  • Real Time Counter and Integer Overflow
  • How and Why to use Namespaces
  • Build a 3D Printer Enclosure
  • The Hinges and its Secrets for Perfect PETG Print
  • It's Time to Use #pragma once

Latest Posts

  • The Importance of Wall Profiles in 3D Printing2023-02-12
  • The Hinges and its Secrets for Perfect PETG Print2023-02-07
  • Better Bridging with Slicer Guides2023-02-04
  • Stronger 3D Printed Parts with Vertical Perimeter Linking2023-02-02
  • Logic Gates Puzzle 1012023-02-02
  • Candlelight Emulation – Complexity with Layering2023-02-01
  • Three Ways to Integrate LED Light Into the Modular Lantern2023-01-29
  • The 3D Printed Modular Lantern2023-01-17

Categories

  • 3D Printing
  • Build
  • Common
  • Fail
  • Fun
  • Learn
  • Projects
  • Puzzle
  • Recommendations
  • Request for Comments
  • Review
  • Software
Copyright (c)2022 by Lucky Resistor. All rights reserved.
 

Loading Comments...