醬是創客的ESP32教學主題第18篇,以NodeMCU-32S(使用Arduino語言)來實作教學,本篇教學Arduino透過SPI介面讀取/刪除/寫入/新增 Micro SD卡檔案,Arduino最多只能支援到32G大小、限定FAT32檔案格式
以下是我們今天的目標
- 使用ESP32的SPI介面
- 計算SD卡大小
- 列出檔案列表
- 新增/移除資料夾
- 將 Hello World! 寫入檔案並讀取
- 讀取/刪除/重新命名檔案
- 測試檔案是否存在
- 計算該槽總空間/使用空間
設備:
安信可原廠/副廠NodeMCU-32S #露天拍賣 #蝦皮購物
醬是創客Micro SD卡模組 #露天拍賣 #蝦皮購物
Micro SD卡 32GB(FAT32檔案格式)
接線方式:
NodeMCU-32S(GPIO5)–SPI訊號–醬是創客Micro SD卡模組(CS)
NodeMCU-32S(GPIO18)–SPI訊號–醬是創客Micro SD卡模組(SCK)
NodeMCU-32S(GPIO19)–SPI訊號–醬是創客Micro SD卡模組(MISO)
NodeMCU-32S(GPIO23)–SPI訊號–醬是創客Micro SD卡模組(MOSI)
DC 5V(+)–醬是創客Micro SD卡模組(VCC)
DC 0V(-)–醬是創客Micro SD卡模組(GND)
Ai-Thinker安信可NodeMCU-32S的腳位圍(資料來源:安信可)
Micro SD卡模組專業知識與教學
Arduino現階段因記憶體設計方式,最大只能用到32G的大小,僅建議使用FAT32檔案格式,SPI的方式是讀取寫入Micro SD最好的方式
Arduino 範例程式碼如下
//醬是創客 開發實作的好夥伴 #include "FS.h" #include "SD.h" #include "SPI.h" #include "WiFi.h" void setup(){ Serial.begin(115200); //初始化SD卡 if(!SD.begin()){ Serial.println("Card Mount Failed"); return; } uint8_t cardType = SD.cardType(); if(cardType == CARD_NONE){ Serial.println("No SD card attached"); return; } //找出SD卡類型 Serial.print("SD Card Type: "); if(cardType == CARD_MMC){ Serial.println("MMC"); } else if(cardType == CARD_SD){ Serial.println("SDSC"); } else if(cardType == CARD_SDHC){ Serial.println("SDHC"); } else { Serial.println("UNKNOWN"); } //計算SD卡大小 uint64_t cardSize = SD.cardSize() / (1024 * 1024); Serial.printf("SD Card Size: %lluMB\n", cardSize); //列出第1層內的檔案列表 listDir(SD, "/", 0); //建立一個資料夾mydir createDir(SD, "/mydir"); //列出第1層內的檔案列表 listDir(SD, "/", 0); //移除資料夾mydir removeDir(SD, "/mydir"); //列出第3層內的檔案列表 listDir(SD, "/", 2); //把 Hello 寫入hello.txt writeFile(SD, "/hello.txt", "Hello "); //把 World! 寫入hello.txt appendFile(SD, "/hello.txt", "World!\n"); //讀取hello.txt readFile(SD, "/hello.txt"); //刪除foo.txt deleteFile(SD, "/foo.txt"); //重新命名hello.txt為foo.txt renameFile(SD, "/hello.txt", "/foo.txt"); //讀取foo.txt readFile(SD, "/foo.txt"); //測試test.txt是否存在 testFileIO(SD, "/test.txt"); //印出該槽總空間大小 Serial.printf("Total space: %lluMB\n", SD.totalBytes() / (1024 * 1024)); //印出該槽已使用空間大小 Serial.printf("Used space: %lluMB\n", SD.usedBytes() / (1024 * 1024)); } void loop(){ } void listDir(fs::FS &fs, const char * dirname, uint8_t levels){ Serial.printf("Listing directory: %s\n", dirname); File root = fs.open(dirname); if(!root){ Serial.println("Failed to open directory"); return; } if(!root.isDirectory()){ Serial.println("Not a directory"); return; } File file = root.openNextFile(); while(file){ if(file.isDirectory()){ Serial.print(" DIR : "); Serial.println(file.name()); if(levels){ listDir(fs, file.name(), levels -1); } } else { Serial.print(" FILE: "); Serial.print(file.name()); Serial.print(" SIZE: "); Serial.println(file.size()); } file = root.openNextFile(); } } void createDir(fs::FS &fs, const char * path){ Serial.printf("Creating Dir: %s\n", path); if(fs.mkdir(path)){ Serial.println("Dir created"); } else { Serial.println("mkdir failed"); } } void removeDir(fs::FS &fs, const char * path){ Serial.printf("Removing Dir: %s\n", path); if(fs.rmdir(path)){ Serial.println("Dir removed"); } else { Serial.println("rmdir failed"); } } void readFile(fs::FS &fs, const char * path){ Serial.printf("Reading file: %s\n", path); File file = fs.open(path); if(!file){ Serial.println("Failed to open file for reading"); return; } Serial.print("Read from file: "); while(file.available()){ Serial.write(file.read()); } file.close(); } void writeFile(fs::FS &fs, const char * path, const char * message){ Serial.printf("Writing file: %s\n", path); File file = fs.open(path, FILE_WRITE); if(!file){ Serial.println("Failed to open file for writing"); return; } if(file.print(message)){ Serial.println("File written"); } else { Serial.println("Write failed"); } file.close(); } void appendFile(fs::FS &fs, const char * path, const char * message){ Serial.printf("Appending to file: %s\n", path); File file = fs.open(path, FILE_APPEND); if(!file){ Serial.println("Failed to open file for appending"); return; } if(file.print(message)){ Serial.println("Message appended"); } else { Serial.println("Append failed"); } file.close(); } void renameFile(fs::FS &fs, const char * path1, const char * path2){ Serial.printf("Renaming file %s to %s\n", path1, path2); if (fs.rename(path1, path2)) { Serial.println("File renamed"); } else { Serial.println("Rename failed"); } } void deleteFile(fs::FS &fs, const char * path){ Serial.printf("Deleting file: %s\n", path); if(fs.remove(path)){ Serial.println("File deleted"); } else { Serial.println("Delete failed"); } } void testFileIO(fs::FS &fs, const char * path){ File file = fs.open(path); static uint8_t buf[512]; size_t len = 0; uint32_t start = millis(); uint32_t end = start; if(file){ len = file.size(); size_t flen = len; start = millis(); while(len){ size_t toRead = len; if(toRead > 512){ toRead = 512; } file.read(buf, toRead); len -= toRead; } end = millis() - start; Serial.printf("%u bytes read for %u ms\n", flen, end); file.close(); } else { Serial.println("Failed to open file for reading"); } file = fs.open(path, FILE_WRITE); if(!file){ Serial.println("Failed to open file for writing"); return; } size_t i; start = millis(); for(i=0; i<2048; i++){ file.write(buf, 512); } end = millis() - start; Serial.printf("%u bytes written for %u ms\n", 2048 * 512, end); file.close(); }
Arduino 序列埠監控視窗 輸出如下,我們拿已安裝Raspberry Pi(樹莓派)Micro SD卡接到Micro SD模組,且有一個磁碟槽用FAT32檔案格式,所以SD card大小有29007MB,該槽空間只有252MB
load:0x40078000,len:8896 load:0x40080400,len:5816 entry 0x400806ac SD Card Type: SDHC SD Card Size: 29007MB Listing directory: / DIR : /overlays FILE: /bcm2708-rpi-b-plus.dtb SIZE: 24246 FILE: /COPYING.linux SIZE: 18693 FILE: /LICENCE.broadcom SIZE: 1594 FILE: /bcm2708-rpi-zero-w.dtb SIZE: 24424 FILE: /bcm2708-rpi-b.dtb SIZE: 23983 FILE: /bcm2708-rpi-cm.dtb SIZE: 23764 FILE: /issue.txt SIZE: 145 FILE: /bcm2708-rpi-zero.dtb SIZE: 23688 FILE: /bcm2709-rpi-2-b.dtb SIZE: 25310 FILE: /bcm2710-rpi-2-b.dtb SIZE: 25439 FILE: /bcm2710-rpi-3-b-plus.dtb SIZE: 27099 FILE: /bcm2710-rpi-3-b.dtb SIZE: 26480 FILE: /bcm2710-rpi-cm3.dtb SIZE: 25294 FILE: /bcm2711-rpi-4-b.dtb SIZE: 40988 FILE: /bootcode.bin SIZE: 52304 FILE: /cmdline.txt SIZE: 121 FILE: /config.txt SIZE: 1846 FILE: /fixup.dat SIZE: 6745 FILE: /fixup4.dat SIZE: 6200 FILE: /fixup4cd.dat SIZE: 3112 FILE: /fixup4db.dat SIZE: 9192 FILE: /fixup4x.dat SIZE: 9192 FILE: /fixup_cd.dat SIZE: 2656 FILE: /fixup_db.dat SIZE: 9817 FILE: /fixup_x.dat SIZE: 9819 FILE: /kernel.img SIZE: 5142912 FILE: /kernel7.img SIZE: 5424376 FILE: /kernel7l.img SIZE: 5757200 FILE: /kernel8.img SIZE: 13521408 FILE: /start.elf SIZE: 2883204 FILE: /start4.elf SIZE: 2784800 FILE: /start4cd.elf SIZE: 784316 FILE: /start4db.elf SIZE: 4593508 FILE: /start4x.elf SIZE: 3546468 FILE: /start_cd.elf SIZE: 690884 FILE: /start_db.elf SIZE: 4859912 FILE: /start_x.elf SIZE: 3797384 DIR : /System Volume Information Creating Dir: /mydir Dir created Listing directory: / DIR : /overlays FILE: /bcm2708-rpi-b-plus.dtb SIZE: 24246 FILE: /COPYING.linux SIZE: 18693 FILE: /LICENCE.broadcom SIZE: 1594 FILE: /bcm2708-rpi-zero-w.dtb SIZE: 24424 FILE: /bcm2708-rpi-b.dtb SIZE: 23983 FILE: /bcm2708-rpi-cm.dtb SIZE: 23764 FILE: /issue.txt SIZE: 145 DIR : /mydir FILE: /bcm2708-rpi-zero.dtb SIZE: 23688 FILE: /bcm2709-rpi-2-b.dtb SIZE: 25310 FILE: /bcm2710-rpi-2-b.dtb SIZE: 25439 FILE: /bcm2710-rpi-3-b-plus.dtb SIZE: 27099 FILE: /bcm2710-rpi-3-b.dtb SIZE: 26480 FILE: /bcm2710-rpi-cm3.dtb SIZE: 25294 FILE: /bcm2711-rpi-4-b.dtb SIZE: 40988 FILE: /bootcode.bin SIZE: 52304 FILE: /cmdline.txt SIZE: 121 FILE: /config.txt SIZE: 1846 FILE: /fixup.dat SIZE: 6745 FILE: /fixup4.dat SIZE: 6200 FILE: /fixup4cd.dat SIZE: 3112 FILE: /fixup4db.dat SIZE: 9192 FILE: /fixup4x.dat SIZE: 9192 FILE: /fixup_cd.dat SIZE: 2656 FILE: /fixup_db.dat SIZE: 9817 FILE: /fixup_x.dat SIZE: 9819 FILE: /kernel.img SIZE: 5142912 FILE: /kernel7.img SIZE: 5424376 FILE: /kernel7l.img SIZE: 5757200 FILE: /kernel8.img SIZE: 13521408 FILE: /start.elf SIZE: 2883204 FILE: /start4.elf SIZE: 2784800 FILE: /start4cd.elf SIZE: 784316 FILE: /start4db.elf SIZE: 4593508 FILE: /start4x.elf SIZE: 3546468 FILE: /start_cd.elf SIZE: 690884 FILE: /start_db.elf SIZE: 4859912 FILE: /start_x.elf SIZE: 3797384 DIR : /System Volume Information Removing Dir: /mydir Dir removed Listing directory: / DIR : /overlays Listing directory: /overlays FILE: /overlays/adau7002-simple.dtbo SIZE: 1587 FILE: /overlays/README SIZE: 113431 FILE: /overlays/act-led.dtbo SIZE: 569 FILE: /overlays/adau1977-adc.dtbo SIZE: 1027 FILE: /overlays/akkordion-iqdacplus.dtbo SIZE: 1387 FILE: /overlays/ads1015.dtbo SIZE: 2425 FILE: /overlays/ads1115.dtbo SIZE: 2425 FILE: /overlays/ads7846.dtbo SIZE: 2402 FILE: /overlays/adv7282m.dtbo SIZE: 1952 FILE: /overlays/adv728x-m.dtbo SIZE: 2436 FILE: /overlays/audioinjector-addons.dtbo SIZE: 1866 FILE: /overlays/anyspi.dtbo SIZE: 3895 FILE: /overlays/allo-boss-dac-pcm512x-audio.dtbo SIZE: 1473 FILE: /overlays/allo-digione.dtbo SIZE: 1208 FILE: /overlays/allo-katana-dac-audio.dtbo SIZE: 1659 FILE: /overlays/allo-piano-dac-pcm512x-audio.dtbo SIZE: 1011 FILE: /overlays/allo-piano-dac-plus-pcm512x-audio.dtbo SIZE: 1585 FILE: /overlays/apds9960.dtbo SIZE: 1338 FILE: /overlays/applepi-dac.dtbo SIZE: 1454 FILE: /overlays/at86rf233.dtbo SIZE: 1632 FILE: /overlays/audioinjector-ultra.dtbo SIZE: 1890 FILE: /overlays/audioinjector-wm8731-audio.dtbo SIZE: 787 FILE: /overlays/audiosense-pi.dtbo SIZE: 2187 FILE: /overlays/audremap.dtbo SIZE: 833 FILE: /overlays/balena-fin.dtbo SIZE: 2927 FILE: /overlays/bmp085_i2c-sensor.dtbo SIZE: 449 FILE: /overlays/dht11.dtbo SIZE: 1019 FILE: /overlays/dionaudio-loco-v2.dtbo SIZE: 1027 FILE: /overlays/dionaudio-loco.dtbo SIZE: 663 FILE: /overlays/disable-bt.dtbo SIZE: 954 FILE: /overlays/disable-wifi.dtbo SIZE: 387 FILE: /overlays/dpi18.dtbo SIZE: 951 FILE: /overlays/dpi24.dtbo SIZE: 975 FILE: /overlays/draws.dtbo SIZE: 5869 FILE: /overlays/dwc-otg.dtbo SIZE: 293 FILE: /overlays/dwc2.dtbo SIZE: 801 FILE: /overlays/enc28j60-spi2.dtbo SIZE: 1279 FILE: /overlays/enc28j60.dtbo SIZE: 1403 FILE: /overlays/exc3000.dtbo SIZE: 1562 FILE: /overlays/fe-pi-audio.dtbo SIZE: 1932 FILE: /overlays/goodix.dtbo SIZE: 1437 FILE: /overlays/googlevoicehat-soundcard.dtbo SIZE: 1259 FILE: /overlays/gpio-fan.dtbo SIZE: 1259 FILE: /overlays/gpio-ir-tx.dtbo SIZE: 1096 FILE: /overlays/gpio-ir.dtbo SIZE: 1212 FILE: /overlays/gpio-key.dtbo SIZE: 1373 FILE: /overlays/gpio-no-bank0-irq.dtbo SIZE: 274 FILE: /overlays/gpio-no-irq.dtbo SIZE: 258 FILE: /overlays/gpio-poweroff.dtbo SIZE: 994 FILE: /overlays/gpio-shutdown.dtbo SIZE: 1345 FILE: /overlays/hd44780-lcd.dtbo SIZE: 1662 FILE: /overlays/hifiberry-amp.dtbo SIZE: 779 FILE: /overlays/hifiberry-dac.dtbo SIZE: 655 FILE: /overlays/hifiberry-dacplus.dtbo SIZE: 1762 FILE: /overlays/hifiberry-dacplusadc.dtbo SIZE: 2008 FILE: /overlays/hifiberry-dacplusadcpro.dtbo SIZE: 1925 FILE: /overlays/hifiberry-dacplusdsp.dtbo SIZE: 699 FILE: /overlays/hifiberry-dacplushd.dtbo SIZE: 2011 FILE: /overlays/hifiberry-digi-pro.dtbo SIZE: 1125 FILE: /overlays/hifiberry-digi.dtbo SIZE: 959 FILE: /overlays/hy28a.dtbo SIZE: 2444 FILE: /overlays/hy28b-2017.dtbo SIZE: 2893 FILE: /overlays/hy28b.dtbo SIZE: 2915 FILE: /overlays/i-sabre-q2m.dtbo SIZE: 893 FILE: /overlays/i2c-bcm2708.dtbo SIZE: 270 FILE: /overlays/i2c-gpio.dtbo SIZE: 1055 FILE: /overlays/i2c-mux.dtbo SIZE: 2185 FILE: /overlays/i2c-pwm-pca9685a.dtbo SIZE: 648 FILE: /overlays/i2c-rtc-gpio.dtbo SIZE: 5249 FILE: /overlays/i2c-rtc.dtbo SIZE: 4761 FILE: /overlays/i2c-sensor.dtbo SIZE: 5030 FILE: /overlays/i2c0-bcm2708.dtbo SIZE: 1674 FILE: /overlays/i2c0.dtbo SIZE: 1396 FILE: /overlays/i2c1-bcm2708.dtbo SIZE: 1283 FILE: /overlays/i2c1.dtbo SIZE: 1004 FILE: /overlays/i2c3.dtbo SIZE: 907 FILE: /overlays/i2c4.dtbo SIZE: 907 FILE: /overlays/i2c5.dtbo SIZE: 911 FILE: /overlays/i2c6.dtbo SIZE: 909 FILE: /overlays/i2s-gpio28-31.dtbo SIZE: 307 FILE: /overlays/ilitek251x.dtbo SIZE: 1373 FILE: /overlays/imx219.dtbo SIZE: 3293 FILE: /overlays/iqaudio-codec.dtbo SIZE: 895 FILE: /overlays/iqaudio-dac.dtbo SIZE: 1272 FILE: /overlays/iqaudio-dacplus.dtbo SIZE: 1511 FILE: /overlays/iqaudio-digi-wm8804-audio.dtbo SIZE: 1326 FILE: /overlays/irs1125.dtbo SIZE: 2433 FILE: /overlays/jedec-spi-nor.dtbo SIZE: 5188 FILE: /overlays/justboom-both.dtbo SIZE: 1640 FILE: /overlays/justboom-dac.dtbo SIZE: 1276 FILE: /overlays/justboom-digi.dtbo SIZE: 955 FILE: /overlays/ltc294x.dtbo SIZE: 1916 FILE: /overlays/max98357a.dtbo SIZE: 1933 FILE: /overlays/mbed-dac.dtbo SIZE: 1605 FILE: /overlays/mcp23017.dtbo SIZE: 1674 FILE: /overlays/mcp23s17.dtbo SIZE: 15205 FILE: /overlays/mcp2515-can0.dtbo SIZE: 1797 FILE: /overlays/mcp2515-can1.dtbo SIZE: 1797 FILE: /overlays/mcp3008.dtbo SIZE: 4213 FILE: /overlays/mcp3202.dtbo SIZE: 4213 FILE: /overlays/mcp342x.dtbo SIZE: 2854 FILE: /overlays/media-center.dtbo SIZE: 3414 FILE: /overlays/midi-uart0.dtbo SIZE: 720 FILE: /overlays/midi-uart1.dtbo SIZE: 857 FILE: /overlays/miniuart-bt.dtbo SIZE: 1446 FILE: /overlays/mmc.dtbo SIZE: 1221 FILE: /overlays/mpu6050.dtbo SIZE: 796 FILE: /overlays/mz61581.dtbo SIZE: 2826 FILE: /overlays/ov5647.dtbo SIZE: 2597 FILE: /overlays/papirus.dtbo SIZE: 2356 FILE: /overlays/pi3-act-led.dtbo SIZE: 569 FILE: /overlays/pi3-disable-bt.dtbo SIZE: 954 FILE: /overlays/pi3-disable-wifi.dtbo SIZE: 387 FILE: /overlays/pi3-miniuart-bt.dtbo SIZE: 1446 FILE: /overlays/pibell.dtbo SIZE: 2334 FILE: /overlays/piglow.dtbo SIZE: 1594 FILE: /overlays/piscreen.dtbo SIZE: 2689 FILE: /overlays/piscreen2r.dtbo SIZE: 2593 FILE: /overlays/pisound.dtbo SIZE: 2454 FILE: /overlays/pitft22.dtbo SIZE: 1520 FILE: /overlays/pitft28-capacitive.dtbo SIZE: 2361 FILE: /overlays/pitft28-resistive.dtbo SIZE: 2746 FILE: /overlays/pitft35-resistive.dtbo SIZE: 2766 FILE: /overlays/pps-gpio.dtbo SIZE: 1145 FILE: /overlays/pwm-2chan.dtbo SIZE: 1096 FILE: /overlays/pwm-ir-tx.dtbo SIZE: 1031 FILE: /overlays/pwm.dtbo SIZE: 985 FILE: /overlays/qca7000.dtbo SIZE: 1395 FILE: /overlays/rotary-encoder.dtbo SIZE: 1922 FILE: /overlays/rpi-backlight.dtbo SIZE: 489 FILE: /overlays/rpi-cirrus-wm5102.dtbo SIZE: 3542 FILE: /overlays/rpi-dac.dtbo SIZE: 643 FILE: /overlays/rpi-display.dtbo SIZE: 2574 FILE: /overlays/rpi-ft5406.dtbo SIZE: 1018 FILE: /overlays/rpi-poe.dtbo SIZE: 1995 FILE: /overlays/rpi-proto.dtbo SIZE: 771 FILE: /overlays/rpi-sense.dtbo SIZE: 893 FILE: /overlays/rpi-tv.dtbo SIZE: 567 FILE: /overlays/rra-digidac1-wm8741-audio.dtbo SIZE: 1298 FILE: /overlays/sc16is750-i2c.dtbo SIZE: 1219 FILE: /overlays/sc16is752-i2c.dtbo SIZE: 1356 FILE: /overlays/sc16is752-spi1.dtbo SIZE: 1851 FILE: /overlays/sdhost.dtbo SIZE: 968 FILE: /overlays/sdio.dtbo SIZE: 1889 FILE: /overlays/sdtweak.dtbo SIZE: 804 FILE: /overlays/smi-dev.dtbo SIZE: 404 FILE: /overlays/smi-nand.dtbo SIZE: 1476 FILE: /overlays/smi.dtbo SIZE: 981 FILE: /overlays/spi-gpio35-39.dtbo SIZE: 630 FILE: /overlays/spi-gpio40-45.dtbo SIZE: 795 FILE: /overlays/spi-rtc.dtbo SIZE: 635 FILE: /overlays/spi0-cs.dtbo SIZE: 895 FILE: /overlays/spi0-hw-cs.dtbo SIZE: 456 FILE: /overlays/spi1-1cs.dtbo SIZE: 1523 FILE: /overlays/spi1-2cs.dtbo SIZE: 1896 FILE: /overlays/spi1-3cs.dtbo SIZE: 2269 FILE: /overlays/spi2-1cs.dtbo SIZE: 1523 FILE: /overlays/spi2-2cs.dtbo SIZE: 1896 FILE: /overlays/spi2-3cs.dtbo SIZE: 2269 FILE: /overlays/spi3-1cs.dtbo SIZE: 1289 FILE: /overlays/spi3-2cs.dtbo SIZE: 1662 FILE: /overlays/spi4-1cs.dtbo SIZE: 1289 FILE: /overlays/spi4-2cs.dtbo SIZE: 1662 FILE: /overlays/spi5-1cs.dtbo SIZE: 1289 FILE: /overlays/spi5-2cs.dtbo SIZE: 1662 FILE: /overlays/spi6-1cs.dtbo SIZE: 1289 FILE: /overlays/spi6-2cs.dtbo SIZE: 1662 FILE: /overlays/ssd1306.dtbo SIZE: 1122 FILE: /overlays/superaudioboard.dtbo SIZE: 1968 FILE: /overlays/sx150x.dtbo SIZE: 35570 FILE: /overlays/tc358743-audio.dtbo SIZE: 1529 FILE: /overlays/tc358743.dtbo SIZE: 2465 FILE: /overlays/tinylcd35.dtbo SIZE: 4822 FILE: /overlays/tpm-slb9670.dtbo SIZE: 779 FILE: /overlays/uart0.dtbo SIZE: 928 FILE: /overlays/uart1.dtbo SIZE: 980 FILE: /overlays/uart2.dtbo SIZE: 589 FILE: /overlays/uart3.dtbo SIZE: 589 FILE: /overlays/uart4.dtbo SIZE: 589 FILE: /overlays/uart5.dtbo SIZE: 589 FILE: /overlays/udrc.dtbo SIZE: 3532 FILE: /overlays/upstream.dtbo SIZE: 2460 FILE: /overlays/vc4-fkms-v3d.dtbo SIZE: 1255 FILE: /overlays/vc4-kms-kippah-7inch.dtbo SIZE: 1112 FILE: /overlays/vc4-kms-v3d.dtbo SIZE: 2337 FILE: /overlays/vga666.dtbo SIZE: 758 FILE: /overlays/w1-gpio-pullup.dtbo SIZE: 1171 FILE: /overlays/w1-gpio.dtbo SIZE: 1036 FILE: /overlays/w5500.dtbo SIZE: 1558 FILE: /overlays/wittypi.dtbo SIZE: 1056 FILE: /bcm2708-rpi-b-plus.dtb SIZE: 24246 FILE: /COPYING.linux SIZE: 18693 FILE: /LICENCE.broadcom SIZE: 1594 FILE: /bcm2708-rpi-zero-w.dtb SIZE: 24424 FILE: /bcm2708-rpi-b.dtb SIZE: 23983 FILE: /bcm2708-rpi-cm.dtb SIZE: 23764 FILE: /issue.txt SIZE: 145 FILE: /bcm2708-rpi-zero.dtb SIZE: 23688 FILE: /bcm2709-rpi-2-b.dtb SIZE: 25310 FILE: /bcm2710-rpi-2-b.dtb SIZE: 25439 FILE: /bcm2710-rpi-3-b-plus.dtb SIZE: 27099 FILE: /bcm2710-rpi-3-b.dtb SIZE: 26480 FILE: /bcm2710-rpi-cm3.dtb SIZE: 25294 FILE: /bcm2711-rpi-4-b.dtb SIZE: 40988 FILE: /bootcode.bin SIZE: 52304 FILE: /cmdline.txt SIZE: 121 FILE: /config.txt SIZE: 1846 FILE: /fixup.dat SIZE: 6745 FILE: /fixup4.dat SIZE: 6200 FILE: /fixup4cd.dat SIZE: 3112 FILE: /fixup4db.dat SIZE: 9192 FILE: /fixup4x.dat SIZE: 9192 FILE: /fixup_cd.dat SIZE: 2656 FILE: /fixup_db.dat SIZE: 9817 FILE: /fixup_x.dat SIZE: 9819 FILE: /kernel.img SIZE: 5142912 FILE: /kernel7.img SIZE: 5424376 FILE: /kernel7l.img SIZE: 5757200 FILE: /kernel8.img SIZE: 13521408 FILE: /start.elf SIZE: 2883204 FILE: /start4.elf SIZE: 2784800 FILE: /start4cd.elf SIZE: 784316 FILE: /start4db.elf SIZE: 4593508 FILE: /start4x.elf SIZE: 3546468 FILE: /start_cd.elf SIZE: 690884 FILE: /start_db.elf SIZE: 4859912 FILE: /start_x.elf SIZE: 3797384 DIR : /System Volume Information Listing directory: /System Volume Information FILE: /System Volume Information/WPSettings.dat SIZE: 12 FILE: /System Volume Information/IndexerVolumeGuid SIZE: 76 Writing file: /hello.txt File written Appending to file: /hello.txt Message appended Reading file: /hello.txt Read from file: Hello World! Deleting file: /foo.txt Delete failed Renaming file /hello.txt to /foo.txt File renamed Reading file: /foo.txt Read from file: Hello World! Failed to open file for reading 1048576 bytes written for 4301 ms Total space: 252MB Used space: 52MB