Here is one problem that I encountered during testing the espressif RTOS SDK v1.4
I program the user_main.c in the project as shown below, but I don't know why shows these
kinds of wrong messages, because I only include esp_sta.h file , what's problem ?
start...
make -C user clean; make -C sample_lib clean;
make[1]: Entering directory `/home/esp8266/ESP8266_RTOS_SDK_V1.4.0/practice/user'
rm -f -r .output/eagle/debug
make[1]: Leaving directory `/home/esp8266/ESP8266_RTOS_SDK_V1.4.0/practice/user'
make[1]: Entering directory `/home/esp8266/ESP8266_RTOS_SDK_V1.4.0/practice/sample_lib'
make -C folder1 clean; make -C folder2 clean;
make[2]: Entering directory `/home/esp8266/ESP8266_RTOS_SDK_V1.4.0/practice/sample_lib/folder1'
rm -f -r .output/eagle/debug
make[2]: Leaving directory `/home/esp8266/ESP8266_RTOS_SDK_V1.4.0/practice/sample_lib/folder1'
make[2]: Entering directory `/home/esp8266/ESP8266_RTOS_SDK_V1.4.0/practice/sample_lib/folder2'
rm -f -r .output/eagle/debug
make[2]: Leaving directory `/home/esp8266/ESP8266_RTOS_SDK_V1.4.0/practice/sample_lib/folder2'
rm -f -r .output/eagle/debug
make[1]: Leaving directory `/home/esp8266/ESP8266_RTOS_SDK_V1.4.0/practice/sample_lib'
rm -f -r .output/eagle/debug
make[1]: Entering directory `/home/esp8266/ESP8266_RTOS_SDK_V1.4.0/practice/user'
DEPEND: xtensa-lx106-elf-gcc -M -Os -g -Wpointer-arith -Wundef -Werror -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections -DICACHE_FLASH -I include -I ./ -I ../include -I /home/esp8266/ESP8266_RTOS_SDK_V1.4.0//include -I /home/esp8266/ESP8266_RTOS_SDK_V1.4.0//extra_include -I /home/esp8266/ESP8266_RTOS_SDK_V1.4.0//include/espressif -I /home/esp8266/ESP8266_RTOS_SDK_V1.4.0//include/lwip -I /home/esp8266/ESP8266_RTOS_SDK_V1.4.0//include/lwip/ipv4 -I /home/esp8266/ESP8266_RTOS_SDK_V1.4.0//include/lwip/ipv6 -I /home/esp8266/ESP8266_RTOS_SDK_V1.4.0//include/nopoll -I /home/esp8266/ESP8266_RTOS_SDK_V1.4.0//include/spiffs -I /home/esp8266/ESP8266_RTOS_SDK_V1.4.0//include/ssl -I /home/esp8266/ESP8266_RTOS_SDK_V1.4.0//include/json user_main.c
make[1]: Leaving directory `/home/esp8266/ESP8266_RTOS_SDK_V1.4.0/practice/user'
make[1]: Entering directory `/home/esp8266/ESP8266_RTOS_SDK_V1.4.0/practice/user'
xtensa-lx106-elf-gcc -Os -g -Wpointer-arith -Wundef -Werror -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections -DICACHE_FLASH -I include -I ./ -I ../include -I /home/esp8266/ESP8266_RTOS_SDK_V1.4.0//include -I /home/esp8266/ESP8266_RTOS_SDK_V1.4.0//extra_include -I /home/esp8266/ESP8266_RTOS_SDK_V1.4.0//include/espressif -I /home/esp8266/ESP8266_RTOS_SDK_V1.4.0//include/lwip -I /home/esp8266/ESP8266_RTOS_SDK_V1.4.0//include/lwip/ipv4 -I /home/esp8266/ESP8266_RTOS_SDK_V1.4.0//include/lwip/ipv6 -I /home/esp8266/ESP8266_RTOS_SDK_V1.4.0//include/nopoll -I /home/esp8266/ESP8266_RTOS_SDK_V1.4.0//include/spiffs -I /home/esp8266/ESP8266_RTOS_SDK_V1.4.0//include/ssl -I /home/esp8266/ESP8266_RTOS_SDK_V1.4.0//include/json -o .output/eagle/debug/obj/user_main.o -c user_main.c
In file included from user_main.c:26:0:
/home/esp8266/ESP8266_RTOS_SDK_V1.4.0//include/espressif/esp_sta.h:53:5: error: unknown type name 'uint8'
uint8 ssid[32]; /**< SSID of target AP*/
^
/home/esp8266/ESP8266_RTOS_SDK_V1.4.0//include/espressif/esp_sta.h:54:5: error: unknown type name 'uint8'
uint8 password[64]; /**< password of target AP*/
^
/home/esp8266/ESP8266_RTOS_SDK_V1.4.0//include/espressif/esp_sta.h:55:5: error: unknown type name 'uint8'
uint8 bssid_set; /**< whether set MAC address of target AP or not. Generally, station_config.bssid_set needs to be 0; and it needs to be 1 only when users need to check the MAC address of the AP.*/
^
In file included from user_main.c:26:0:
/home/esp8266/ESP8266_RTOS_SDK_V1.4.0//include/espressif/esp_sta.h:56:5: error: unknown type name 'uint8'
uint8 bssid[6]; /**< MAC address of target AP*/
^
/home/esp8266/ESP8266_RTOS_SDK_V1.4.0//include/espressif/esp_sta.h:67:1: error: unknown type name 'bool'
bool wifi_station_get_config(struct station_config *config);
^
/home/esp8266/ESP8266_RTOS_SDK_V1.4.0//include/espressif/esp_sta.h:77:1: error: unknown type name 'bool'
bool wifi_station_get_config_default(struct station_config *config);
^
/home/esp8266/ESP8266_RTOS_SDK_V1.4.0//include/espressif/esp_sta.h:96:1: error: unknown type name 'bool'
bool wifi_station_set_config(struct station_config *config);
^
/home/esp8266/ESP8266_RTOS_SDK_V1.4.0//include/espressif/esp_sta.h:116:1: error: unknown type name 'bool'
bool wifi_station_set_config_current(struct station_config *config);
^
/home/esp8266/ESP8266_RTOS_SDK_V1.4.0//include/espressif/esp_sta.h:130:1: error: unknown type name 'bool'
bool wifi_station_connect(void);
^
/home/esp8266/ESP8266_RTOS_SDK_V1.4.0//include/espressif/esp_sta.h:143:1: error: unknown type name 'bool'
bool wifi_station_disconnect(void);
^
/home/esp8266/ESP8266_RTOS_SDK_V1.4.0//include/espressif/esp_sta.h:146:5: error: unknown type name 'uint8'
uint8 *ssid; /**< SSID of AP */
^
/home/esp8266/ESP8266_RTOS_SDK_V1.4.0//include/espressif/esp_sta.h:147:5: error: unknown type name 'uint8'
uint8 *bssid; /**< MAC address of AP */
^
/home/esp8266/ESP8266_RTOS_SDK_V1.4.0//include/espressif/esp_sta.h:148:5: error: unknown type name 'uint8'
uint8 channel; /**< channel, scan the specific channel */
^
/home/esp8266/ESP8266_RTOS_SDK_V1.4.0//include/espressif/esp_sta.h:149:5: error: unknown type name 'uint8'
uint8 show_hidden; /**< enable to scan AP whose SSID is hidden */
^
/home/esp8266/ESP8266_RTOS_SDK_V1.4.0//include/espressif/esp_sta.h:155:5: error: unknown type name 'uint8'
uint8 bssid[6]; /**< MAC address of AP */
^
/home/esp8266/ESP8266_RTOS_SDK_V1.4.0//include/espressif/esp_sta.h:156:5: error: unknown type name 'uint8'
uint8 ssid[32]; /**< SSID of AP */
^
/home/esp8266/ESP8266_RTOS_SDK_V1.4.0//include/espressif/esp_sta.h:157:5: error: unknown type name 'uint8'
uint8 ssid_len; /**< SSID length */
^
/home/esp8266/ESP8266_RTOS_SDK_V1.4.0//include/espressif/esp_sta.h:158:5: error: unknown type name 'uint8'
uint8 channel; /**< channel of AP */
^
/home/esp8266/ESP8266_RTOS_SDK_V1.4.0//include/espressif/esp_sta.h:159:5: error: unknown type name 'sint8'
sint8 rssi; /**< single strength of AP */
^
/home/esp8266/ESP8266_RTOS_SDK_V1.4.0//include/espressif/esp_sta.h:160:5: error: unknown type name 'AUTH_MODE'
AUTH_MODE authmode; /**< authmode of AP */
^
/home/esp8266/ESP8266_RTOS_SDK_V1.4.0//include/espressif/esp_sta.h:161:5: error: unknown type name 'uint8'
uint8 is_hidden; /**< SSID of current AP is hidden or not. */
^
/home/esp8266/ESP8266_RTOS_SDK_V1.4.0//include/espressif/esp_sta.h:162:5: error: unknown type name 'sint16'
sint16 freq_offset; /**< frequency offset */
^
/home/esp8266/ESP8266_RTOS_SDK_V1.4.0//include/espressif/esp_sta.h:163:5: error: unknown type name 'sint16'
sint16 freqcal_val;
^
/home/esp8266/ESP8266_RTOS_SDK_V1.4.0//include/espressif/esp_sta.h:164:5: error: unknown type name 'uint8'
uint8 *esp_mesh_ie;
^
/home/esp8266/ESP8266_RTOS_SDK_V1.4.0//include/espressif/esp_sta.h:176:44: error: unknown type name 'STATUS'
typedef void (* scan_done_cb_t)(void *arg, STATUS status);
^
/home/esp8266/ESP8266_RTOS_SDK_V1.4.0//include/espressif/esp_sta.h:190:1: error: unknown type name 'bool'
bool wifi_station_scan(struct scan_config *config, scan_done_cb_t cb);
^
/home/esp8266/ESP8266_RTOS_SDK_V1.4.0//include/espressif/esp_sta.h:190:52: error: unknown type name 'scan_done_cb_t'
bool wifi_station_scan(struct scan_config *config, scan_done_cb_t cb);
^
/home/esp8266/ESP8266_RTOS_SDK_V1.4.0//include/espressif/esp_sta.h:201:1: error: unknown type name 'bool'
bool wifi_station_get_auto_connect(void);
^
/home/esp8266/ESP8266_RTOS_SDK_V1.4.0//include/espressif/esp_sta.h:219:1: error: unknown type name 'bool'
bool wifi_station_set_auto_connect(bool set);
^
/home/esp8266/ESP8266_RTOS_SDK_V1.4.0//include/espressif/esp_sta.h:219:36: error: unknown type name 'bool'
bool wifi_station_set_auto_connect(bool set);
^
/home/esp8266/ESP8266_RTOS_SDK_V1.4.0//include/espressif/esp_sta.h:229:1: error: unknown type name 'bool'
bool wifi_station_get_reconnect_policy(void);
^
/home/esp8266/ESP8266_RTOS_SDK_V1.4.0//include/espressif/esp_sta.h:243:1: error: unknown type name 'bool'
bool wifi_station_set_reconnect_policy(bool set);
^
/home/esp8266/ESP8266_RTOS_SDK_V1.4.0//include/espressif/esp_sta.h:243:40: error: unknown type name 'bool'
bool wifi_station_set_reconnect_policy(bool set);
^
/home/esp8266/ESP8266_RTOS_SDK_V1.4.0//include/espressif/esp_sta.h:270:1: error: unknown type name 'uint8'
uint8 wifi_station_get_current_ap_id(void);
^
/home/esp8266/ESP8266_RTOS_SDK_V1.4.0//include/espressif/esp_sta.h:280:1: error: unknown type name 'bool'
bool wifi_station_ap_change(uint8 current_ap_id);
^
/home/esp8266/ESP8266_RTOS_SDK_V1.4.0//include/espressif/esp_sta.h:280:29: error: unknown type name 'uint8'
bool wifi_station_ap_change(uint8 current_ap_id);
^
/home/esp8266/ESP8266_RTOS_SDK_V1.4.0//include/espressif/esp_sta.h:294:1: error: unknown type name 'bool'
bool wifi_station_ap_number_set(uint8 ap_number);
^
/home/esp8266/ESP8266_RTOS_SDK_V1.4.0//include/espressif/esp_sta.h:294:33: error: unknown type name 'uint8'
bool wifi_station_ap_number_set(uint8 ap_number);
^
/home/esp8266/ESP8266_RTOS_SDK_V1.4.0//include/espressif/esp_sta.h:309:1: error: unknown type name 'uint8'
uint8 wifi_station_get_ap_info(struct station_config config[]);
^
/home/esp8266/ESP8266_RTOS_SDK_V1.4.0//include/espressif/esp_sta.h:319:1: error: unknown type name 'sint8'
sint8 wifi_station_get_rssi(void);
^
/home/esp8266/ESP8266_RTOS_SDK_V1.4.0//include/espressif/esp_sta.h:335:1: error: unknown type name 'bool'
bool wifi_station_dhcpc_start(void);
^
/home/esp8266/ESP8266_RTOS_SDK_V1.4.0//include/espressif/esp_sta.h:351:1: error: unknown type name 'bool'
bool wifi_station_dhcpc_stop(void);
^
/home/esp8266/ESP8266_RTOS_SDK_V1.4.0//include/espressif/esp_sta.h:370:1: error: unknown type name 'bool'
bool wifi_station_set_hostname(char *name);
^
make[1]: *** [.output/eagle/debug/obj/user_main.o] Error 1
make[1]: Leaving directory `/home/esp8266/ESP8266_RTOS_SDK_V1.4.0/practice/user'
make: *** [.subdirs] Error 2
esp8266@esp8266-VirtualBox:~/ESP8266_RTOS_SDK_V1.4.0/practice$
#include <stdio.h>
#include <stdlib.h>
#include "esp_sta.h"
#include "esp_common.h"
//#define DEMO_AP_SSID "DEMO_AP"
//#define DEMO_AP_PASSWORD "12345678"
//#define WIFI_BSSID 0
/******************************************************************************
* FunctionName : user_init
* Description : entry of user application, init user function here
* Parameters : none
* Returns : none
17,2 47%
*******************************************************************************/
/*
struct station_config *config = (struct station_config *)zalloc(sizeof(struct station_config));
sprintf(config->bssid_set,WIFI_BSSID);
sprintf(config->password,DEMO_AP_PASSWORD);
sprintf(config->ssid,DEMO_AP_SSID);
wifi_station_set_config(config);
free(config);
wifi_station_connect();
*/
void user_init(void)
{
printf("SDK version:%s\n", system_get_sdk_version());
printf("ESP8266 chip ID:0x%x\n", system_get_chip_id());
wifi_set_opmode(STATION_MODE);
}Statistics: Posted by PaulTsai111 — Thu May 19, 2016 5:10 pm
]]>