Good morning
I finished a project with my Arduino one to control a lot of LED on web using the IDE 1.0.5, and I found "freez problem" of the ethernet shield W1500 after an "x" amount of time.
After search, I found several solutions, and I wanted to practice them.
First, it seemed to understand that someone has solved the problem simply by filling out the code with IDE 1.5.8 which apparently would give greater stability to the ethernet shield.
So I decided to do just that as a first step, so looking for the solution less invasive and more immediate.
However I have a problem with the Flash library:
Initially I did not understand, then I opened a new sketch uploading the following code:
#include <Flash.h>
void setup() {
}
void loop() {
}
and proceeding to the compilation to see if it was a code problem or library. The result of the compilation is as follows:
Arduino:1.5.8 (Windows 8), Scheda:"Arduino Uno"
Uso la libreria Flash nella cartella: C:\Program Files (x86)\Arduino\libraries\Flash (legacy)
C:\Program Files (x86)\Arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=158 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard -IC:\Program Files (x86)\Arduino\libraries\Flash C:\Users\Nando\AppData\Local\Temp\build5853007934626543306.tmp\sketch_apr17b.cpp -o C:\Users\Nando\AppData\Local\Temp\build5853007934626543306.tmp\sketch_apr17b.cpp.o
In file included from sketch_apr17b.ino:1:0:
C:\Program Files (x86)\Arduino\libraries\Flash/Flash.h:70:23: error: 'prog_char' does not name a type
_FLASH_STRING(const prog_char *arr);
^
C:\Program Files (x86)\Arduino\libraries\Flash/Flash.h:70:34: error: ISO C++ forbids declaration of 'arr' with no type [-fpermissive]
_FLASH_STRING(const prog_char *arr);
^
C:\Program Files (x86)\Arduino\libraries\Flash/Flash.h:81:9: error: 'prog_char' does not name a type
const prog_char *access() const
^
C:\Program Files (x86)\Arduino\libraries\Flash/Flash.h:93:9: error: 'prog_char' does not name a type
const prog_char *_arr;
^
C:\Program Files (x86)\Arduino\libraries\Flash/Flash.h: In member function 'size_t _FLASH_STRING::length() const':
C:\Program Files (x86)\Arduino\libraries\Flash/Flash.h:73:21: error: '_arr' was not declared in this scope
{ return strlen_P(_arr); }
^
C:\Program Files (x86)\Arduino\libraries\Flash/Flash.h: In member function 'char* _FLASH_STRING::copy(char*, size_t, size_t) const':
C:\Program Files (x86)\Arduino\libraries\Flash/Flash.h:78:20: error: '_arr' was not declared in this scope
strcpy_P(to, _arr + offset) : strncpy_P(to, _arr + offset, size);
^
In file included from C:\Program Files (x86)\Arduino\libraries\Flash/Flash.h:23:0,
from sketch_apr17b.ino:1:
C:\Program Files (x86)\Arduino\libraries\Flash/Flash.h: In member function 'char _FLASH_STRING::operator[](int) const':
C:\Program Files (x86)\Arduino\libraries\Flash/Flash.h:88:44: error: '_arr' was not declared in this scope
{ return static_cast<char>(pgm_read_byte(_arr + index)); }
^
In file included from sketch_apr17b.ino:1:0:
C:\Program Files (x86)\Arduino\libraries\Flash/Flash.h: At global scope:
C:\Program Files (x86)\Arduino\libraries\Flash/Flash.h:183:29: error: 'prog_char' does not name a type
_FLASH_STRING_ARRAY(const prog_char **arr, size_t count) : _arr(arr), _size(count)
^
C:\Program Files (x86)\Arduino\libraries\Flash/Flash.h:183:41: error: ISO C++ forbids declaration of 'arr' with no type [-fpermissive]
_FLASH_STRING_ARRAY(const prog_char **arr, size_t count) : _arr(arr), _size(count)
^
C:\Program Files (x86)\Arduino\libraries\Flash/Flash.h:203:9: error: 'prog_char' does not name a type
const prog_char **_arr;
^
C:\Program Files (x86)\Arduino\libraries\Flash/Flash.h: In constructor '_FLASH_STRING_ARRAY::_FLASH_STRING_ARRAY(const int**, size_t)':
C:\Program Files (x86)\Arduino\libraries\Flash/Flash.h:183:62: error: class '_FLASH_STRING_ARRAY' does not have any field named '_arr'
_FLASH_STRING_ARRAY(const prog_char **arr, size_t count) : _arr(arr), _size(count)
^
C:\Program Files (x86)\Arduino\libraries\Flash/Flash.h: In member function '_FLASH_STRING _FLASH_STRING_ARRAY::operator[](int) const':
C:\Program Files (x86)\Arduino\libraries\Flash/Flash.h:190:26: error: '_arr' was not declared in this scope
{ return _FLASH_STRING(_arr[index]); }
^
C:\Program Files (x86)\Arduino\libraries\Flash/Flash.h: In member function 'virtual void _FLASH_STRING_ARRAY::print(Print&) const':
C:\Program Files (x86)\Arduino\libraries\Flash/Flash.h:196:25: error: '_arr' was not declared in this scope
_FLASH_STRING str(_arr[i]);
^
Errore durante la compilazione
Can anyone tell me the meaning of these lines, why this type of error, and if necessary what can be the solution ???
Thank you all
Ferdinando Coletta