I'm working on a project to host a small web page and communicate with a sprinkler via AJAX. The example I'm working from uses the TinyWebServer library (https://github.com/ovidiucp/TinyWebServer).
There is an example in that library called WebServerSD, which has some configurations to serve files from the SD containing html/js/css etc. This example uses the Flash.h library.
When I compile the example with no modifications I get this error:
BTW someone else posted this same issue last year January but no responses (http://forum.pjrc.com/threads/16951-T3-compile-error-flash-library)
The offending line from Flash.h appears to be this one (a few before and after):
Now I have seen lots of discussion about discrepancies between AVR and ARM C native types such as char, int etc, but am having trouble mapping the various things I've read to this particular problem.
It seems like Flash is a super common Arduino library, I'm wondering if there's already an ARMified Teensified version of it somewhere, but I didn't see it in the installer or any searching I've done. Also, bad luck, the original location of the Flash library http://arduiniana.org/libraries/flash/ is down at the moment, maybe there's an Arduino Due version that would just work?
Any thoughts? Just soldered up my T3.1 and Wiznet820io boards last night and eager to stop having out of memory crashes from the UNO, but not so happy to replace those with incompatibility errors here. Could have got a Teensy2 but took the chance, hopefully it can work!
TIA
There is an example in that library called WebServerSD, which has some configurations to serve files from the SD containing html/js/css etc. This example uses the Flash.h library.
When I compile the example with no modifications I get this error:
Code:
In file included from WebServerSD.ino:10:0:
C:\Users\X\Arduino\libraries\Flash/Flash.h: In member function 'char* _FLASH_STRING::copy(char*, size_t, size_t) const':
C:\Users\X\Arduino\libraries\Flash/Flash.h:78:37: error: operands to ?: have different types 'char*' and 'int'
BTW someone else posted this same issue last year January but no responses (http://forum.pjrc.com/threads/16951-T3-compile-error-flash-library)
The offending line from Flash.h appears to be this one (a few before and after):
Code:
/* _FLASH_STRING class. Use the FLASH_STRING() macro to create these, or use inline F() macro. */
class _FLASH_STRING : public _Printable
{
public:
_FLASH_STRING(const prog_char *arr);
size_t length() const
{ return strlen_P(_arr); }
char *copy(char *to, size_t size = -1, size_t offset = 0) const
{
return size == -1 ?
strcpy_P(to, _arr + offset) : strncpy_P(to, _arr + offset, size); [B]<< Error points to this line[/B]
}
const prog_char *access() const
{ return _arr; }
const _Printable &Printable() const
{ return *this; }
char operator[](int index) const
{ return static_cast<char>(pgm_read_byte(_arr + index)); }
void print(Print &stream) const;
private:
const prog_char *_arr;
};
Now I have seen lots of discussion about discrepancies between AVR and ARM C native types such as char, int etc, but am having trouble mapping the various things I've read to this particular problem.
It seems like Flash is a super common Arduino library, I'm wondering if there's already an ARMified Teensified version of it somewhere, but I didn't see it in the installer or any searching I've done. Also, bad luck, the original location of the Flash library http://arduiniana.org/libraries/flash/ is down at the moment, maybe there's an Arduino Due version that would just work?
Any thoughts? Just soldered up my T3.1 and Wiznet820io boards last night and eager to stop having out of memory crashes from the UNO, but not so happy to replace those with incompatibility errors here. Could have got a Teensy2 but took the chance, hopefully it can work!
TIA