Hi Espressif:
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);
}
Espressif RTOS SDK programming problems
-
- Posts: 48
- Joined: Wed May 04, 2016 7:32 pm
Re: Espressif RTOS SDK programming problems
Postby ESP_Faye » Mon May 23, 2016 7:51 pm
Hi,
Please have a try with the attachment.
1. Download and unzip the attachment.
2. Change the directory in \project_template\gen_misc.sh to be your actual SDK and bin folder's directory
3. Compile the project_template folder using command "./gen_misc.sh".
Thanks for your interest in ESP8266 !
Please have a try with the attachment.
1. Download and unzip the attachment.
2. Change the directory in \project_template\gen_misc.sh to be your actual SDK and bin folder's directory
Code: Select all
export SDK_PATH=~/Share/ESP8266_RTOS_SDK_V1.4.0
export BIN_PATH=~/Share/ESP8266_RTOS_SDK_V1.4.0/bin
3. Compile the project_template folder using command "./gen_misc.sh".
Thanks for your interest in ESP8266 !
- Attachments
-
- ESP8266_RTOS_Test.zip
- (5.77 MiB) Downloaded 375 times
Who is online
Users browsing this forum: No registered users and 235 guests
Login
Newbies Start Here
Are you new to ESP8266?
Unsure what to do?
Dunno where to start?
Start right here!
Latest SDK
Documentation
Complete listing of the official ESP8266 related documentation release by ESPRESSIF!
Must read here!
- All times are UTC+08:00
- Top
- Delete all board cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. We are the manufacturer of ESP8266EX.