# How to define a 1MB continuous Flash memory area?

**URL:** <https://forum.amebaiot.com/t/how-to-define-a-1mb-continuous-flash-memory-area/2807>\
**Category:** Peripherals\
**Tags:** rtl872xd\
**Created:** [March 29, 2024, 8:39am UTC](https://forum.amebaiot.com/t/how-to-define-a-1mb-continuous-flash-memory-area/2807 "2024-03-29T08:39:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![White\_Jason](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/white_jason/32/1887_2.png) [@White\_Jason](https://forum.amebaiot.com/u/White_Jason)\
**Post date:** [March 29, 2024, 8:39am UTC](https://forum.amebaiot.com/t/how-to-define-a-1mb-continuous-flash-memory-area/2807/1 "2024-03-29T08:39:06Z")

</div>

How to change the layout of 4MB Flash? My firmware package is probably over 1MB.  
OTA1 planning is 1.5MB  
OTA2 planning is 1.5MB  
The remaining area is 1MB, customized for FlashDB database storage.

When I use Arduino IDE to program, there are roughly the following 4 areas:  
Flash area 0: 0x08000000  
Flash area 1: 0x08100000  
Flash area 2: 0x08200000  
Flash area 3: 0x08300000

I tried to modify the starting addresses of OTA1 and OTA2, but it always failed.

I found that every time the IDE burns and uploads, area 1 and area 3 are blank. There is firmware data for area 0 and area 2, and they are exactly the same? why is that? Did the IDE burn to area 0 and area 2 twice?

---

<div class="post-metadata">

**Author:** ![M-ichae-l](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/m-ichae-l/32/33_2.png) [@M-ichae-l](https://forum.amebaiot.com/u/M-ichae-l)\
**Post date:** [April 1, 2024, 3:36am UTC](https://forum.amebaiot.com/t/how-to-define-a-1mb-continuous-flash-memory-area/2807/2 "2024-04-01T03:36:35Z")

</div>

it is related with OTA strategy, try use area 1 or area 3 only. for example use 1, and 3 as backup.
