我正尝试从esp8266开始,为此,我点击了以下链接:https://www.youtube.com/watch?v=AEWoeL1hH2I
在35:22,它构建了代码,但出现错误。这是我的代码。我正在使用ubuntu.using sdk。我试图检查头文件错误但没有用。
#include "osapi.h"
#include "user_interface.h"
#include "pwm.h"
#include "uart.h"
#include "mem.h"
#include "espmissingincludes.h"
void systemInitDoneCB() {
os_printf("Hello!\n");
}
void user_init() {
uart_init_2(115200, 115200);
system_init_done_cb(systemInitDoneCB);
}
我的错误是:
enter code here23:07:33 **** Build of configuration Default for
project Sample ESP8266 App ****
make all
xtensa-lx106-elf-gcc -Wimplicit-function-declaration -fno-inline-
functions -mlongcalls -mtext-section-literals -mno-serialize-volatile
-I/home/maitrayi/esp8266/esp-open-sdk/sdk/include -I. -D__ETS__ -
DICACHE_FLASH -DXTENSA -DUSE_US_TIMER -c user_main.c
In file included from user_main.c:6:0:
espmissingincludes.h:37:6: error: conflicting types for
'ets_install_putc1'
Makefile:34: recipe for target 'user_main.o' failed
void ets_install_putc1(void *routine); // necessary for #define os_xxx
-> ets_xxx
^
In file included from user_main.c:1:0:
/home/maitrayi/esp8266/esp-open-sdk/sdk/include/osapi.h:34:6:
^
In file included from user_main.c:6:0:
espmissingincludes.h:87:6: error: conflicting types for 'uart_div_modify'
void uart_div_modify(int no, unsigned int freq);
^
In file included from user_main.c:2:0:
/home/maitrayi/esp8266/esp-open-sdk/sdk/include/user_interface.h:652:6: note: previous declaration of 'uart_div_modify' was here
void uart_div_modify(uint8 uart_no, uint32 DivLatchValue);
^
In file included from user_main.c:6:0:
espmissingincludes.h:91:6: error: conflicting types for 'ets_delay_us'
void ets_delay_us(int ms);
^
In file included from user_main.c:1:0:
/home/maitrayi/esp8266/esp-open-sdk/sdk/include/osapi.h:33:6: note: previous declaration of 'ets_delay_us' was here
void ets_delay_us(uint16_t us);
^
make: *** [user_main.o] Error 1
"make all" terminated with exit code 2. Build might be incomplete.