Discuss here different C compiler set ups, and compiling executables for the ESP8266

User avatar
By MikeyMoMo
#70896
Code: Select allSD.remove("test.txt");

Z:\@Mikes Files\@Programming\@Arduino\@Sketches\@ESP8266 Sketches\Read_Write_Struct_Test\Read_Write_Struct_Test.ino:110:25: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

All of the web examples do it this way. Would like to get rid of the error message.

...or...

Code: Select allString STestFN = "test.txt";
SD.remove(STestFN);


The compiler no longer complains but the program crashes with:

ets Jan 8 2013,rst cause:4, boot mode:(1,6)

wdt reset

Same problem with SD.exists but not with SD.open

...so...

I changed to:
Code: Select all const char *STestFN = "test.txt";

and got:
Exception (29):
epc1=0x4000e177 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00001af9 depc=0x00000000

ctx: sys
sp: 3fff1870 end: 3fffffb0 offset: 01a0

Is there a fourth option that will make everyone happy?

Definitions I found (look so similar):
File SDClass::open(const char *filepath, uint8_t mode) {
boolean SDClass::remove(char *filepath) {
User avatar
By MikeyMoMo
#70907 Did all that was shown on this page: https://esp8266.github.io/Arduino/versi ... lling.html

Had to install Python 2.7 to do the last step. However...

Not much change. Still get the two errors initially posted but now the ESP8266 boot loops. Instead of crashing and staying there, it reboots and recrashes.

What else must I do to fix these two problems?
User avatar
By QuickFix
#70908
MikeyMoMo wrote:What else must I do to fix these two problems?

In theory nothing: after having installed the latest master, everything *should* work as expected.

You did select an ESP8266 board in "Tools" -> "Board: ..." and included SPI.h and SD.h to your code?

Maybe if you share some of your code (or create a new, small project to reproduce this error) we can have a look. :idea: