Reading from a SDCard

Working libraries, libraries being ported and related hardware
Post Reply
castortiu
Posts: 39
Joined: Tue Nov 07, 2017 8:34 am
Location: Seattle, WA

Reading from a SDCard

Post by castortiu » Wed Nov 08, 2017 10:42 am

I'm trying to run any example from the folder ..\STM32SD\examples to work with SD Cards and all of them fail to compile with error

In file included from C:\Users\gusta\Documents\Arduino\libraries\STM32SD\src/Sd2Card.h:40:0,
from C:\Users\gusta\Documents\Arduino\libraries\STM32SD\src/STM32SD.h:22,
from C:\Users\gusta\Documents\Arduino\libraries\STM32SD\examples\listfiles\listfiles.ino:13:
C:\Users\gusta\Documents\Arduino\libraries\STM32SD\src/bsp_sd.h:47:21: fatal error: sd_conf.h: No such file or directory
#include "sd_conf.h"
^
compilation terminated.
Using library STM32SD at version 1.0.0 in folder: C:\Users\gusta\Documents\Arduino\libraries\STM32SD
exit status 1
Error compiling for board Generic STM32F103C series.

What I'm missing? I was looking around for the file sd_conf.h however looks like it is available only for the DISCO_F746NG

stevestrong
Posts: 1813
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: Reading from a SDCard

Post by stevestrong » Wed Nov 08, 2017 12:17 pm

For the STM32SD library you have to use the STM32DUINO core: https://github.com/stm32duino/Arduino_Core_STM32.

Otherwise, for the libmaple core, most people use the SdFat lib from Greiman: https://github.com/greiman/SdFat

fpiSTM
Posts: 245
Joined: Fri Sep 16, 2016 12:33 pm
Location: Le Mans, France

Re: Reading from a SDCard

Post by fpiSTM » Wed Nov 08, 2017 12:56 pm

The STM32SD is for on board card slot (ex: DISCO F746NG has this card slot).
For SD card slot available on a shield (via SPI) use the official SD from Arduino

castortiu
Posts: 39
Joined: Tue Nov 07, 2017 8:34 am
Location: Seattle, WA

Re: Reading from a SDCard

Post by castortiu » Wed Nov 08, 2017 1:55 pm

Thanks!!!

Post Reply