• Actually I just had a few minutes free so I added this.

    You won't be able to specify software SPI via the BOARD.py file, but you can do it in JavaScript:

    var spi = new SPI();
    spi.setup({mosi:C7,miso:C8,sck:C9});
    E.connectSDCard(spi,C6);
    console.log(require("fs").readdirSync());
    
  • Oh wow, that totally works. Quick test on a random sd card I have.

    >var spi = new SPI();
    ={  }
    >spi.setup({mosi:D2,miso:C8,sck:C12});
    =undefined
    >E.connectSDCard(spi,C11);
    =undefined
    >console.log(require("fs").readdirSync())­;
    [
      "debug",
      "dtbs",
      "MLO",
      "u-boot.img",
      "zImage",
      "initrd.img",
      "uEnv.txt",
      "ID.txt",
      "SOC.sh",
      "flash-eMMC.txt",
      "App",
      "Drivers",
      "Docs",
      "scripts",
      "autorun.inf",
      "LICENSE.txt",
      "README.htm",
      "README.md",
      "START.htm",
      "uInitrd"
     ]
    =undefined
    Uncaught SyntaxError: Got ?[173] expected EOF
     at line 1 col 41
    console.log(require("fs").readdirSync())­;
    
    
    >console.log(require("fs").readFile("autorun.inf"));
    [Autorun]
    shellexecute=START.htm
    icon=Docs\beagle.ico
    label=BeagleBone Getting Started
    action=Open BeagleBone Getting Started Guide
    [DeviceInstall]
    DriverPath=Drivers\Windows\FTDI
    DriverPath=Drivers\Windows\RNDIS
    =undefined
    > 
    

    Not sure if that Syntaxerror is anything of note, but it does work. Just built it for the 32F4DISCOVERY since my other board isn't on hand.

      'SD' :  { 'pin_cs' :  'C11',
                'pin_di' :  'D2',
                'pin_do' :  'C8',
                'pin_clk' :  'C12' },
    

    It didn't like the USE_FILESYSTEM define without at least having the pins declared in the board.py

    That's great though. I'm sure it'll help a lot of people out.

    We're still bound and determined to get the SDIO library working. We have it at least compiling for the Discovery, whether it actually works I dunno yet, going to try that out next.

About

Avatar for CKnight @CKnight started