Should the Arduino SD.h library function correctly with the DXCore? #216
Replies: 3 comments
-
This may or may not help, but I'm using this SD library: https://github.com/greiman/SdFat So far is working well with my AVR128DA48 board. Pretty much the only thing I had to do was set the CS pin and choose the right FAT type. |
Beta Was this translation helpful? Give feedback.
-
I've got a PR in that fixes the official SD library to work correctly with Dx-series, tinyAVR 0/1/2-series and megaAVR 0-series, as well as all parts likely to be released in the forseeable future |
Beta Was this translation helpful? Give feedback.
-
Here's the simple change: |
Beta Was this translation helpful? Give feedback.
-
I'm trying to use the DXCore with an AVR128DB64 to read data from an SD card. The SD.h library works OK on an original UNO, but on the DXCore I'm getting errors just by including SD.h and not doing anything with it, as in:
In file included from C:\Program Files (x86)\Arduino\libraries\SD\src/utility/Sd2Card.h:26:0, from C:\Program Files (x86)\Arduino\libraries\SD\src/utility/SdFat.h:29, from C:\Program Files (x86)\Arduino\libraries\SD\src/SD.h:20, from p:\Users\p\Documents\Arduino\spi-DB64-test-211220-01\spi-DB64-test-211220-01.ino:2: C:\Program Files (x86)\Arduino\libraries\SD\src/utility/Sd2PinMap.h:438:5: error: 'DDRD' was not declared in this scope {&DDRD, &PIND, &PORTD, 0}, // D0 0 ^~~~ C:\Program Files (x86)\Arduino\libraries\SD\src/utility/Sd2PinMap.h:438:5: note: suggested alternative: 'VDD' {&DDRD, &PIND, &PORTD, 0}, // D0 0 ^~~~ VDD C:\Program Files (x86)\Arduino\libraries\SD\src/utility/Sd2PinMap.h:438:12: error: 'PIND' was not declared in this scope {&DDRD, &PIND, &PORTD, 0}, // D0 0 ^~~~ C:\Program Files (x86)\Arduino\libraries\SD\src/utility/Sd2PinMap.h:438:12: note: suggested alternative: 'PIN0' {&DDRD, &PIND, &PORTD, 0}, // D0 0 ^~~~ PIN0
and so on. I'm guessing that whatever the problem may be, it's a problem with the SD.h library and not the DXCore, but I'd be grateful if someone knowledgeable on the subject can confirm that it's a problem within the SD.h library.
Thanks,
Paul
Beta Was this translation helpful? Give feedback.
All reactions