I trying to learn Bitlash to make a websever, storing pages on a SD card. Currently I am working on bitlashsd at the moment to understand SD using bitlash. I'm getting the following errors:
bitlash\bitlash.cpp.o: In function scriptfileexists': C:\arduino-1.0.1\libraries\bitlash\/src/bitlash-instream.c:50: multiple definition of scriptfileexists(char*)'
bitlashsd.cpp.o:C:\Users\jim\AppData\Local\Temp\build8548542757815330962.tmp/bitlashsd.cpp:142: first defined here
bitlashsd.cpp.o: In function setup': bitlashsd.cpp:(.text.setup+0x40): undefined reference to sdcat()'
bitlashsd.cpp:(.text.setup+0x42): undefined reference to sdcat()' bitlashsd.cpp:(.text.setup+0x64): undefined reference to func_fprintf()'
bitlashsd.cpp:(.text.setup+0x66): undefined reference to func_fprintf()' bitlashsd.cpp.o: In function sdappend()':
bitlashsd.cpp:(.text._Z8sdappendv+0x40): undefined reference to `sdwrite(char*, char*, unsigned char)'
I'm using the SDFat library referred in the documentation and the Sd card on an ethernet shield with a Mega 2560.
I wonder if you did this little necessary surgery described at the top of the bitlashsd sketch:
- Edit bitlash/src/bitlash.h to turn on the SDFILE define: at or near line 340, make this:
//#define SDFILE
look like this:
#define SDFILE
- If you are using a Mega2560, edit SdFat/SdFatConfig.h @ line 85, make this change:
#define MEGA_SOFT_SPI 1
If you haven't already, try that and report back on whether your compile works better...
Best luck with your project!
-br
PS: Update. OOPS: The define needs to be enabled, not disabled. I've fixed fix the doc bug and have amended the text above. For avoidance of doubt, please make line 340 look like:
billroy:
PS: Update. OOPS: The define needs to be enabled, not disabled. I've fixed fix the doc bug and have amended the text above. For avoidance of doubt, please make line 340 look like:
/quote]
The OOPS did the trick! Thanks! Great Language, but for a old dummy like probably a steep learning curve.
The program runs and it will display the directory. I have a file called sdtest.txt on the sd, but type sd.test.txt or exists sdtest.txt both return a dashed line then missing arg.