partation table questions
partation table questions
1. example
# Espressif ESP32 Partition Table
# Name, Type, SubType, Offset, Size
nvs, data, nvs, 0x9000, 0x4000
otadata, data, ota, 0xd000, 0x2000
phy_init, data, phy, 0xf000, 0x1000
factory, 0, 0, 0x10000, 1M
ota_0, 0, ota_0, , 1M
ota_1, 0, ota_1, , 1M
1. why not list 0x0000 ~0x8FFF,this part of space reserve for what type of using ?
2. make flash , does all binary flash to SPI flash, where the binary stored, from which addr?
3. does NVS write by page, and erase by block, what kind of variables recommend to save to NVS,?
# Espressif ESP32 Partition Table
# Name, Type, SubType, Offset, Size
nvs, data, nvs, 0x9000, 0x4000
otadata, data, ota, 0xd000, 0x2000
phy_init, data, phy, 0xf000, 0x1000
factory, 0, 0, 0x10000, 1M
ota_0, 0, ota_0, , 1M
ota_1, 0, ota_1, , 1M
1. why not list 0x0000 ~0x8FFF,this part of space reserve for what type of using ?
2. make flash , does all binary flash to SPI flash, where the binary stored, from which addr?
3. does NVS write by page, and erase by block, what kind of variables recommend to save to NVS,?
Re: partation table questions
The address space of the SPI flash is architected by Espressif. I'm imagining that all addresses south of 0x1 0000 are architected for exclusive use by ESP32 internals ... and you must not use them. I believe address 0x1 0000 onwards is available for your application and data usage.
When we run make flash, the esptool.py is run which copies three files into flash address space:
bootloader.bin -> 0x1000
partitions.bin -> 0x8000
app.bin -> 0x1 0000
The API for Non Volatile Storage appears to be well documented here ...
http://esp-idf.readthedocs.io/en/latest ... flash.html
The different types of variables you can store are rich including signed and unsigned numerics, strings and blobs. The purpose of NVS storage is to persist data between boots. A classic example might be to store configuration data such as your WiFi connection configuration, passwords for remote web services that your app may call etc etc.
When we run make flash, the esptool.py is run which copies three files into flash address space:
bootloader.bin -> 0x1000
partitions.bin -> 0x8000
app.bin -> 0x1 0000
The API for Non Volatile Storage appears to be well documented here ...
http://esp-idf.readthedocs.io/en/latest ... flash.html
The different types of variables you can store are rich including signed and unsigned numerics, strings and blobs. The purpose of NVS storage is to persist data between boots. A classic example might be to store configuration data such as your WiFi connection configuration, passwords for remote web services that your app may call etc etc.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32
-
- Posts: 9759
- Joined: Thu Nov 26, 2015 4:08 am
Re: partation table questions
If I recall correctly, space from 0x0 to 0x1000 is reserved for secureboot stuff; it's unused if you do not use that. Address 0x1000-0x8000 is reserved for the 2nd stage bootloader. Address 0x8000 is where the partition table starts; the 2nd stage bootloader uses that to load whatever else you have in memory.
-
- Posts: 7
- Joined: Tue Jan 03, 2017 10:11 am
Re: partation table questions
Hello
i have a question about partition table and bootloader:
If we use OTA1 and OTA2, how can i choose in what OTA i want to boot my device ? TKX
i have a question about partition table and bootloader:
If we use OTA1 and OTA2, how can i choose in what OTA i want to boot my device ? TKX
-
- Posts: 9759
- Joined: Thu Nov 26, 2015 4:08 am
Re: partation table questions
In general, you do not. The bootloader will always pick the last successfully flashed OTA partition and boot that.
-
- Posts: 7
- Joined: Tue Jan 03, 2017 10:11 am
Re: partation table questions
Thank you for your help
but i have two others questions (plz)
1- So to flash the OTA1 app for example, i must run flash just the app in address (0x10000 + 1M), then the boot-loader will boot in it ?
2- If -one day- we will want to boot in our factory app, how can we do ?
Thank you for your help
but i have two others questions (plz)
1- So to flash the OTA1 app for example, i must run flash just the app in address (0x10000 + 1M), then the boot-loader will boot in it ?
2- If -one day- we will want to boot in our factory app, how can we do ?
Thank you for your help
-
- Posts: 7
- Joined: Tue Jan 03, 2017 10:11 am
Re: partation table questions
Hello,
why they said that the boot-loader will read some parameters in OTADATA (partition after NVS) and boot in the partition that corresponds to the parameters read in OTADATA ?
Thank you
why they said that the boot-loader will read some parameters in OTADATA (partition after NVS) and boot in the partition that corresponds to the parameters read in OTADATA ?
Thank you
-
- Posts: 9759
- Joined: Thu Nov 26, 2015 4:08 am
Re: partation table questions
You should use the OTA API, it takes care of flashing to the correct OTA partition and setting the OTADATA information correctly. At the moment we do not have a way to boot to the factory firmware yet; we have some plans to have user-configurable hooks for that but nothing concrete yet. For now, you can copy the bootloader code to your own project and put in a condition to boot the factory f/w yourself.
-
- Posts: 7
- Joined: Tue Jan 03, 2017 10:11 am
Re: partation table questions
thank you for your help, but where can i find the bootloader code (is it the code that we find in component/bootloader ? or there is a github for bootloader source ?
TKX
TKX
Re: partation table questions
Yeszizoalbert wrote:is it the code that we find in component/bootloader ?
Who is online
Users browsing this forum: Bing [Bot], YaCy [Bot] and 149 guests