arendst / Sonoff-MQTT-OTA

Provide ESP8266 based itead Sonoff with MQTT and OTA firmware - Now EOL
202 stars 47 forks source link

TDEBUG = 1 #2

Closed PaulvS closed 8 years ago

PaulvS commented 8 years ago

Hi Theo,

I'm using the latest state of your firmware (0.5.4) and I'm trying to set the serial debugging output. I change TDEBUG to 1 in user_config.h and issue a make command. Make fails with the following error message:

CC -c ./user/user_main.c -o .objs/user_main.o
In file included from ../../esp-sdk/include/osapi.h:9:0,
                 from ./user/user_main.c:8:
./user/user_config.h:4:0: error: "TDEBUG" redefined [-Werror]
 #define TDEBUG              1  // 0 = No serial debug info, 1 = Serial debug info
 ^
In file included from ./user/user_main.c:7:0:
modules/uart.h:9:0: note: this is the location of the previous definition
 #define TDEBUG 0
 ^
cc1: all warnings being treated as errors
make: *** [.objs/user_main.o] Error 1

I had to remove a couple of rows in uart.h to make the firmware without problems:

#ifndef TDEBUG
#define TDEBUG 0
#endif
arendst commented 8 years ago

Caused by second call to user_config.h. Fixed.