ESP8266 Developer Zone The Official ESP8266 Forum 2017-06-22T00:22:37+08:00 https://bbs.espressif.com:443/feed.php?f=65&t=5010 2017-06-22T00:22:37+08:00 2017-06-22T00:22:37+08:00 https://bbs.espressif.com:443/viewtopic.php?t=5010&p=14143#p14143 <![CDATA[Re: Initialize flash memory portion in order to store my config file]]>
pratik wrote:
To erase a sector or to store data in a sector, you can simply use the flash download tool.
For example, if you burn a file called "data.bin" at address 0x020000, the data of the file will be placed at this location.
If the size of your BIN file is 4kB, then you can fill one whole sector with your data. This data can then be read by application in ESP8266.

For having a blank sector (all bytes read 0xFF), flash blank.bin at your sector start address.
Note that sector address is based on 4kB (kByte) sectors. Flash download tool takes absolute byte address, not sector address. :)


Thank you, I will follow this method.

Statistics: Posted by meaepeppe — Thu Jun 22, 2017 12:22 am


]]>
2017-06-13T01:25:09+08:00 2017-06-13T01:25:09+08:00 https://bbs.espressif.com:443/viewtopic.php?t=5010&p=13906#p13906 <![CDATA[Re: Initialize flash memory portion in order to store my config file]]> For example, if you burn a file called "data.bin" at address 0x020000, the data of the file will be placed at this location.
If the size of your BIN file is 4kB, then you can fill one whole sector with your data. This data can then be read by application in ESP8266.

For having a blank sector (all bytes read 0xFF), flash blank.bin at your sector start address.
Note that sector address is based on 4kB (kByte) sectors. Flash download tool takes absolute byte address, not sector address. :)

Statistics: Posted by Guest — Tue Jun 13, 2017 1:25 am


]]>
2017-06-09T02:51:01+08:00 2017-06-09T02:51:01+08:00 https://bbs.espressif.com:443/viewtopic.php?t=5010&p=13817#p13817 <![CDATA[Initialize flash memory portion in order to store my config file]]>

Code:

#define ESP_PARAM_START_SEC   0xFC
#define  DATA_POS 0

typedef struct {
   char auth[50];
   uint8 id_qty;
   uint32 id_vector[30];
   bool first_start;
} config_data;

I was thinking about flashing a blank file during firmware upload in order to get a known value in sector 0xFC. Can someone tell me how to make this or something else which will have the same result? Thanks.

Statistics: Posted by meaepeppe — Fri Jun 09, 2017 2:51 am


]]>