Giter VIP home page Giter VIP logo

sd-driver's Introduction

mbed OS SDCard Driver (sd-driver) for FAT32 Filesystem Support

Warning

Starting from mbed-os 5.10 this repository is deprecated.

Note: SD Driver is now part of mbed-os. Use "components_add": ["SD"] for your target at mbed-os target.json

Please refer to mbed-os 5.10 documentation and code for more detail regarding how to enable SD support.

Executive Summary

The purpose of this document is to describe how to use the mbed OS SDCard driver (sd-driver) so applications can read/write data to flash storage cards using the standard POSIX File API programming interface. The sd-driver uses the SDCard SPI-mode of operation which is a subset of possible SDCard functionality.

This repository contains the mbed-os SDCard driver for generic SPI SDCard support and other resources, as outlined below:

  • SDBlockDevice.h and SDBlockDevice.cpp. This is the SDCard driver module presenting a Block Device API (derived from BlockDevice) to the underlying SDCard.
  • POSIX File API test cases for testing the FAT32 filesystem on SDCard.
    • basic.cpp, a basic set of functional test cases.
    • fopen.cpp, more functional tests reading/writing greater volumes of data to SDCard, for example.
  • mbed_lib.json mbed-os application configuration file with SPI pin configurations and overrides for specific targets. This file allows the SPI pins to be specified for the target without having to edit the implementation files.
  • This README which includes Summary of POSIX File API Documentation including detailed instruction on how to use the FAT filesystem and SDBlockDevice driver.

The SDCard driver is maintained in this repository as a component separate from the main mbed OS repository. Hence the 2 repositories (mbed-os and sd-driver) have to be used together to deliver the FAT32 Filesystem/SDCard support. This document explains how to do this.

Introduction

Overview

The scope of this document is to describe how applications use the FAT filesystem and sd-driver components to persistently store data on SDCards. The document is intended to help developers adopt the mbed OS POSIX File API support, and in particular to help explain:

  • How the software components work together to deliver the storage functionality.
  • How to work with the sd-driver and mbed OS to build the examples. The example code can easily be copied into your new application code.
  • How to work with the CI Test Shield, which adds an SDCard slot to those targets that do not have already have one.
  • How to run the POSIX File API mbed Greentea test cases, which provide further example code of how to use the POSIX File API.

Section 1 provides an Executive Summary, describing the purpose of the sd-driver, the supporting software, examples, test cases and documentation.

Section 2 provides an an overview of the material covered including descriptions of the major sections.

Section 3 provides an overview of the mbed OS filesystem software components, including the inter-relationships between the application, POSIX file API, the standard c-library, the mbed OS filesystem and the SDCard driver (sd-driver).

Section 4 describes how to build and run an example application for reading and writing data to an SDCard using the POSIX File API. The example begins by describing the procedure for building and testing on the K64F target. The final sub-sections describe how to use the test shield to add an SDCard slot to any mbed target, and hence enable the persistent storage of data on any supported target.

Section 5 describes an example application which uses the raw BlockDevice API to read and write data to the SDCard.

Section 6 describes how to build and run the SDCard POSIX File API mbed Greentea test cases. There are a number of functional test cases demonstrating how to use the mbed OS POSIX File API.

Section 7 describes the POSIX File API and provides links to useful API documentation web pages.

Known mbed-os and sd-driver Compatible Versions

The following versions of the mbed-os and sd-driver repositories are known to work together:

  • {mbed-os, sd-driver} = {mbed-os-5.4.0-rc2, sd-driver-0.0.1-mbed-os-5.4.0-rc2}. K64F, NUCLEO_F429ZI and UBLOX_EVK_ODIN_W2 fopen and basic filesystem tests working.
  • {mbed-os, sd-driver} = {mbed-os-5.4.0, sd-driver-0.0.2-mbed-os-5.4.0}. K64F, NUCLEO_F429ZI and UBLOX_EVK_ODIN_W2 fopen and basic filesystem tests working.
  • {mbed-os, sd-driver} = {mbed-os-5.4.1, sd-driver-0.0.3-mbed-os-5.4.1}.
  • {mbed-os, sd-driver} = {mbed-os-5.5.1, sd-driver-0.1.0-mbed-os-5.5.1}.
  • {mbed-os, sd-driver} = {mbed-os-5.5.4, sd-driver-0.1.1-mbed-os-5.5.4}.
  • {mbed-os, sd-driver} = {mbed-os-5.6.1, sd-driver-0.1.2-mbed-os-5.6.1}.
  • {mbed-os, sd-driver} = {mbed-os-5.8.0, sd-driver-0.1.3-mbed-os-5.8.0}.

To find the latest compatible versions, use the following command to see the messages attached to the tags in the sd-driver repository:

ex_app7/$ cd sd-driver
ex_app7/sd-driver$ git tag -n
sd-driver-0.0.1-mbed-os-5.3.4 Version compatible with mbed-os-5.3.4, and private_mbedos_filesystems-0.0.1-mbed-os-5.3.4.
sd-driver-0.0.2-mbed-os-5.4.0 Updated README.md to include worked exmaples and restructuring of information.
sd-driver-0.0.3-mbed-os-5.4.1 Version compatible with mbed-os-5.4.1.
sd-driver-0.1.1-mbed-os-5.5.4 Version compatible with mbed-os-5.5.4
sd-driver-0.1.2-mbed-os-5.6.1  Version compatible with mbed-os-5.6.1
sd-driver-0.1.3-mbed-os-5.8.0  Version compatible with mbed-os-5.8.0

Known Issues With This Document

There are no known issues with this document.

Overview of mbed OS Filesystem Software Component Stack

------------------------
|                      |
|    Application       |        // This application uses the POSIX File API
|                      |        // to read/write data to persistent storage backends.
------------------------

------------------------        // POSIX File API (ISO).

------------------------
|                      |
|     libc             |        // The standard c library implementation
|                      |        // e.g. newlib.
------------------------

------------------------        // sys_xxx equivalent API.

------------------------
|                      |
|  mbed_retarget.cpp   |        // Target specific mapping layer.
|                      |
------------------------

------------------------        // Filesystem Upper Edge API.

------------------------
|                      |
|     File System      |        // File system wrappers and implementation.
|                      |
------------------------

------------------------        // FS Lower Edge API (Block Store Interface).

------------------------
|    Block API         |
|    Device Driver     |        // The SDCard driver, for example.
|  e.g. sd-driver      |
------------------------

------------------------        // SPI.h interface.

------------------------
|                      |
|       SPI            |        // SPI subsystem (C++ classes and C-HAL implementation).
|                      |
------------------------

Figure 1. mbedOS generic architecture of filesystem software stack.

The figure above shows the mbed OS software component stack used for data storage on SDCard:

  • At the top level is the application component which uses the standard POSIX File API to read and write application data to persistent storage.
  • The newlib standard library (libc) stdio.h interface (POSIX File API) implementation is used as it's optimised for resource limited embedded systems.
  • mbed_retarget.cpp implements the libc back-end file OS handlers and maps them to the FileSystem.
  • The File System code (hosted in mbed-os) is composed of 2 parts:
    • The mbed OS file system wrapper classes (e.g. FileSystem, File, FileBase classes) which are used to present a consistent API to the retarget module for different (third-party) file system implementations.
    • The FAT filesystem implementation code. The FATFS: Generic FAT File System Module (ChanFS) has been integrated within mbed-os.
  • The Block API Device Driver. The SDCard driver is an example of a persistent storage driver. It's maintained as a separate component from the mbed OS repository (in this repository).
  • The SPI module provides the mbed OS generic SPI API. This functionality is maintained in mbed OS.

SDCard POSIX File API Example App for Reading/Writing Data

Refer to SD driver Example

Testing with an SDCard on Target XYZ

The standard way to test is with the mbed CI Test Shield plugged into the target board. This pin mapping for this configuration is parameterised in the mbed_lib.json file.

The following is an example of the mbed_lib.json file available in the repository:

