Commit bf3463d0 authored by zeroday's avatar zeroday
Browse files

Merge pull request #75 from nodemcu/dev095

Dev095
parents 0a3702f8 729603fa
...@@ -24,6 +24,8 @@ typedef struct{ ...@@ -24,6 +24,8 @@ typedef struct{
#define SPI_FLASH_SEC_SIZE 4096 #define SPI_FLASH_SEC_SIZE 4096
uint32 spi_flash_get_id(void); uint32 spi_flash_get_id(void);
SpiFlashOpResult spi_flash_read_status(uint32 *status);
SpiFlashOpResult spi_flash_write_status(uint32 status_value);
SpiFlashOpResult spi_flash_erase_sector(uint16 sec); SpiFlashOpResult spi_flash_erase_sector(uint16 sec);
SpiFlashOpResult spi_flash_write(uint32 des_addr, uint32 *src_addr, uint32 size); SpiFlashOpResult spi_flash_write(uint32 des_addr, uint32 *src_addr, uint32 size);
SpiFlashOpResult spi_flash_read(uint32 src_addr, uint32 *des_addr, uint32 size); SpiFlashOpResult spi_flash_read(uint32 src_addr, uint32 *des_addr, uint32 size);
......
...@@ -151,9 +151,9 @@ enum { ...@@ -151,9 +151,9 @@ enum {
STATION_GOT_IP STATION_GOT_IP
}; };
enum dhcp_status{ enum dhcp_status {
DHCP_ENABLE, DHCP_STOPPED,
DHCP_DISABLE DHCP_STARTED
}; };
uint8 wifi_station_get_connect_status(void); uint8 wifi_station_get_connect_status(void);
...@@ -201,7 +201,7 @@ struct dhcps_lease { ...@@ -201,7 +201,7 @@ struct dhcps_lease {
struct station_info * wifi_softap_get_station_info(void); struct station_info * wifi_softap_get_station_info(void);
void wifi_softap_free_station_info(void); void wifi_softap_free_station_info(void);
bool wifi_station_get_ap_info(struct station_config config[]); uint8 wifi_station_get_ap_info(struct station_config config[]);
bool wifi_softap_dhcps_start(void); bool wifi_softap_dhcps_start(void);
bool wifi_softap_dhcps_stop(void); bool wifi_softap_dhcps_stop(void);
......
...@@ -66,6 +66,41 @@ SECTIONS ...@@ -66,6 +66,41 @@ SECTIONS
_dport0_data_end = ABSOLUTE(.); _dport0_data_end = ABSOLUTE(.);
} >dport0_0_seg :dport0_0_phdr } >dport0_0_seg :dport0_0_phdr
.irom0.text : ALIGN(4)
{
_irom0_text_start = ABSOLUTE(.);
*(.irom0.literal .irom.literal .irom.text.literal .irom0.text .irom.text)
*(.literal.* .text.*)
*(.rodata.text)
_irom0_text_end = ABSOLUTE(.);
_flash_used_end = ABSOLUTE(.);
} >irom0_0_seg :irom0_0_phdr
.text : ALIGN(4)
{
_stext = .;
_text_start = ABSOLUTE(.);
*(.entry.text)
*(.init.literal)
*(.init)
/* *(.literal .text .literal.* .text.* .stub .gnu.warning .gnu.linkonce.literal.* .gnu.linkonce.t.*.literal .gnu.linkonce.t.*) */
*(.literal .text .iram0.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
.data : ALIGN(4) .data : ALIGN(4)
{ {
_data_start = ABSOLUTE(.); _data_start = ABSOLUTE(.);
...@@ -145,40 +180,6 @@ SECTIONS ...@@ -145,40 +180,6 @@ SECTIONS
} >dram0_0_seg :dram0_0_bss_phdr } >dram0_0_seg :dram0_0_bss_phdr
/* __stack = 0x3ffc8000; */ /* __stack = 0x3ffc8000; */
.text : ALIGN(4)
{
_stext = .;
_text_start = ABSOLUTE(.);
*(.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)
{
_crypt_fixed_start = ABSOLUTE(.);
*(.crypt_fixed)
_crypt_fixed_end = ABSOLUTE(.);
_irom0_text_start = ABSOLUTE(.);
*(.irom0.literal .irom.literal .irom.text.literal .irom0.text .irom.text)
_irom0_text_end = ABSOLUTE(.);
_flash_used_end = ABSOLUTE(.);
} >irom0_0_seg :irom0_0_phdr
} }
/* get ROM code address */ /* get ROM code address */
......
...@@ -16,6 +16,8 @@ PROVIDE ( SHA1Final = 0x4000b648 ); ...@@ -16,6 +16,8 @@ PROVIDE ( SHA1Final = 0x4000b648 );
PROVIDE ( SHA1Init = 0x4000b584 ); PROVIDE ( SHA1Init = 0x4000b584 );
PROVIDE ( SHA1Transform = 0x4000a364 ); PROVIDE ( SHA1Transform = 0x4000a364 );
PROVIDE ( SHA1Update = 0x4000b5a8 ); PROVIDE ( SHA1Update = 0x4000b5a8 );
PROVIDE ( SPI_read_status = 0x400043c8 );
PROVIDE ( SPI_write_status = 0x40004400 );
PROVIDE ( Wait_SPI_Idle = 0x4000448c ); PROVIDE ( Wait_SPI_Idle = 0x4000448c );
PROVIDE ( SPIEraseArea = 0x40004b44 ); PROVIDE ( SPIEraseArea = 0x40004b44 );
PROVIDE ( SPIEraseBlock = 0x400049b4 ); PROVIDE ( SPIEraseBlock = 0x400049b4 );
......
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
...@@ -18,7 +18,10 @@ elf_file = sys.argv[1] ...@@ -18,7 +18,10 @@ elf_file = sys.argv[1]
ver = sys.argv[2] ver = sys.argv[2]
#print elf_file #print elf_file
cmd = 'xt-nm -g ' + elf_file + ' > eagle.app.sym' if os.getenv('XTENSA_CORE')=='lx106':
cmd = 'xt-nm -g ' + elf_file + ' > eagle.app.sym'
else:
cmd = 'xtensa-lx106-elf-nm -g ' + elf_file + ' > eagle.app.sym'
#print cmd #print cmd
os.system(cmd) os.system(cmd)
...@@ -60,7 +63,10 @@ for line in lines: ...@@ -60,7 +63,10 @@ for line in lines:
rodata_start_addr = m.group(1) rodata_start_addr = m.group(1)
print rodata_start_addr print rodata_start_addr
cmd = 'genflashbin%s eagle.app.%s.text.bin '%(ver, ver)+entry_addr+' eagle.app.%s.data.bin '%(ver)+ data_start_addr+' eagle.app.%s.rodata.bin '%(ver)+rodata_start_addr if os.getenv('XTENSA_CORE')=='lx106':
cmd = 'genflashbin%s eagle.app.%s.text.bin '%(ver, ver)+entry_addr+' eagle.app.%s.data.bin '%(ver)+ data_start_addr+' eagle.app.%s.rodata.bin '%(ver)+rodata_start_addr
else:
cmd = 'genflashbin%s eagle.app.%s.text.bin '%(ver, ver)+entry_addr+' eagle.app.%s.data.bin '%(ver)+ data_start_addr+' eagle.app.%s.rodata.bin '%(ver)+rodata_start_addr
print cmd print cmd
os.system(cmd) os.system(cmd)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment