mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-05-21 00:56:38 +08:00
sync codes from non-os version 1.1.0, this is BBP initial version, os version 1.0.0!
***internal version b8a2c0c3***
This commit is contained in:
130
Makefile
130
Makefile
@ -24,7 +24,7 @@ BOOT?=none
|
||||
APP?=0
|
||||
SPI_SPEED?=40
|
||||
SPI_MODE?=QIO
|
||||
SPI_SIZE?=512
|
||||
SPI_SIZE_MAP?=0
|
||||
|
||||
ifeq ($(BOOT), new)
|
||||
boot = new
|
||||
@ -75,56 +75,87 @@ else
|
||||
endif
|
||||
endif
|
||||
|
||||
# flash larger than 1024KB only use 1024KB to storage user1.bin and user2.bin
|
||||
ifeq ($(SPI_SIZE), 256)
|
||||
size = 1
|
||||
flash = 256
|
||||
else
|
||||
ifeq ($(SPI_SIZE), 1024)
|
||||
size = 2
|
||||
flash = 1024
|
||||
else
|
||||
ifeq ($(SPI_SIZE), 2048)
|
||||
size = 3
|
||||
flash = 1024
|
||||
else
|
||||
ifeq ($(SPI_SIZE), 4096)
|
||||
size = 4
|
||||
flash = 1024
|
||||
else
|
||||
size = 0
|
||||
flash = 512
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
addr = 0x01000
|
||||
|
||||
ifeq ($(flash), 512)
|
||||
ifeq ($(app), 1)
|
||||
addr = 0x01000
|
||||
else
|
||||
ifeq ($(app), 2)
|
||||
addr = 0x41000
|
||||
endif
|
||||
endif
|
||||
ifeq ($(SPI_SIZE_MAP), 1)
|
||||
size_map = 1
|
||||
flash = 256
|
||||
else
|
||||
ifeq ($(flash), 1024)
|
||||
ifeq ($(app), 1)
|
||||
addr = 0x01000
|
||||
else
|
||||
ifeq ($(SPI_SIZE_MAP), 2)
|
||||
size_map = 2
|
||||
flash = 1024
|
||||
ifeq ($(app), 2)
|
||||
addr = 0x81000
|
||||
endif
|
||||
else
|
||||
ifeq ($(SPI_SIZE_MAP), 3)
|
||||
size_map = 3
|
||||
flash = 2048
|
||||
ifeq ($(app), 2)
|
||||
addr = 0x81000
|
||||
endif
|
||||
else
|
||||
ifeq ($(SPI_SIZE_MAP), 4)
|
||||
size_map = 4
|
||||
flash = 4096
|
||||
ifeq ($(app), 2)
|
||||
addr = 0x81000
|
||||
endif
|
||||
else
|
||||
ifeq ($(SPI_SIZE_MAP), 5)
|
||||
size_map = 5
|
||||
flash = 2048
|
||||
ifeq ($(app), 2)
|
||||
addr = 0x101000
|
||||
endif
|
||||
else
|
||||
ifeq ($(SPI_SIZE_MAP), 6)
|
||||
size_map = 6
|
||||
flash = 4096
|
||||
ifeq ($(app), 2)
|
||||
addr = 0x101000
|
||||
endif
|
||||
else
|
||||
size_map = 0
|
||||
flash = 512
|
||||
ifeq ($(app), 2)
|
||||
addr = 0x41000
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
LD_FILE = $(LDDIR)/eagle.app.v6.ld
|
||||
|
||||
ifneq ($(boot), none)
|
||||
ifneq ($(app),0)
|
||||
LD_FILE = $(LDDIR)/eagle.app.v6.$(boot).$(flash).app$(app).ld
|
||||
BIN_NAME = user$(app).$(flash).$(boot)
|
||||
ifeq ($(size_map), 6)
|
||||
LD_FILE = $(LDDIR)/eagle.app.v6.$(boot).2048.ld
|
||||
else
|
||||
ifeq ($(size_map), 5)
|
||||
LD_FILE = $(LDDIR)/eagle.app.v6.$(boot).2048.ld
|
||||
else
|
||||
ifeq ($(size_map), 4)
|
||||
LD_FILE = $(LDDIR)/eagle.app.v6.$(boot).1024.app$(app).ld
|
||||
else
|
||||
ifeq ($(size_map), 3)
|
||||
LD_FILE = $(LDDIR)/eagle.app.v6.$(boot).1024.app$(app).ld
|
||||
else
|
||||
ifeq ($(size_map), 2)
|
||||
LD_FILE = $(LDDIR)/eagle.app.v6.$(boot).1024.app$(app).ld
|
||||
else
|
||||
ifeq ($(size_map), 0)
|
||||
LD_FILE = $(LDDIR)/eagle.app.v6.$(boot).512.app$(app).ld
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
BIN_NAME = user$(app).$(flash).$(boot).$(size_map)
|
||||
endif
|
||||
else
|
||||
app = 0
|
||||
@ -221,7 +252,7 @@ endif
|
||||
@echo "!!!"
|
||||
|
||||
ifeq ($(app), 0)
|
||||
@python ../tools/gen_appbin.py $< 0 $(mode) $(freqdiv) $(size)
|
||||
@python ../tools/gen_appbin.py $< 0 $(mode) $(freqdiv) $(size_map)
|
||||
@mv eagle.app.flash.bin ../bin/eagle.flash.bin
|
||||
@mv eagle.app.v6.irom0text.bin ../bin/eagle.irom0text.bin
|
||||
@rm eagle.app.v6.*
|
||||
@ -230,12 +261,21 @@ ifeq ($(app), 0)
|
||||
@echo "eagle.flash.bin-------->0x00000"
|
||||
@echo "eagle.irom0text.bin---->0x40000"
|
||||
else
|
||||
ifeq ($(boot), new)
|
||||
@python ../tools/gen_appbin.py $< 2 $(mode) $(freqdiv) $(size)
|
||||
@echo "Support boot_v1.2 and +"
|
||||
else
|
||||
@python ../tools/gen_appbin.py $< 1 $(mode) $(freqdiv) $(size)
|
||||
ifneq ($(boot), new)
|
||||
@python ../tools/gen_appbin.py $< 1 $(mode) $(freqdiv) $(size_map)
|
||||
@echo "Support boot_v1.1 and +"
|
||||
else
|
||||
@python ../tools/gen_appbin.py $< 2 $(mode) $(freqdiv) $(size_map)
|
||||
|
||||
ifeq ($(size_map), 6)
|
||||
@echo "Support boot_v1.4 and +"
|
||||
else
|
||||
ifeq ($(size_map), 5)
|
||||
@echo "Support boot_v1.4 and +"
|
||||
else
|
||||
@echo "Support boot_v1.2 and +"
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
@mv eagle.app.flash.bin ../bin/upgrade/$(BIN_NAME).bin
|
||||
|
@ -1,5 +1,8 @@
|
||||
@echo off
|
||||
|
||||
echo gen_misc.bat version 20150511
|
||||
echo .
|
||||
|
||||
echo Please follow below steps(1-5) to generate specific bin(s):
|
||||
echo STEP 1: choose boot version(0=boot_v1.1, 1=boot_v1.2+, 2=none)
|
||||
set input=default
|
||||
@ -90,26 +93,49 @@ if %input% equ 3 (
|
||||
echo spi mode: %spi_mode%
|
||||
echo.
|
||||
|
||||
echo STEP 5: choose spi size(0=256KB, 1=512KB, 2=1024KB, 3=2048KB, 4=4096KB)
|
||||
echo STEP 5: choose flash size and map
|
||||
echo 0= 512KB( 256KB+ 256KB)
|
||||
echo 2=1024KB( 512KB+ 512KB)
|
||||
echo 3=2048KB( 512KB+ 512KB)
|
||||
echo 4=4096KB( 512KB+ 512KB)
|
||||
echo 5=2048KB(1024KB+1024KB)
|
||||
echo 6=4096KB(1024KB+1024KB)
|
||||
set input=default
|
||||
set /p input=enter (0/1/2/3/4, default 1):
|
||||
set /p input=enter (0/1/2/3/4/5/6, default 0):
|
||||
|
||||
if %input% equ 0 (
|
||||
set spi_size=256
|
||||
) else (
|
||||
if %input% equ 2 (
|
||||
set spi_size=1024
|
||||
set spi_size_map=2
|
||||
echo spi size: 1024KB
|
||||
echo spi ota map: 512KB + 512KB
|
||||
) else (
|
||||
if %input% equ 3 (
|
||||
set spi_size=2048
|
||||
) else (
|
||||
if %input% equ 4 (
|
||||
set spi_size=4096
|
||||
) else (
|
||||
set spi_size=512
|
||||
))))
|
||||
|
||||
echo spi size: %spi_size% KB
|
||||
if %input% equ 3 (
|
||||
set spi_size_map=3
|
||||
echo spi size: 2048KB
|
||||
echo spi ota map: 512KB + 512KB
|
||||
) else (
|
||||
if %input% equ 4 (
|
||||
set spi_size_map=4
|
||||
echo spi size: 4096KB
|
||||
echo spi ota map: 512KB + 512KB
|
||||
) else (
|
||||
if %input% equ 5 (
|
||||
set spi_size_map=5
|
||||
echo spi size: 2048KB
|
||||
echo spi ota map: 1024KB + 1024KB
|
||||
) else (
|
||||
if %input% equ 6 (
|
||||
set spi_size_map=6
|
||||
echo spi size: 4096KB
|
||||
echo spi ota map: 1024KB + 1024KB
|
||||
) else (
|
||||
set spi_size_map=0
|
||||
echo spi size: 512KB
|
||||
echo spi ota map: 256KB + 256KB
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
touch user/user_main.c
|
||||
|
||||
@ -117,5 +143,5 @@ echo.
|
||||
echo start...
|
||||
echo.
|
||||
|
||||
make BOOT=%boot% APP=%app% SPI_SPEED=%spi_speed% SPI_MODE=%spi_mode% SPI_SIZE=%spi_size%
|
||||
make BOOT=%boot% APP=%app% SPI_SPEED=%spi_speed% SPI_MODE=%spi_mode% SPI_SIZE=%spi_size_map%
|
||||
|
||||
|
@ -1,5 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "gen_misc.sh version 20150511"
|
||||
echo ""
|
||||
|
||||
echo "Please follow below steps(1-5) to generate specific bin(s):"
|
||||
echo "STEP 1: choose boot version(0=boot_v1.1, 1=boot_v1.2+, 2=none)"
|
||||
echo "enter(0/1/2, default 2):"
|
||||
@ -96,25 +99,46 @@ fi
|
||||
echo "spi mode: $spi_mode"
|
||||
echo ""
|
||||
|
||||
echo "STEP 5: choose spi size(0=256KB, 1=512KB, 2=1024KB, 3=2048KB, 4=4096KB)"
|
||||
echo "enter (0/1/2/3/4, default 1):"
|
||||
echo "STEP 5: choose spi size and map"
|
||||
echo " 0= 512KB( 256KB+ 256KB)"
|
||||
echo " 2=1024KB( 512KB+ 512KB)"
|
||||
echo " 3=2048KB( 512KB+ 512KB)"
|
||||
echo " 4=4096KB( 512KB+ 512KB)"
|
||||
echo " 5=2048KB(1024KB+1024KB)"
|
||||
echo " 6=4096KB(1024KB+1024KB)"
|
||||
echo "enter (0/2/3/4/5/6, default 0):"
|
||||
read input
|
||||
|
||||
if [ -z "$input" ]; then
|
||||
spi_size=512
|
||||
elif [ $input == 0 ]; then
|
||||
spi_size=256
|
||||
spi_size_map=0
|
||||
echo "spi size: 512KB"
|
||||
echo "spi ota map: 256KB + 256KB"
|
||||
elif [ $input == 2 ]; then
|
||||
spi_size=1024
|
||||
spi_size_map=2
|
||||
echo "spi size: 1024KB"
|
||||
echo "spi ota map: 512KB + 512KB"
|
||||
elif [ $input == 3 ]; then
|
||||
spi_size=2048
|
||||
spi_size_map=3
|
||||
echo "spi size: 2048KB"
|
||||
echo "spi ota map: 512KB + 512KB"
|
||||
elif [ $input == 4 ]; then
|
||||
spi_size=4096
|
||||
spi_size_map=4
|
||||
echo "spi size: 4096KB"
|
||||
echo "spi ota map: 512KB + 512KB"
|
||||
elif [ $input == 5 ]; then
|
||||
spi_size_map=5
|
||||
echo "spi size: 2048KB"
|
||||
echo "spi ota map: 1024KB + 1024KB"
|
||||
elif [ $input == 6 ]; then
|
||||
spi_size_map=6
|
||||
echo "spi size: 4096KB"
|
||||
echo "spi ota map: 1024KB + 1024KB"
|
||||
else
|
||||
spi_size=512
|
||||
spi_size_map=0
|
||||
echo "spi size: 512KB"
|
||||
echo "spi ota map: 256KB + 256KB"
|
||||
fi
|
||||
|
||||
echo "spi size: $spi_size KB"
|
||||
echo ""
|
||||
|
||||
touch user/user_main.c
|
||||
@ -123,4 +147,4 @@ echo ""
|
||||
echo "start..."
|
||||
echo ""
|
||||
|
||||
make COMPILE=gcc BOOT=$boot APP=$app SPI_SPEED=$spi_speed SPI_MODE=$spi_mode SPI_SIZE=$spi_size
|
||||
make COMPILE=gcc BOOT=$boot APP=$app SPI_SPEED=$spi_speed SPI_MODE=$spi_mode SPI_SIZE_MAP=$spi_size_map
|
||||
|
Binary file not shown.
BIN
bin/boot_v1.4(b1).bin
Normal file
BIN
bin/boot_v1.4(b1).bin
Normal file
Binary file not shown.
0
bin/upgrade/readme.txt
Normal file
0
bin/upgrade/readme.txt
Normal file
@ -1,5 +1,8 @@
|
||||
@echo off
|
||||
|
||||
echo gen_misc.bat version 20150511
|
||||
echo .
|
||||
|
||||
echo Please follow below steps(1-5) to generate specific bin(s):
|
||||
echo STEP 1: choose boot version(0=boot_v1.1, 1=boot_v1.2+, 2=none)
|
||||
set input=default
|
||||
@ -87,29 +90,52 @@ if %input% equ 3 (
|
||||
set spi_mode=QIO
|
||||
)))
|
||||
|
||||
echo spi mode: %spi_mode%
|
||||
echo spi mode: %spi_mode%
|
||||
echo.
|
||||
|
||||
echo STEP 5: choose spi size(0=256KB, 1=512KB, 2=1024KB, 3=2048KB, 4=4096KB)
|
||||
echo STEP 5: choose flash size and map
|
||||
echo 0= 512KB( 256KB+ 256KB)
|
||||
echo 2=1024KB( 512KB+ 512KB)
|
||||
echo 3=2048KB( 512KB+ 512KB)
|
||||
echo 4=4096KB( 512KB+ 512KB)
|
||||
echo 5=2048KB(1024KB+1024KB)
|
||||
echo 6=4096KB(1024KB+1024KB)
|
||||
set input=default
|
||||
set /p input=enter (0/1/2/3/4, default 1):
|
||||
set /p input=enter (0/1/2/3/4/5/6, default 0):
|
||||
|
||||
if %input% equ 0 (
|
||||
set spi_size=256
|
||||
) else (
|
||||
if %input% equ 2 (
|
||||
set spi_size=1024
|
||||
set spi_size_map=2
|
||||
echo spi size: 1024KB
|
||||
echo spi ota map: 512KB + 512KB
|
||||
) else (
|
||||
if %input% equ 3 (
|
||||
set spi_size=2048
|
||||
) else (
|
||||
if %input% equ 4 (
|
||||
set spi_size=4096
|
||||
) else (
|
||||
set spi_size=512
|
||||
))))
|
||||
|
||||
echo spi size: %spi_size% KB
|
||||
if %input% equ 3 (
|
||||
set spi_size_map=3
|
||||
echo spi size: 2048KB
|
||||
echo spi ota map: 512KB + 512KB
|
||||
) else (
|
||||
if %input% equ 4 (
|
||||
set spi_size_map=4
|
||||
echo spi size: 4096KB
|
||||
echo spi ota map: 512KB + 512KB
|
||||
) else (
|
||||
if %input% equ 5 (
|
||||
set spi_size_map=5
|
||||
echo spi size: 2048KB
|
||||
echo spi ota map: 1024KB + 1024KB
|
||||
) else (
|
||||
if %input% equ 6 (
|
||||
set spi_size_map=6
|
||||
echo spi size: 4096KB
|
||||
echo spi ota map: 1024KB + 1024KB
|
||||
) else (
|
||||
set spi_size_map=0
|
||||
echo spi size: 512KB
|
||||
echo spi ota map: 256KB + 256KB
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
touch user/user_main.c
|
||||
|
||||
@ -117,5 +143,5 @@ echo.
|
||||
echo start...
|
||||
echo.
|
||||
|
||||
make BOOT=%boot% APP=%app% SPI_SPEED=%spi_speed% SPI_MODE=%spi_mode% SPI_SIZE=%spi_size%
|
||||
make BOOT=%boot% APP=%app% SPI_SPEED=%spi_speed% SPI_MODE=%spi_mode% SPI_SIZE=%spi_size_map%
|
||||
|
||||
|
@ -1,5 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "gen_misc.sh version 20150511"
|
||||
echo ""
|
||||
|
||||
echo "Please follow below steps(1-5) to generate specific bin(s):"
|
||||
echo "STEP 1: choose boot version(0=boot_v1.1, 1=boot_v1.2+, 2=none)"
|
||||
echo "enter(0/1/2, default 2):"
|
||||
@ -96,25 +99,46 @@ fi
|
||||
echo "spi mode: $spi_mode"
|
||||
echo ""
|
||||
|
||||
echo "STEP 5: choose spi size(0=256KB, 1=512KB, 2=1024KB, 3=2048KB, 4=4096KB)"
|
||||
echo "enter (0/1/2/3/4, default 1):"
|
||||
echo "STEP 5: choose spi size and map"
|
||||
echo " 0= 512KB( 256KB+ 256KB)"
|
||||
echo " 2=1024KB( 512KB+ 512KB)"
|
||||
echo " 3=2048KB( 512KB+ 512KB)"
|
||||
echo " 4=4096KB( 512KB+ 512KB)"
|
||||
echo " 5=2048KB(1024KB+1024KB)"
|
||||
echo " 6=4096KB(1024KB+1024KB)"
|
||||
echo "enter (0/2/3/4/5/6, default 0):"
|
||||
read input
|
||||
|
||||
if [ -z "$input" ]; then
|
||||
spi_size=512
|
||||
elif [ $input == 0 ]; then
|
||||
spi_size=256
|
||||
spi_size_map=0
|
||||
echo "spi size: 512KB"
|
||||
echo "spi ota map: 256KB + 256KB"
|
||||
elif [ $input == 2 ]; then
|
||||
spi_size=1024
|
||||
spi_size_map=2
|
||||
echo "spi size: 1024KB"
|
||||
echo "spi ota map: 512KB + 512KB"
|
||||
elif [ $input == 3 ]; then
|
||||
spi_size=2048
|
||||
spi_size_map=3
|
||||
echo "spi size: 2048KB"
|
||||
echo "spi ota map: 512KB + 512KB"
|
||||
elif [ $input == 4 ]; then
|
||||
spi_size=4096
|
||||
spi_size_map=4
|
||||
echo "spi size: 4096KB"
|
||||
echo "spi ota map: 512KB + 512KB"
|
||||
elif [ $input == 5 ]; then
|
||||
spi_size_map=5
|
||||
echo "spi size: 2048KB"
|
||||
echo "spi ota map: 1024KB + 1024KB"
|
||||
elif [ $input == 6 ]; then
|
||||
spi_size_map=6
|
||||
echo "spi size: 4096KB"
|
||||
echo "spi ota map: 1024KB + 1024KB"
|
||||
else
|
||||
spi_size=512
|
||||
spi_size_map=0
|
||||
echo "spi size: 512KB"
|
||||
echo "spi ota map: 256KB + 256KB"
|
||||
fi
|
||||
|
||||
echo "spi size: $spi_size KB"
|
||||
echo ""
|
||||
|
||||
touch user/user_main.c
|
||||
@ -123,4 +147,4 @@ echo ""
|
||||
echo "start..."
|
||||
echo ""
|
||||
|
||||
make COMPILE=gcc BOOT=$boot APP=$app SPI_SPEED=$spi_speed SPI_MODE=$spi_mode SPI_SIZE=$spi_size
|
||||
make COMPILE=gcc BOOT=$boot APP=$app SPI_SPEED=$spi_speed SPI_MODE=$spi_mode SPI_SIZE_MAP=$spi_size_map
|
||||
|
@ -30,9 +30,7 @@ void *memset(void *dst, int c, size_t n);
|
||||
int memcmp(const void *m1, const void *m2, size_t n);
|
||||
void *memmove(void *dst, const void *src, size_t n);
|
||||
|
||||
int rand_r(unsigned int *seed);
|
||||
int rand(void);
|
||||
void srand(unsigned int i);
|
||||
|
||||
int printf(const char *format, ...);
|
||||
int sprintf(char *out, const char *format, ...);
|
||||
|
@ -32,11 +32,14 @@ const char* system_get_sdk_version(void);
|
||||
|
||||
void system_restore(void);
|
||||
void system_restart(void);
|
||||
|
||||
void system_deep_sleep(uint32 time_in_us);
|
||||
bool system_deep_sleep_set_option(uint8 option);
|
||||
|
||||
uint32 system_get_time(void);
|
||||
|
||||
void system_print_meminfo(void);
|
||||
|
||||
uint32 system_get_free_heap_size(void);
|
||||
uint32 system_get_chip_id(void);
|
||||
|
||||
@ -47,5 +50,9 @@ bool system_rtc_mem_read(uint8 src, void *dst, uint16 n);
|
||||
bool system_rtc_mem_write(uint8 dst, const void *src, uint16 n);
|
||||
|
||||
void system_uart_swap(void);
|
||||
void system_uart_de_swap(void);
|
||||
|
||||
uint16 system_adc_read(void);
|
||||
uint16 system_get_vdd33(void);
|
||||
|
||||
#endif
|
||||
|
@ -40,6 +40,7 @@ struct ip_info {
|
||||
|
||||
bool wifi_get_ip_info(uint8 if_index, struct ip_info *info);
|
||||
bool wifi_set_ip_info(uint8 if_index, struct ip_info *info);
|
||||
|
||||
bool wifi_get_macaddr(uint8 if_index, uint8 *macaddr);
|
||||
bool wifi_set_macaddr(uint8 if_index, uint8 *macaddr);
|
||||
|
||||
@ -48,6 +49,8 @@ bool wifi_set_channel(uint8 channel);
|
||||
|
||||
void wifi_status_led_install(uint8 gpio_id, uint32 gpio_name, uint8 gpio_func);
|
||||
|
||||
bool wifi_promiscuous_set_mac(const uint8_t *address);
|
||||
|
||||
void wifi_promiscuous_enable(uint8 promiscuous);
|
||||
|
||||
typedef void (* wifi_promiscuous_cb_t)(uint8 *buf, uint16 len);
|
||||
@ -63,4 +66,103 @@ enum phy_mode {
|
||||
enum phy_mode wifi_get_phy_mode(void);
|
||||
bool wifi_set_phy_mode(enum phy_mode mode);
|
||||
|
||||
enum {
|
||||
EVENT_STAMODE_SCAN_DONE = 0,
|
||||
EVENT_STAMODE_CONNECTED,
|
||||
EVENT_STAMODE_DISCONNECTED,
|
||||
EVENT_STAMODE_AUTHMODE_CHANGE,
|
||||
EVENT_STAMODE_GOT_IP,
|
||||
EVENT_SOFTAPMODE_STACONNECTED,
|
||||
EVENT_SOFTAPMODE_STADISCONNECTED,
|
||||
EVENT_MAX
|
||||
};
|
||||
|
||||
enum {
|
||||
REASON_UNSPECIFIED = 1,
|
||||
REASON_AUTH_EXPIRE = 2,
|
||||
REASON_AUTH_LEAVE = 3,
|
||||
REASON_ASSOC_EXPIRE = 4,
|
||||
REASON_ASSOC_TOOMANY = 5,
|
||||
REASON_NOT_AUTHED = 6,
|
||||
REASON_NOT_ASSOCED = 7,
|
||||
REASON_ASSOC_LEAVE = 8,
|
||||
REASON_ASSOC_NOT_AUTHED = 9,
|
||||
REASON_DISASSOC_PWRCAP_BAD = 10,
|
||||
REASON_DISASSOC_SUPCHAN_BAD = 11,
|
||||
REASON_IE_INVALID = 13,
|
||||
REASON_MIC_FAILURE = 14,
|
||||
REASON_4WAY_HANDSHAKE_TIMEOUT = 15,
|
||||
REASON_GROUP_KEY_UPDATE_TIMEOUT = 16,
|
||||
REASON_IE_IN_4WAY_DIFFERS = 17,
|
||||
REASON_GROUP_CIPHER_INVALID = 18,
|
||||
REASON_PAIRWISE_CIPHER_INVALID = 19,
|
||||
REASON_AKMP_INVALID = 20,
|
||||
REASON_UNSUPP_RSN_IE_VERSION = 21,
|
||||
REASON_INVALID_RSN_IE_CAP = 22,
|
||||
REASON_802_1X_AUTH_FAILED = 23,
|
||||
REASON_CIPHER_SUITE_REJECTED = 24,
|
||||
|
||||
REASON_BEACON_TIMEOUT = 200,
|
||||
REASON_NO_AP_FOUND = 201,
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
uint32 status;
|
||||
struct bss_info *bss;
|
||||
} Event_StaMode_ScanDone_t;
|
||||
|
||||
typedef struct {
|
||||
uint8 ssid[32];
|
||||
uint8 ssid_len;
|
||||
uint8 bssid[6];
|
||||
uint8 channel;
|
||||
} Event_StaMode_Connected_t;
|
||||
|
||||
typedef struct {
|
||||
uint8 ssid[32];
|
||||
uint8 ssid_len;
|
||||
uint8 bssid[6];
|
||||
uint8 reason;
|
||||
} Event_StaMode_Disconnected;
|
||||
|
||||
typedef struct {
|
||||
uint8 old_mode;
|
||||
uint8 new_mode;
|
||||
} Event_StaMode_AuthMode_Change_t;
|
||||
|
||||
typedef struct {
|
||||
struct ip_addr ip;
|
||||
struct ip_addr mask;
|
||||
struct ip_addr gw;
|
||||
} Event_StaMode_Got_IP_t;
|
||||
|
||||
typedef struct {
|
||||
uint8 mac[6];
|
||||
uint8 aid;
|
||||
} Event_SoftAPMode_StaConnected_t;
|
||||
|
||||
typedef struct {
|
||||
uint8 mac[6];
|
||||
uint8 aid;
|
||||
} Event_SoftAPMode_StaDisconnected_t;
|
||||
|
||||
typedef union {
|
||||
Event_StaMode_ScanDone_t scan_done;
|
||||
Event_StaMode_Connected_t connected;
|
||||
Event_StaMode_Disconnected disconnected;
|
||||
Event_StaMode_AuthMode_Change_t auth_change;
|
||||
Event_StaMode_Got_IP_t got_ip;
|
||||
Event_SoftAPMode_StaConnected_t sta_connected;
|
||||
Event_SoftAPMode_StaDisconnected_t sta_disconnected;
|
||||
} Event_Info_u;
|
||||
|
||||
typedef struct _esp_event {
|
||||
uint32 event_id;
|
||||
Event_Info_u event_info;
|
||||
} System_Event_t;
|
||||
|
||||
typedef void (* wifi_event_handler_cb_t)(System_Event_t *event);
|
||||
|
||||
void wifi_set_event_handler_cb(wifi_event_handler_cb_t cb);
|
||||
|
||||
#endif
|
||||
|
@ -32,6 +32,7 @@
|
||||
#ifndef __LWIPOPTS_H__
|
||||
#define __LWIPOPTS_H__
|
||||
|
||||
#define LWIP_ESP8266
|
||||
/*
|
||||
-----------------------------------------------
|
||||
---------- Platform specific locking ----------
|
||||
@ -87,6 +88,21 @@
|
||||
---------- Internal Memory Pool Sizes ----------
|
||||
------------------------------------------------
|
||||
*/
|
||||
/**
|
||||
* MEMP_NUM_TCP_PCB: the number of simulatenously active TCP connections.
|
||||
* (requires the LWIP_TCP option)
|
||||
*/
|
||||
#ifndef MEMP_NUM_TCP_PCB
|
||||
#define MEMP_NUM_TCP_PCB 11
|
||||
#endif
|
||||
|
||||
/**
|
||||
* MEMP_NUM_NETCONN: the number of struct netconns.
|
||||
* (only needed if you use the sequential API, like api_lib.c)
|
||||
*/
|
||||
#ifndef MEMP_NUM_NETCONN
|
||||
#define MEMP_NUM_NETCONN 10
|
||||
#endif
|
||||
|
||||
/*
|
||||
--------------------------------
|
||||
|
@ -48,7 +48,7 @@
|
||||
#define CONFIG_X509_MAX_CA_CERTS 150
|
||||
#define CONFIG_SSL_MAX_CERTS 3
|
||||
#undef CONFIG_SSL_CTX_MUTEXING
|
||||
//#define CONFIG_USE_DEV_URANDOM 1
|
||||
#define CONFIG_USE_DEV_URANDOM 1
|
||||
#undef CONFIG_WIN32_USE_CRYPTO_LIB
|
||||
#undef CONFIG_OPENSSL_COMPATIBLE
|
||||
#undef CONFIG_PERFORMANCE_TESTING
|
||||
|
@ -219,7 +219,7 @@ enum {
|
||||
#define DHCP_PADDING 0x00
|
||||
#define DHCP_SUBNET 0x01
|
||||
//#define DHCP_TIME_OFFSET 0x02 /* (localtime - UTC_time) in seconds. signed */
|
||||
//#define DHCP_ROUTER 0x03
|
||||
#define DHCP_ROUTER 0x03
|
||||
//#define DHCP_TIME_SERVER 0x04 /* RFC 868 time server (32-bit, 0 = 1.1.1900) */
|
||||
//#define DHCP_NAME_SERVER 0x05 /* IEN 116 _really_ ancient kind of NS */
|
||||
//#define DHCP_DNS_SERVER 0x06
|
||||
|
217
ld/eagle.app.v6.new.2048.ld
Normal file
217
ld/eagle.app.v6.new.2048.ld
Normal file
@ -0,0 +1,217 @@
|
||||
/* This linker script generated from xt-genldscripts.tpp for LSP . */
|
||||
/* Linker Script for ld -N */
|
||||
MEMORY
|
||||
{
|
||||
dport0_0_seg : org = 0x3FF00000, len = 0x10
|
||||
dram0_0_seg : org = 0x3FFE8000, len = 0x14000
|
||||
iram1_0_seg : org = 0x40100000, len = 0x8000
|
||||
irom0_0_seg : org = 0x40201010, len = 0xE0000
|
||||
}
|
||||
|
||||
PHDRS
|
||||
{
|
||||
dport0_0_phdr PT_LOAD;
|
||||
dram0_0_phdr PT_LOAD;
|
||||
dram0_0_bss_phdr PT_LOAD;
|
||||
iram1_0_phdr PT_LOAD;
|
||||
irom0_0_phdr PT_LOAD;
|
||||
}
|
||||
|
||||
|
||||
/* Default entry point: */
|
||||
ENTRY(call_user_start)
|
||||
EXTERN(_DebugExceptionVector)
|
||||
EXTERN(_DoubleExceptionVector)
|
||||
EXTERN(_KernelExceptionVector)
|
||||
EXTERN(_NMIExceptionVector)
|
||||
EXTERN(_UserExceptionVector)
|
||||
PROVIDE(_memmap_vecbase_reset = 0x40000000);
|
||||
/* Various memory-map dependent cache attribute settings: */
|
||||
_memmap_cacheattr_wb_base = 0x00000110;
|
||||
_memmap_cacheattr_wt_base = 0x00000110;
|
||||
_memmap_cacheattr_bp_base = 0x00000220;
|
||||
_memmap_cacheattr_unused_mask = 0xFFFFF00F;
|
||||
_memmap_cacheattr_wb_trapnull = 0x2222211F;
|
||||
_memmap_cacheattr_wba_trapnull = 0x2222211F;
|
||||
_memmap_cacheattr_wbna_trapnull = 0x2222211F;
|
||||
_memmap_cacheattr_wt_trapnull = 0x2222211F;
|
||||
_memmap_cacheattr_bp_trapnull = 0x2222222F;
|
||||
_memmap_cacheattr_wb_strict = 0xFFFFF11F;
|
||||
_memmap_cacheattr_wt_strict = 0xFFFFF11F;
|
||||
_memmap_cacheattr_bp_strict = 0xFFFFF22F;
|
||||
_memmap_cacheattr_wb_allvalid = 0x22222112;
|
||||
_memmap_cacheattr_wt_allvalid = 0x22222112;
|
||||
_memmap_cacheattr_bp_allvalid = 0x22222222;
|
||||
PROVIDE(_memmap_cacheattr_reset = _memmap_cacheattr_wb_trapnull);
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
|
||||
.dport0.rodata : ALIGN(4)
|
||||
{
|
||||
_dport0_rodata_start = ABSOLUTE(.);
|
||||
*(.dport0.rodata)
|
||||
*(.dport.rodata)
|
||||
_dport0_rodata_end = ABSOLUTE(.);
|
||||
} >dport0_0_seg :dport0_0_phdr
|
||||
|
||||
.dport0.literal : ALIGN(4)
|
||||
{
|
||||
_dport0_literal_start = ABSOLUTE(.);
|
||||
*(.dport0.literal)
|
||||
*(.dport.literal)
|
||||
_dport0_literal_end = ABSOLUTE(.);
|
||||
} >dport0_0_seg :dport0_0_phdr
|
||||
|
||||
.dport0.data : ALIGN(4)
|
||||
{
|
||||
_dport0_data_start = ABSOLUTE(.);
|
||||
*(.dport0.data)
|
||||
*(.dport.data)
|
||||
_dport0_data_end = ABSOLUTE(.);
|
||||
} >dport0_0_seg :dport0_0_phdr
|
||||
|
||||
.data : ALIGN(4)
|
||||
{
|
||||
_data_start = ABSOLUTE(.);
|
||||
*(.data)
|
||||
*(.data.*)
|
||||
*(.gnu.linkonce.d.*)
|
||||
*(.data1)
|
||||
*(.sdata)
|
||||
*(.sdata.*)
|
||||
*(.gnu.linkonce.s.*)
|
||||
*(.sdata2)
|
||||
*(.sdata2.*)
|
||||
*(.gnu.linkonce.s2.*)
|
||||
*(.jcr)
|
||||
_data_end = ABSOLUTE(.);
|
||||
} >dram0_0_seg :dram0_0_phdr
|
||||
|
||||
.rodata : ALIGN(4)
|
||||
{
|
||||
_rodata_start = ABSOLUTE(.);
|
||||
*(.rodata)
|
||||
*(.rodata.*)
|
||||
*(.gnu.linkonce.r.*)
|
||||
*(.rodata1)
|
||||
__XT_EXCEPTION_TABLE__ = ABSOLUTE(.);
|
||||
*(.xt_except_table)
|
||||
*(.gcc_except_table)
|
||||
*(.gnu.linkonce.e.*)
|
||||
*(.gnu.version_r)
|
||||
*(.eh_frame)
|
||||
/* C++ constructor and destructor tables, properly ordered: */
|
||||
KEEP (*crtbegin.o(.ctors))
|
||||
KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
|
||||
KEEP (*(SORT(.ctors.*)))
|
||||
KEEP (*(.ctors))
|
||||
KEEP (*crtbegin.o(.dtors))
|
||||
KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
|
||||
KEEP (*(SORT(.dtors.*)))
|
||||
KEEP (*(.dtors))
|
||||
/* C++ exception handlers table: */
|
||||
__XT_EXCEPTION_DESCS__ = ABSOLUTE(.);
|
||||
*(.xt_except_desc)
|
||||
*(.gnu.linkonce.h.*)
|
||||
__XT_EXCEPTION_DESCS_END__ = ABSOLUTE(.);
|
||||
*(.xt_except_desc_end)
|
||||
*(.dynamic)
|
||||
*(.gnu.version_d)
|
||||
. = ALIGN(4); /* this table MUST be 4-byte aligned */
|
||||
_bss_table_start = ABSOLUTE(.);
|
||||
LONG(_bss_start)
|
||||
LONG(_bss_end)
|
||||
_bss_table_end = ABSOLUTE(.);
|
||||
_rodata_end = ABSOLUTE(.);
|
||||
} >dram0_0_seg :dram0_0_phdr
|
||||
|
||||
.UserExceptionVector.literal : AT(LOADADDR(.rodata) + (ADDR(.UserExceptionVector.literal) - ADDR(.rodata))) ALIGN(4)
|
||||
{
|
||||
_UserExceptionVector_literal_start = ABSOLUTE(.);
|
||||
*(.UserExceptionVector.literal)
|
||||
_UserExceptionVector_literal_end = ABSOLUTE(.);
|
||||
} >dram0_0_seg :dram0_0_phdr
|
||||
|
||||
.bss ALIGN(8) (NOLOAD) : ALIGN(4)
|
||||
{
|
||||
. = ALIGN (8);
|
||||
_bss_start = ABSOLUTE(.);
|
||||
*(.dynsbss)
|
||||
*(.sbss)
|
||||
*(.sbss.*)
|
||||
*(.gnu.linkonce.sb.*)
|
||||
*(.scommon)
|
||||
*(.sbss2)
|
||||
*(.sbss2.*)
|
||||
*(.gnu.linkonce.sb2.*)
|
||||
*(.dynbss)
|
||||
*(.bss)
|
||||
*(.bss.*)
|
||||
*(.gnu.linkonce.b.*)
|
||||
*(COMMON)
|
||||
. = ALIGN (8);
|
||||
_bss_end = ABSOLUTE(.);
|
||||
_heap_start = ABSOLUTE(.);
|
||||
/* _stack_sentry = ALIGN(0x8); */
|
||||
} >dram0_0_seg :dram0_0_bss_phdr
|
||||
/* __stack = 0x3ffc8000; */
|
||||
|
||||
.text : ALIGN(4)
|
||||
{
|
||||
_stext = .;
|
||||
_text_start = ABSOLUTE(.);
|
||||
*(.UserEnter.text)
|
||||
. = ALIGN(16);
|
||||
*(.DebugExceptionVector.text)
|
||||
. = ALIGN(16);
|
||||
*(.NMIExceptionVector.text)
|
||||
. = ALIGN(16);
|
||||
*(.KernelExceptionVector.text)
|
||||
LONG(0)
|
||||
LONG(0)
|
||||
LONG(0)
|
||||
LONG(0)
|
||||
. = ALIGN(16);
|
||||
*(.UserExceptionVector.text)
|
||||
LONG(0)
|
||||
LONG(0)
|
||||
LONG(0)
|
||||
LONG(0)
|
||||
. = ALIGN(16);
|
||||
*(.DoubleExceptionVector.text)
|
||||
LONG(0)
|
||||
LONG(0)
|
||||
LONG(0)
|
||||
LONG(0)
|
||||
. = ALIGN (16);
|
||||
*(.entry.text)
|
||||
*(.init.literal)
|
||||
*(.init)
|
||||
*(.literal .text .literal.* .text.* .stub .gnu.warning .gnu.linkonce.literal.* .gnu.linkonce.t.*.literal .gnu.linkonce.t.*)
|
||||
*(.fini.literal)
|
||||
*(.fini)
|
||||
*(.gnu.version)
|
||||
_text_end = ABSOLUTE(.);
|
||||
_etext = .;
|
||||
} >iram1_0_seg :iram1_0_phdr
|
||||
|
||||
.lit4 : ALIGN(4)
|
||||
{
|
||||
_lit4_start = ABSOLUTE(.);
|
||||
*(*.lit4)
|
||||
*(.lit4.*)
|
||||
*(.gnu.linkonce.lit4.*)
|
||||
_lit4_end = ABSOLUTE(.);
|
||||
} >iram1_0_seg :iram1_0_phdr
|
||||
|
||||
.irom0.text : ALIGN(4)
|
||||
{
|
||||
_irom0_text_start = ABSOLUTE(.);
|
||||
*(.irom0.literal .irom.literal .irom.text.literal .irom0.text .irom.text)
|
||||
_irom0_text_end = ABSOLUTE(.);
|
||||
} >irom0_0_seg :irom0_0_phdr
|
||||
}
|
||||
|
||||
/* get ROM code address */
|
||||
INCLUDE "../ld/eagle.rom.addr.v6.ld"
|
Binary file not shown.
BIN
lib/libjson.a
BIN
lib/libjson.a
Binary file not shown.
BIN
lib/liblwip.a
BIN
lib/liblwip.a
Binary file not shown.
BIN
lib/libmain.a
BIN
lib/libmain.a
Binary file not shown.
Binary file not shown.
BIN
lib/libphy.a
BIN
lib/libphy.a
Binary file not shown.
BIN
lib/libpp.a
BIN
lib/libpp.a
Binary file not shown.
Binary file not shown.
BIN
lib/libssl.a
BIN
lib/libssl.a
Binary file not shown.
BIN
lib/libudhcp.a
BIN
lib/libudhcp.a
Binary file not shown.
BIN
lib/libwpa.a
BIN
lib/libwpa.a
Binary file not shown.
@ -97,14 +97,14 @@ def gen_appbin():
|
||||
global chk_sum
|
||||
global blocks
|
||||
if len(sys.argv) != 6:
|
||||
print 'Usage: gen_appbin.py eagle.app.out boot_mode flash_mode flash_clk_div flash_size'
|
||||
print 'Usage: gen_appbin.py eagle.app.out boot_mode flash_mode flash_clk_div flash_size_map'
|
||||
sys.exit(0)
|
||||
|
||||
elf_file = sys.argv[1]
|
||||
boot_mode = sys.argv[2]
|
||||
flash_mode = sys.argv[3]
|
||||
flash_clk_div = sys.argv[4]
|
||||
flash_size = sys.argv[5]
|
||||
flash_size_map = sys.argv[5]
|
||||
|
||||
flash_data_line = 16
|
||||
data_line_bits = 0xf
|
||||
@ -179,17 +179,19 @@ def gen_appbin():
|
||||
# 2 : 80m / 4
|
||||
# 0xf: 80m / 1
|
||||
#-------------------
|
||||
#flash_size=
|
||||
# 0 : 512 KB
|
||||
#flash_size_map=
|
||||
# 0 : 512 KB (256 KB + 256 KB)
|
||||
# 1 : 256 KB
|
||||
# 2 : 1024 KB
|
||||
# 3 : 2048 KB
|
||||
# 4 : 4096 KB
|
||||
# 2 : 1024 KB (512 KB + 512 KB)
|
||||
# 3 : 2048 KB (512 KB + 512 KB)
|
||||
# 4 : 4096 KB (512 KB + 512 KB)
|
||||
# 5 : 2048 KB (1024 KB + 1024 KB)
|
||||
# 6 : 4096 KB (1024 KB + 1024 KB)
|
||||
#-------------------
|
||||
# END OF SPI FLASH PARAMS
|
||||
#============================
|
||||
byte2=int(flash_mode)&0xff
|
||||
byte3=(((int(flash_size)<<4)| int(flash_clk_div))&0xff)
|
||||
byte3=(((int(flash_size_map)<<4)| int(flash_clk_div))&0xff)
|
||||
|
||||
if boot_mode == '2':
|
||||
# write irom bin head
|
||||
|
Reference in New Issue
Block a user