Error when using the SD card library

Hello,

I tried using the SD card library in Particle Build. However, whenever I try to flash an example, it gives me the following error.

“sd-card-library/sd2-card.cpp:764:5: error: ‘PIN_MAP’ was not declared in this scope
PIN_MAP[mosiPin_].gpio_peripheral->BSRR = PIN_MAP[mosiPin_].gpio_pin; // Data High”

A similar error appears for the clock pin. I am manually wiring the SEEED SD card shield to the Photon. I am pretty confident that I got the wiring right. Any help will be greatly appreciated :smile:

Is it possible the firmware is having issues with the PIN_MAP? I am on my phone, but I just saw a pinned topic about this.

I’m not really sure ? It doesn’t give me an error related to PIN_MAP(PIN_MAP[misoPin_].gpio_peripheral) ? I’m just going to try and rewire everything, just to make sure . I’m pretty new to this.

I think that error is a compiler error which would have nothing to do with the wiring.

Check out this thread:

Thanks !! I will look into that