{
    "config": {
        "SPI_CS": "NC",
        "SPI_MOSI": "NC",
        "SPI_MISO": "NC",
        "SPI_CLK": "NC",
        "DEVICE_SPI": 1,
        "FSFAT_SDCARD_INSTALLED": 1
    },
    "target_overrides": {
        "DISCO_F051R8": {
             "SPI_MOSI": "SPI_MOSI",
             "SPI_MISO": "SPI_MISO",
             "SPI_CLK":  "SPI_SCK",
             "SPI_CS":   "SPI_CS"
        },
        "KL46Z": {
             "SPI_MOSI": "PTD6",
             "SPI_MISO": "PTD7",
             "SPI_CLK":  "PTD5",
             "SPI_CS":   "PTD4"
        },
        "K64F": {
             "SPI_MOSI": "PTE3",
             "SPI_MISO": "PTE1",
             "SPI_CLK":  "PTE2",
             "SPI_CS":   "PTE4"
        }
}

Note the following things about the mbed_lib.json file:

  • The mbed_lib.json file is used to define target specific symbols for the SPI pins connecting the SDCard slot to the target MCU:

    • "SPI_CS". This is the Chip Select line.
    • "SPI_MOSI". This is the Master Out Slave In data line.
    • "SPI_MISO". This is the Master In Slave Out data line.
    • "SPI_CLK". This is the serial Clock line.
  • The default configuration defined in the "config" section is not valid for any platform (will error at runtime). The "config" section defines a dictionary mapping functional names to target board pins:

    • "SPI_CS" causes the MBED_CONF_APP_SPI_CS symbol to be defined in mbed_config.h, which is used in the filesystem test implementation.
    • "SPI_MOSI" causes the MBED_CONF_APP_SPI_MOSI symbol to be defined in mbed_config.h.
    • "SPI_MISO" causes the MBED_CONF_APP_SPI_MISO symbol to be defined in mbed_config.h.
    • "SPI_CLK" causes the MBED_CONF_APP_SPI_CLK symbol to be defined in mbed_config.h.
  • The "target_overrides" section is used to override the "SPI_xxx" symbols for specific target boards, which may have an SDCard slot, for example. This is the case for the K64F, where the "SPI_xxx" are mapped to the pin names for the on-board SDCard.

      "K64F": {
           "SPI_MOSI": "PTE3",
           "SPI_MISO": "PTE1",
           "SPI_CLK":  "PTE2",
           "SPI_CS":   "PTE4"
      }
    
  • Thus, in the absence of any target specific definitions in the "target_overrides" section, all boards will default to using the invalid configuration (will error at runtime). For those platforms with a "target_overrides" section then this configuration will be used in preference.

  • Hence in the case that you want to test a platform with an SDCard inserted into a fitted CI test shield (rather than the on-board SDCard slot) and there is a "target_overrides" section present in the mbed_lib.json file, you must provide the correct Arduino pins in the "target_overrides" section before building. This will result in the default configuration being used (suitable for the CI Test Shield). The correct pins for the CI test shield are as follows: "": { "SPI_MOSI": "D11", "SPI_MISO": "D12", "SPI_CLK": "D13", "SPI_CS": "D10" }

  • Note when inserting the v1.0.0 CI Test Shield into the Arduino header of the target platform, the shield pins D0 and D1 should be bent to be parallel to the shield PCB so they are not inserted into the Arduino header. This is because some boards use the same UART on DAPLINK and D0/D1, which means the serial debug channel breaks and hence the mbed greentea test suite will not work correctly. This is mainly on older ST boards and should not be a problem on K64F, NUCLEO_F429ZI and UBLOX_EVK_ODIN_W2. Note also that the v2.0.0 CI Test Shield doesn't suffer from this problem and the pins don't need to be bent.

  • When inserting the SDCard into the card slot on the CI test shield, make sure the card is fully inserted. On insertion, there should be a small clicking sound when the card registers, and the back edge of the card should protrude no more than ~1mm over the edge of the CI test shield PCB. If the SDCard fails to register, try gently pushing the metal flexible strip in the shape of a spade at the top edge of the SDCard metal slot casing with a pair of tweezers, bending it a little to lower it into the slot casing. This helps with the insertion mechanism.

Wiring instructions for target NUCLEO_F429ZI with CI Test Shield

alt text

Figure 3. The figure shows how to connect the NUCLEO_F429ZI platform with the CI shield.

The above figure shows how to connect the NUCLEO_F429ZI with the v1.0.0 CI test shield. Note:

  • To get the SD Card to work with this platform the CI test shield cannot be connected directly to this board, instead follow the instructions above.
  • Any SD-card adapter will work as long as you connect all the relevant pins (MOSI, MISO, SCLK, CS, 3.3V and GND) as illustrated in figure 3.
  • The SDCard is fully inserted into the slot and overhangs the PCB by ~1mm.

SDBlockDevice Example Application

The following sample code illustrates how to use the sd-driver Block Device API:

#include "mbed.h"
#include "SDBlockDevice.h"

// Instantiate the SDBlockDevice by specifying the SPI pins connected to the SDCard
// socket. The PINS are:
//     MOSI (Master Out Slave In)
//     MISO (Master In Slave Out)
//     SCLK (Serial Clock)
//     CS (Chip Select)
SDBlockDevice sd(MBED_CONF_SD_SPI_MOSI, MBED_CONF_SD_SPI_MISO, MBED_CONF_SD_SPI_CLK, MBED_CONF_SD_SPI_CS);
uint8_t block[512] = "Hello World!\n";

int main()
{
    // call the SDBlockDevice instance initialisation method.
    if ( 0 != sd.init()) {
        printf("Init failed \n");
        return -1;
    }
    printf("sd size: %llu\n",         sd.size());
    printf("sd read size: %llu\n",    sd.get_read_size());
    printf("sd program size: %llu\n", sd.get_program_size());
    printf("sd erase size: %llu\n",   sd.get_erase_size());

    // set the frequency
    if ( 0 != sd.frequency(5000000)) {
        printf("Error setting frequency \n");
    }

    if ( 0 != sd.erase(0, sd.get_erase_size())) {
        printf("Error Erasing block \n");
    }

    // Write some the data block to the device
    if ( 0 == sd.program(block, 0, 512)) {
        // read the data block from the device
        if ( 0 == sd.read(block, 0, 512)) {
            // print the contents of the block
            printf("%s", block);
        }
    }

    // call the SDBlockDevice instance de-initialisation method.
    sd.deinit();
}

SDCard POSIX File API mbed Greentea Test Cases

This section describes how to build and run the POSIX file API test cases. The following steps are covered:

Create the FAT/SDCard Application Project

This section describes how to create an application project combining the mbed-os and sd-driver repositories into a single project. In summary the following steps will be covered in this section:

  • A top level application project directory is created. The directory name is ex_app1.
  • In the ex_app1 directory, the mbed-os repository is cloned.
  • In the ex_app1 directory at the same level as the mbed-os directory, the sd-driver repository is cloned.
  • The mbed_lib.json file is copied from the sd-driver/config/mbed_lib.json to the ex_app1 directory.

First create the top level application directory ex_app1 and move into it:

shell:/d/demo_area$ mkdir ex_app1
shell:/d/demo_area$ pushd ex_app1

Next, get a clone of public mbed OS repository in the following way:

shell:/d/demo_area/ex_app1$ git clone [email protected]:/armmbed/mbed-os
<trace removed>
shell:/d/demo_area/ex_app1$

Next, get a clone of the sd-driver repository:

shell:/d/demo_area/ex_app1$ git clone [email protected]:/armmbed/sd-driver
<trace removed>
shell:/d/demo_area/ex_app1$

Note: The mbed_lib.json file specifies the SPI bus pin configuration for different targets, and is discussed in the Testing with an SDCard on Target XYZ section.

Build the mbed OS Test Cases

Build the test cases for the K64F target using the following command:

shell:/d/demo_area/ex_app1$ mbed -v test --compile -t GCC_ARM -m K64F
<trace removed>
shell:/d/demo_area/ex_app1$

The build trace is quite extensive but on a successful build you should see the following output at the end of the log:

Build successes:
  * K64F::GCC_ARM::MBED-BUILD
  * K64F::GCC_ARM::MBED-OS-FEATURES-FEATURE_LWIP-TESTS-MBEDMICRO-NET-CONNECTIVITY
  <trace removed>
  * K64F::GCC_ARM::MBED-OS-FEATURES-TESTS-FILESYSTEM-FAT_FILE_SYSTEM
  * K64F::GCC_ARM::MBED-OS-FEATURES-TESTS-FILESYSTEM-HEAP_BLOCK_DEVICE
  * K64F::GCC_ARM::MBED-OS-FEATURES-TESTS-FILESYSTEM-UTIL_BLOCK_DEVICE
  <trace removed>
  * K64F::GCC_ARM::SD-DRIVER-TESTS-BLOCK_DEVICE-BASIC
  * K64F::GCC_ARM::SD-DRIVER-TESTS-FILESYSTEM-BASIC
  * K64F::GCC_ARM::SD-DRIVER-TESTS-FILESYSTEM-DIRS
  * K64F::GCC_ARM::SD-DRIVER-TESTS-FILESYSTEM-FILES
  * K64F::GCC_ARM::SD-DRIVER-TESTS-FILESYSTEM-FOPEN
  * K64F::GCC_ARM::SD-DRIVER-TESTS-FILESYSTEM-PARALLEL
  * K64F::GCC_ARM::SD-DRIVER-TESTS-FILESYSTEM-SEEK

Build skips:
  * K64F::GCC_ARM::MBED-OS-FEATURES-FEATURE_LWIP-TESTS-MBEDMICRO-NET-TCP_PACKET_PRESSURE
  <trace removed>

Notice the following tests in the sd-driver tree are listed above:

  • SD-DRIVER-TESTS-BLOCK_DEVICE-BASIC
  • SD-DRIVER-TESTS-FILESYSTEM-BASIC
  • SD-DRIVER-TESTS-FILESYSTEM-DIRS
  • SD-DRIVER-TESTS-FILESYSTEM-FILES
  • SD-DRIVER-TESTS-FILESYSTEM-FOPEN
  • SD-DRIVER-TESTS-FILESYSTEM-PARALLEL
  • SD-DRIVER-TESTS-FILESYSTEM-SEEK

The FAT32/SDCard test cases are at following locations in the source code tree:

/d/demo_area/ex_app1/sd-driver/TESTS/filesystem/basic/basic.cpp
/d/demo_area/ex_app1/sd-driver/TESTS/filesystem/fopen/fopen.cpp
/d/demo_area/ex_app1/sd-driver/TESTS/block_device/basic/basic.cpp
/d/demo_area/ex_app1/sd-driver/TESTS/filesystem/dirs/main.cpp
/d/demo_area/ex_app1/sd-driver/TESTS/filesystem/files/main.cpp
/d/demo_area/ex_app1/sd-driver/TESTS/filesystem/parallel/main.cpp
/d/demo_area/ex_app1/sd-driver/TESTS/filesystem/seek/main.cpp

Setting mbed-os/sd-driver Repositories To Compatible Versions

The sd-driver master HEAD and the mbed-os master HEAD should be compatible with one another and therefore no specific tagged versions need to be checked out. However, in the case that you experience problems building, checkout out the compatible tagged version of each repository, as shown below:

shell:/d/demo_area/ex_app1$ pushd mbed-os
shell:/d/demo_area/ex_app1$ git checkout tags/mbed-os-5.4.0
shell:/d/demo_area/ex_app1$ popd
shell:/d/demo_area/ex_app1$ pushd sd-driver
shell:/d/demo_area/ex_app1$ git checkout tags/sd-driver-0.0.2-mbed-os-5.4.0
shell:/d/demo_area/ex_app1$ popd

In the above:

  • mbed-os-5.4.0 should be replaced with the latest mbed-os release tag.
  • For an mbed-os release tag mbed-os-x.y.z, use the equivalent sd-driver tag sd-driver-a.b.c-mbed-os-x.y.z where a.b.c is the latest version code for the mbed-os-x.y.z tag.

Insert SDCard into K64F for Greentea Testing

See the previous section for Insert SDCard into K64F for details.

Run the POSIX File Test Case

To setup for running the test cases, connect the K64F development board to your PC using a suitable USB cable.

All tests can be run using the following command:

shell:/d/demo_area/ex_app1$ mbedgt -VS
<trace removed>

However, it's possible to run a particular test case using the following form of the mbedgt command:

shell:/d/demo_area/ex_app1$ mbedgt -VS --test-by-names=<test-name>

The names of the tests can be listed using:

shell:/d/demo_area/ex_app1$ mbedgt -VS --list

For example, to run the basic test use:

shell:/d/demo_area/ex_app1$ mbedgt -VS --test-by-names=sd-driver-tests-filesystem-basic

To run the fopen test use:

shell:/d/demo_area/ex_app1$ mbedgt -VS --test-by-names=sd-driver-tests-filesystem-fopen

On a successful run, results similar to the following will be shown:

mbedgt: test suite report:
+--------------+---------------+-------------------------------------------+--------+--------------------+-------------+
| target       | platform_name | test suite                                | result | elapsed_time (sec) | copy_method |
+--------------+---------------+-------------------------------------------+--------+--------------------+-------------+
| K64F-GCC_ARM | K64F          | sd-driver-features-tests-filesystem-fopen | OK     | 151.46             | shell       |
+--------------+---------------+-------------------------------------------+--------+--------------------+-------------+
mbedgt: test suite results: 1 OK
mbedgt: test case report:
+--------------+---------------+------------------------------------+----------------------------------------------------------------------------------------+--------+--------+--------+--------------------+
| target       | platform_name | test suite                         | test case                                                                              | passed | failed | result | elapsed_time (sec) |
+--------------+---------------+------------------------------------+----------------------------------------------------------------------------------------+--------+--------+--------+--------------------+
| K64F-GCC_ARM | K64F          | sd-driver-tests-filesystem-fopen   | FSFAT_FOPEN_TEST_01: fopen()/fwrite()/fclose() directories/file in multi-dir filepath. | 1      | 0      | OK     | 7.57               |
| K64F-GCC_ARM | K64F          | sd-driver-tests-filesystem-fopen   | FSFAT_FOPEN_TEST_02: fopen(r) pre-existing file try to write it.                       | 1      | 0      | OK     | 0.2                |
| K64F-GCC_ARM | K64F          | sd-driver-tests-filesystem-fopen   | FSFAT_FOPEN_TEST_03: fopen(w+) pre-existing file try to write it.                      | 1      | 0      | OK     | 0.41               |
| K64F-GCC_ARM | K64F          | sd-driver-tests-filesystem-fopen   | FSFAT_FOPEN_TEST_04: fopen() with a filename exceeding the maximum length.             | 1      | 0      | OK     | 0.11               |
| K64F-GCC_ARM | K64F          | sd-driver-tests-filesystem-fopen   | FSFAT_FOPEN_TEST_06: fopen() with bad filenames (minimal).                             | 1      | 0      | OK     | 0.1                |
| K64F-GCC_ARM | K64F          | sd-driver-tests-filesystem-fopen   | FSFAT_FOPEN_TEST_07: fopen()/errno handling.                                           | 1      | 0      | OK     | 0.07               |
| K64F-GCC_ARM | K64F          | sd-driver-tests-filesystem-fopen   | FSFAT_FOPEN_TEST_08: ferror()/clearerr()/errno handling.                               | 1      | 0      | OK     | 0.1                |
| K64F-GCC_ARM | K64F          | sd-driver-tests-filesystem-fopen   | FSFAT_FOPEN_TEST_09: ftell() handling.                                                 | 1      | 0      | OK     | 0.17               |
| K64F-GCC_ARM | K64F          | sd-driver-tests-filesystem-fopen   | FSFAT_FOPEN_TEST_10: remove() test.                                                    | 1      | 0      | OK     | 1.28               |
| K64F-GCC_ARM | K64F          | sd-driver-tests-filesystem-fopen   | FSFAT_FOPEN_TEST_11: rename().                                                         | 1      | 0      | OK     | 2.3                |
| K64F-GCC_ARM | K64F          | sd-driver-tests-filesystem-fopen   | FSFAT_FOPEN_TEST_12: opendir(), readdir(), closedir() test.                            | 1      | 0      | OK     | 3.57               |
| K64F-GCC_ARM | K64F          | sd-driver-tests-filesystem-fopen   | FSFAT_FOPEN_TEST_13: mkdir() test.                                                     | 1      | 0      | OK     | 1.21               |
| K64F-GCC_ARM | K64F          | sd-driver-tests-filesystem-fopen   | FSFAT_FOPEN_TEST_14: stat() test.                                                      | 1      | 0      | OK     | 1.47               |
| K64F-GCC_ARM | K64F          | sd-driver-tests-filesystem-fopen   | FSFAT_FOPEN_TEST_15: format() test.                                                    | 1      | 0      | OK     | 26.12              |
| K64F-GCC_ARM | K64F          | sd-driver-tests-filesystem-fopen   | FSFAT_FOPEN_TEST_16: write/check n x 25kB data files.                                  | 1      | 0      | OK     | 87.11              |
+--------------+---------------+------------------------------------+----------------------------------------------------------------------------------------+--------+--------+--------+--------------------+
mbedgt: test case results: 15 OK
mbedgt: completed in 152.35 sec

Summary of POSIX File API Documentation

POSIX File API

mbed OS supports a subset of the POSIX File API, as outlined below:

  • clearerr().
    • STATUS: Basic testing implemented. Working.
  • fclose().
    • STATUS: Basic testing implemented. Working.
  • ferror().
    • STATUS: Basic testing implemented.
    • STATUS: GCC_ARM: Working.
    • STATUS: ARMCC: ARMCC has problem with ferror(filep) where filep is NULL. Appears to work for non-NULL pointer.
  • fgetc().
    • STATUS: Basic testing implemented. Working.
  • fgets().
    • STATUS: Basic testing implemented. Working.
  • fputc().
    • STATUS: Unknown.
  • fputs().
    • STATUS: Basic testing implemented. Working.
  • fprintf().
    • STATUS: Basic testing implemented. Working.
  • fopen().
    • STATUS: Basic testing implemented. Working.
  • freopen().
    • STATUS: This is not tested.
  • fread().
    • STATUS: Basic testing implemented. Working.
    • STATUS: n x 25kB stress test working.
  • ftell().
    • STATUS: Basic testing implemented. Working.
  • fwrite().
    • STATUS: Basic testing implemented. Working.
    • STATUS: n x 25kB stress test working.
  • fseek()
    • STATUS: Basic testing implemented. Working.
  • getc().
    • STATUS: Basic testing implemented. Working.
  • gets().
    • STATUS: Unknown.
  • putc().
    • STATUS: Unknown.
  • puts().
    • STATUS: Unknown.
  • remove()
    • STATUS: Basic testing implemented. Working.
  • rewind().
    • STATUS: Basic testing implemented. Working.
  • stat()
    • STATUS: Implemented. Working.
    • STATUS: Not supported by ARMCC/IAR libc.
  • tmpfile().
    • STATUS: Not implemented.
  • tmpnam().
    • STATUS: Not implemented.

Supported directory related operations are as follows:

  • closedir().
    • STATUS: Implemented. Working.
  • mkdir().
    • STATUS: Basic testing implemented. Working.
  • opendir().
    • STATUS: Implemented. Working.
  • readdir().
    • STATUS: Implemented. Working.
  • remove().
    • STATUS: Basic testing implemented. Working.
  • rename().
    • STATUS: Implemented. Not tested.
  • rewinddir().
    • STATUS: Implemented. Found not to work. Test case not present in repo.
  • seekdir().
    • STATUS: Implemented. Found not to work. Test case not present in repo.
  • telldir().
    • STATUS: Implemented. Found not to work. Test case not present in repo.

errno

Basic errno reporting is supported, tested and known to be working.

Related Projects Resources

The following are related mbed storage projects and useful resources:

sd-driver's People

Contributors

bridadan avatar geky avatar jammukekkonen avatar lemonboy avatar robmeades avatar sg- avatar simonqhughes avatar simosillankorva avatar soramame21 avatar tomoyamanaka avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sd-driver's Issues

Multiple SPIs in the same channel

Im trying to use this library while simultaneously using an ethernet shiled connected to the same SPI channel with their respectives CS. While they work separately, neither work while the other is present.

Is there a special way this should be done?

More info: ARMmbed/mbed-os#7064

mbed test fails on K64 / IAR

Using IAR and a K64 board, the "Directory failures" tests fail with mbed os 5.9.2. I think these tests were passing with 5.8.x? But I'm not sure if "Directory failures" are new tests b/c I also just updated our copy of sd-driver

test case: 'Directory failures' .............................................................. FAIL in 0.12 sec

mbed_app.json -> mbed_lib.json

Should the sd-driver define a mbed_lib.json instead of the app example?
No one wants contaminate their shorter mbed_app.json with this many pin definitions, those should come either via here (or better yet, have the mbed os pin define stuff sorted out).

Deprecation note - moved to Mbed OS

We should probably update README.md to include note about code being moved into Mbed-OS since 5.10 release and further updates/development will happen inside the Mbed OS repository?

Timing issues

Long story short, this microsd card is pretty slow (and tiny) and am having a hard time getting it to play along with the sd-driver (with #48, #49, #50).
For some reason I keep hitting some weird IO error that I haven't been able to pinpoint yet as every time I add a printf to log some values the bug disappears and the program is able to reach the end thanks to the delay it introduces.
Here's a short log of the commands, I haven't been able to track down what command causes this so I hope you may have any hint.

CMD:24 	 arg:0x141a00 	 Response:0x0 
CMD:13 	 arg:0x0 	 Response:0x0 
R2: 0x0 
CMD:23 	 arg:0x2 	 Response:0x0 
CMD:25 	 arg:0x141c00 	 Response:0x0 
CMD:17 	 arg:0x100800 	 Response:0x0 
_wait_token: timeout
Read timeout
CMD:17 	 arg:0x100800 	 Response:0x0 
CMD:23 	 arg:0x4 	 Response:0x0 
CMD:25 	 arg:0x144000 	 Response:0x0 
CMD:24 	 arg:0x144800 	 Response:0x0 
CMD:13 	 arg:0x0 	 Response:0x0 
R2: 0x0 
CMD:24 	 arg:0x100800 	 Response:0x0 
No response CMD:13 
No response CMD:13 
No response CMD:13 
No response CMD:13 

No response CMD:24 
No response CMD:24 
No response CMD:24 
No response CMD:24 

Why demand CI-shield

Is there a truly valid reason for demanding the CI-shield? For example K64F and UBLOX ODIN EWK have an SD-card slot as is - however that does not seem to work with the current example/mbed_app.json. Why is that? Could we not/should we not support the native SD-card slot?

The issue is for the random Sunday developer - demanding them to get acquire the CI-shield will significantly increase the cost of the IoT trials. K64F costs around 22 EUR, while the CI-shield is around 40 EUR and it's not so easy to get by those.

Sd-card initialization issue

Init for the 1st time, initializing the modules
eSFS - test start
Unity test run 1 of 1
No disk, or could not put SD card in to SPI idle state
Fail to initialize card
<UnityTest>TEST(esfs, filename)</UnityTest>/home/danny/work/git/ex_mbed/mbed-client-esfs-example/esfs/Test/Unitest/esfs_test.c:106:TEST(esfs, filename):
===!!Unable to render embedded object: File (===> <UnityResult>FAIL</UnityResult> <===) not found.!!===: Expected 0 Was 4
Init: SDCARD_V2
init card = 1
SDHC Card
hc_c_size: 15159
capacity: 4310491136
sectors: 2305997493835366400
Additional file system operation may work

Incorrect capacity detection/display

4GB SD Card with debug print enabled, shows incorrect card capacity on K64F.

'''
Init: SDCARD_V2
init card = 1
SDHC Card
hc_c_size: 7591
capacity: 186929869398016
sectors: 98248215760448
'''

README.md - K64F with CI-shield pic missing

The picture link has gone bad in the README.md;

### Target K64F with CI Test Shield fitted

![alt text](docs/pics/sd_driver_k64_with_ci_test_shield.jpg "unseen title text")

**Figure 2. The figure shows the K64F platform with the CI shield fitted.**

The picture is gone with the last merge.

@geky @deepikabhavnani

Cannnot change the value of SDBlockDevice class members from outside

https://github.com/ARMmbed/sd-driver/blob/master/features/filesystem/sd/SDBlockDevice.h#L130

The access restriction of this class is private: .
For that reason, I can not change the value of this class members from outside.


For example, I would like to change _transfer_sck from outside by inheriting class. But I cann not change it. I would like to change the clock to about 20 MHz and access it fast.
Also, I would like to change other members as well.

In SDFilesystem of mbed classic, the access restriction of this class was protected: .
Therefore, I expect that the access restriction is chaged from private: to protected:.

Could you give us your opinion about the above ?

Eliminate or replace wait_ms() instances

Eliminate or otherwise replace wait_ms() instances with Thread::wait()

wait_ms() does a busy wait which is wasteful when dealing with multiple threads. When using an NRF52_DK target calling wait_ms() from multiple threads causes application hang. Replacing these occurrences with Thread::wait() solves this issue.

mbed_app.json or mbed_lib.json

Readme of sd-driver states to use "mbed_app.json" from driver config directory, but file in config directory is renamed to "mbed_lib.json"

Need SDIO

Hi there. We (u-blox) have a board launching in the next month on which the SD card is ONLY connected to the SDIO interface of the STM32F4 MCU, not the SPI interface. So I need to write a driver for that, as I can't find one anywhere. I was going to do it in a Mercurial repo (as we have other stuff in Mercurial) but I could see if I can add it to this, if you think that's a good idea? How do on-line IDE users normally pull in this library?

Rob

UBLOX_ODIN_EVK_W2 - internal SD-card slot not working

With default mbed_lib.json the internal SD-card slot fails.

No disk, or could not put SD card in to SPI idle state
Fail to initialize card

Works with CI-shield, but why? Surely the internal SD-card slot should work as well.
There is no target override for UBLOX, tried adding one as well - but it still fails.

        "UBLOX_EVK_ODIN_W2": {
             "SPI_MOSI": "PE_14",
             "SPI_MISO": "PE_13",
             "SPI_CLK":  "PE_12",
             "SPI_CS":   "PE_11"
        },

Anyways, if one looks at the pinout for UBLOX, the pins are mapping to the CI-shield defaults - so it should work out of the box.

Can't get this to work with SW4STM32, Disco L476VG

mbed-os-5.4.1
sd-driver-0.0.3-mbed-os-5.4.1
system workbench 1.14

Running example1.cpp. Works if I compile it online. Works if I compile using mbed-cli. But I cannot get it to work if I export to SW4STM32 and compile it there. I always get errors along the lines of:

Welcome to the filesystem example.
Opening a new file, numbers.txt. Failure. 9

Update Solved: Took me forever to track this down, so will leave here in case it helps someone else. Goes back to mbed_config.h, not being included in the SW4STM32 project in the default export. Inside mbed_retarget.cpp, the macro MBED_CONF_FILESYSTEM_PRESENT, was not visible. This caused the retargeting of stdlib fopen function not to work. Solution is to add the mbed_config.h file to gcc and g++ compilers globally using:

-include mbed_config.h

How to truncate

How can i truncate a file to a certain size with this library?

Llittlefs on sd-driver

does sd-driver support littlefs?
I have tried using it with File and FILE and it does no seems to work.
Also stat() seems to always fail.

Is there some special way to accomplish this?

SD card init fails randomly

I have detected that SD card init fail randomly with K64F and https://github.com/ARMmbed/mbed-cloud-client-example/blob/master/source/platform/mbed-os/common_setup.cpp#L296-L303. In this case I get SD_BLOCK_DEVICE_ERROR_NO_DEVICE https://github.com/ARMmbed/sd-driver/blob/f9c33caa3252792fdd4b8a421367027be3cf6b0e/SDBlockDevice.cpp#L176 even SD card has been connected.

...
08:29:13.488 | D1 <<< DutThread: Application ready. Build at: Apr 19 2018 08:07:11
08:29:13.488 | D1 <<< DutThread: Mbed OS version 5.8.2
08:29:13.488 | D1 <<< DutThread: mcc_platform_storage_init() - bd->init() failed with -5005
08:29:13.488 | D1 <<< DutThread: Failed to initialize storage
08:29:13.489 | D1 <<< DutThread: Initialization failed, exiting application!
...

What is doable in this case?

Add support for LPC1768 Expresso

Please add support for the LPC1768 Expresso Board by including the following lines in mbed_lib.json. This is worth doing as the LPC1768 Expresso board is widely used for teaching etc.:

"LPC1768": {
"SPI_MOSI": "p5",
"SPI_MISO": "p6",
"SPI_CLK": "p7",
"SPI_CS": "p8"
},
`

Getting error with STM32L432KC

Hi @deepikabhavnani
I am trying to use the mbed-os-example-sd-driver from here -> https://github.com/ARMmbed/mbed-os-example-sd-driver/blob/master/main.cpp with my STM32L432KC. I can compile fine and am able to run it. PFA my main.cpp and the debug output from putty.

#include "mbed.h"
#include "FATFileSystem.h"
#include "SDBlockDevice.h"
#include <stdio.h>
#include <errno.h>
/* mbed_retarget.h is included after errno.h so symbols are mapped to
 * consistent values for all toolchains */
#include "platform/mbed_retarget.h"


SDBlockDevice sd(SPI_MOSI, SPI_MISO, SPI_SCK, PA_11);
FATFileSystem fs("sd", &sd);
Serial pc(USBTX, USBRX);

void return_error(int ret_val){
  if (ret_val)
    pc.printf("Failure. %d\r\n", ret_val);
  else
    pc.printf("done.\r\n");
}

void errno_error(void* ret_val){
  if (ret_val == NULL)
    pc.printf(" Failure. %d \r\n", errno);
  else
    pc.printf(" done.\r\n");
}

int main()
{
	int error = 0;
	pc.baud(115200);
	pc.printf("Welcome to the filesystem example.\r\n");

	pc.printf("Opening a new file, numbers.txt. \r\n");
	FILE* fd = fopen("/sd/numbers.txt", "w+");
	errno_error(fd);

	for (int i = 0; i < 20; i++){
		pc.printf("Writing decimal numbers to a file (%d/20)\r", i);
		fprintf(fd, "%d\r\n", i);
	}
	pc.printf("Writing decimal numbers to a file (20/20) done.\r\n");

	pc.printf("Closing file.");
	fclose(fd);
	pc.printf(" done.\r\n");

	pc.printf("Re-opening file read-only. \r\n");
	fd = fopen("/sd/numbers.txt", "r");
	errno_error(fd);

	pc.printf("Dumping file to screen.\r\n");
	char buff[16] = {0};
	while (!feof(fd)){
		int size = fread(&buff[0], 1, 15, fd);
		fwrite(&buff[0], 1, size, stdout);
	}
	pc.printf("EOF.\r\n");

	pc.printf("Closing file.");
	fclose(fd);
	pc.printf(" done.\r\n");

	pc.printf("Opening root directory.");
	DIR* dir = opendir("/sd/");
	errno_error(fd);

	struct dirent* de;
	pc.printf("Printing all filenames:\r\n");
	while((de = readdir(dir)) != NULL){
		pc.printf("  %s\r\n", &(de->d_name)[0]);
	}

	pc.printf("Closeing root directory. ");
	error = closedir(dir);
	return_error(error);
	pc.printf("Filesystem Demo complete.\r\n");

	while (true) {}
}

putty.txt

Also, I slightly changed the code to match the pinout on the SD card device I am using. I am using a CATALEX sd card module with a Sandisk 16 GB sd card. A schematic is shown below
img_20170809_154914

Can you help me sort out the problem ? Thanks

Best
Chandra

heap allocation error after using sd-driver

Hi,
I'm using this library with mbed-connector to read and write sd files with the cloud and my platform is K64F.
I'm not sure if my problem is related to this library but I tried to remove the sd read/write functions and libraries and everything worked fine. Here is my problem:
After compiling and running the code it works fine but after a few minute, I got the error "Operator new out of memory" in the terminal. I'm using these two functions to read and write to sd. (I removed the other part of code)

#include "mbed.h"
#include "security.h"
#include "easy-connect.h"
#include "simple-mbed-client.h"
#include <stdio.h>
#include <cstdlib>
#include "C12832.h"
#include "LM75B.h"
#include "MMA7660.h"
#include <cstring>
#include <string>
#include <sstream>  //for conversion of data types to string
#include <iomanip> //for setting precision of float
#include "FATFileSystem.h"
#include "SDBlockDevice.h"
#include <errno.h>
/* mbed_retarget.h is included after errno.h so symbols are mapped to
* consistent values for all toolchains */
#include "platform/mbed_retarget.h"

SimpleResourceString SDcard_write = client.define_resource("device/0/SD_W", "RED", M2MBase::GET_PUT_ALLOWED, true, &SD_write_updated);
SimpleResourceString SDcard_read = client.define_resource("device/0/SD_R", "RED", M2MBase::GET_ALLOWED, true);

void SD_write_updated(string new_value)
{
  printf("device/0/name changed to:\r\n");
  printf("%s\r\n", new_value.c_str());
  sd_write=true;
  sd_write_value=new_value;

}

void SD_read_updated(void* args){
  printf("Reading from SD Card...\r\n");
  sd_read=true;
}

void sd_write_open()
{
  string str2;
  //  char *y;
  //  int size=128;
  //  char *y =(char *)malloc(size);
  string sub="\\n"; // str2 is string to search, sub is the substring to search for
  vector<size_t> positions; // holds all the positions that sub occurs within str
  size_t pos = sd_write_value.find(sub, 0);
  while(pos != string::npos) {
    positions.push_back(pos);
    pos = sd_write_value.find(sub,pos+1);
  }
  for(int i=0; i<positions.size(); ++i) {
    printf("list the posistions %d\n",positions[i]);
  }
  //    printf("sd_write_value size is %d\n",sd_write_value.size());
  printf("Writing to Sd card...\n");
  FILE* fd = fopen("/sd/mydir/out.txt", "w+");
  errno_error(fd);
  for(int i=0; i<=positions.size(); i++) {
    if(i==0) {
      str2= sd_write_value.substr(0,positions[i]);
    } else if (i==positions.size()) {
      str2= sd_write_value.substr(positions[i-1]+2,sd_write_value.size());
    } else {
      str2= sd_write_value.substr(positions[i-1]+2,positions[i]-(positions[i-1]+2));
    }
    //  y=str2.c_str();
    //    char *y = &str2[0u];
    printf("here is the %d line: ",i);
    printf("%s\n",str2);
    fprintf(fd, "%s\n", str2);
  }
  fclose(fd);
  printf("Done");
}
void sd_read_open()
{
  string sum;
  printf("Reading file at /sd/mydir/in.txt\n");
  FILE *fp = fopen("/sd/mydir/in.txt", "r");
  char buffer [128];
  size_t i=0;
  while (!feof(fp)){
    bool ret =  (fgets(buffer, 64, fp)) ;
    if(ret)
    {
      sum.append(buffer);
      printf("Here is the %d line:",i);
      printf ("%s\n", buffer);
    }
    i++;
  }
  SDcard_read=sum;
  //  printf("Here is the sum: \n");
  //  printf("%s\n",sum);
  fclose(fp);
}

Thanks.

NUCLEO_F429ZI and CI-shield & ethernet - pin conflict

How do you handle card removal and reinsertion?

Hi Simon,

Thanks for your work on this library. I'm trying to use this in a project. It's mostly working, but I'm struggling with card removal and reinsertion. I'm using STM32L476VG and mbed 5.4.2 and sd-driver-0.0.3-mbed-os-5.4.1 and gcc 4.9. I have been running example1.cpp and variations. I want to use the posix file api and write text files to the card. My test is to call the body of example1.cpp in a loop, once every 5 seconds or so.

As long as the card is inserted it works but when I remove the card it often hangs. The rtos thread it's in is actually blocked sometimes for 60 seconds or more - sometimes it resumes and sometimes it doesn't.

What is the right way to test for or deal with card removal? Looking through various examples, the approach seems to be to try to open a file and check if the return handle is NULL.

FILE* fp = fopen(filename, mode);

Checking for NULL sometimes works. But sometimes even if the card is removed fp is not returned NULL. Also, if the card is removed, sometimes the test seems to hang inside the call to fopen(). I built the test in the online compiler using same mbed and sd-driver version and the same thing happens. Also tried 5.4.1 with the same result.

So my question is, what is the right way to detect and handle card removal and reinsertion? Is there something I should be doing when I encounter the first error to reset the state?

Thanks!

Can't compile with IAR against mbed-OS 5.6.0 RC1

One can't compile against the mbed OS 5.6.0 RC1.

09:47:56 [UBLOX_EVK_ODIN_W2_LWIP4 IAR] Compile [ 97.6%]: SDBlockDevice.cpp
09:47:56 [UBLOX_EVK_ODIN_W2_LWIP4 IAR] [Error] SDBlockDevice.cpp@152,3: [Pe018]: expected a ")"
09:47:56 [UBLOX_EVK_ODIN_W2_LWIP4 IAR] [Fatal Error] SDBlockDevice.cpp@153,0: [Pe035]: #error directive: "Incompatible mbed-os version detected! Required 5.5.4 and above"
09:47:57 [UBLOX_EVK_ODIN_W2_LWIP4 IAR] [ERROR] 
09:47:57 [UBLOX_EVK_ODIN_W2_LWIP4 IAR]   #if (MBED_VERSION < MBED_ENCODE_VERSION(5,5,4))
09:47:57 [UBLOX_EVK_ODIN_W2_LWIP4 IAR]        ^
09:47:57 [UBLOX_EVK_ODIN_W2_LWIP4 IAR] "C:\builds\ws\app_PR-545-PPVBV4HCVIU2SIBUWGKPS\mbed-client-testapp\sd-driver\SDBlockDevice.cpp",152  Error[Pe018]: expected a ")"
09:47:57 [UBLOX_EVK_ODIN_W2_LWIP4 IAR] 
09:47:57 [UBLOX_EVK_ODIN_W2_LWIP4 IAR]   #error "Incompatible mbed-os version detected! Required 5.5.4 and above"
09:47:57 [UBLOX_EVK_ODIN_W2_LWIP4 IAR]    ^
09:47:57 [UBLOX_EVK_ODIN_W2_LWIP4 IAR] "C:\builds\ws\app_PR-545-PPVBV4HCVIU2SIBUWGKPS\mbed-client-testapp\sd-driver\SDBlockDevice.cpp",153  Fatal error[Pe035]: #error directive: "Incompatible mbed-os version detected! Required 5.5.4 and above"
09:47:57 [UBLOX_EVK_ODIN_W2_LWIP4 IAR] Fatal error detected, aborting.

This needs to be fixed ASAP.

mbed-os.lib pointing to:

https://github.com/ARMmbed/mbed-os/#a4056fb8bf3ee10b8e037d332f8fbd0c68169ef1

Hardfaults occuring when using 5.6.1 sd-driver with IAR

Calling ftell, remove, and sometimes fopen causes the processor to hardfault. I have also noticed that when stepping through the disassembly and stepping into the mentioned file system functions, it is using the IAR compiled version of ftell and fopen. Is it possible that in my export of the project a missed macro allows for IAR to use its version of file system functions instead of using the mbed file system functions?

I should also add, that this occurs with ftell not on the first call to it, but subsequent calls. Remove seems to cause hardfaults on the first call to it.

Also, the mbed OS version is 5.6.5 and the sd driver is 5.6.1 not sure if the pairing of these versions would cause any issues when I export. I was under the assumption that library versions are all backwards compatible. Any help would be much appreciated.

Intermittent Data taking too long

Hi @deepikabhavnani
I am trying to write sensor data to SD card (approximately 150 bytes every 10 ms) in binary format (ex. data.bin file). The typical write time is less than 1 ms, but it is not uniform. With both DBG and CMD_Trace on, as you can see after about 5/6 cycles, I am getting a delay of approx 20ms (with debug print on) and about 5 ms without debug print.

Please do help me out in resolving this issue. I am using mbed-os-5.5.4 and sd-driver-0.1.1 as recommended.

The numbers are time stamps in ms (Cycle end time, Cycle start time, Cycle Wait time = 10ms - Processor run time) . The log file is attached
log_sd.txt

Seek test failing on K66F/GCC

All other tests pass except for the seek test.

mbedgt: test suite report:
+--------------+---------------+---------------------------------+--------+--------------------+-------------+
| target       | platform_name | test suite                      | result | elapsed_time (sec) | copy_method |
+--------------+---------------+---------------------------------+--------+--------------------+-------------+
| K66F-GCC_ARM | K66F          | sd-driver-tests-filesystem-seek | FAIL   | 65.13              | default     |
+--------------+---------------+---------------------------------+--------+--------------------+-------------+
mbedgt: test suite results: 1 FAIL
mbedgt: test case report:
+--------------+---------------+---------------------------------+----------------------------+--------+--------+---------+--------------------+
| target       | platform_name | test suite                      | test case                  | passed | failed | result  | elapsed_time (sec) |
+--------------+---------------+---------------------------------+----------------------------+--------+--------+---------+--------------------+
| K66F-GCC_ARM | K66F          | sd-driver-tests-filesystem-seek | Boundary seek and write    | 0      | 0      | SKIPPED | 0.0                |
| K66F-GCC_ARM | K66F          | sd-driver-tests-filesystem-seek | Large dir seek             | 0      | 0      | SKIPPED | 0.0                |
| K66F-GCC_ARM | K66F          | sd-driver-tests-filesystem-seek | Large file seek            | 0      | 0      | SKIPPED | 0.0                |
| K66F-GCC_ARM | K66F          | sd-driver-tests-filesystem-seek | Large file seek and write  | 0      | 0      | SKIPPED | 0.0                |
| K66F-GCC_ARM | K66F          | sd-driver-tests-filesystem-seek | Out-of-bounds seek         | 0      | 0      | SKIPPED | 0.0                |
| K66F-GCC_ARM | K66F          | sd-driver-tests-filesystem-seek | Seek tests                 | 1      | 0      | OK      | 49.48              |
| K66F-GCC_ARM | K66F          | sd-driver-tests-filesystem-seek | Simple dir seek            | 0      | 1      | FAIL    | 0.06               |
| K66F-GCC_ARM | K66F          | sd-driver-tests-filesystem-seek | Simple file seek           | 0      | 0      | SKIPPED | 0.0                |
| K66F-GCC_ARM | K66F          | sd-driver-tests-filesystem-seek | Simple file seek and write | 0      | 0      | SKIPPED | 0.0                |
+--------------+---------------+---------------------------------+----------------------------+--------+--------+---------+--------------------+
mbedgt: test case results: 1 FAIL / 7 SKIPPED / 1 OK
mbedgt: completed in 65.32 sec
mbedgt: exited with code 1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.