-
Couldn't load subscription status.
- Fork 7.7k
-
I really want to know how to modify the default address of the partition table at 0x8000. I want to modify it to 0x10000. If I simply write the partition table to the address at 0x10000, (of course I modified the location where the bootloader reads the partition table), it will appear The arduino loop program will not find the partition table, " initArduino(): Failed to initialize NVS! Error: 261"
thank you very much.
Beta Was this translation helpful? Give feedback.
All reactions
of course I modified the location where the bootloader reads the partition table
what did you modify?
Replies: 5 comments 6 replies
-
of course I modified the location where the bootloader reads the partition table
what did you modify?
Beta Was this translation helpful? Give feedback.
All reactions
-
Use idf to modify the bootloader to read the partition table at 0x10000
Beta Was this translation helpful? Give feedback.
All reactions
-
The question i have, why do you want to do this?
Beta Was this translation helpful? Give feedback.
All reactions
-
Because I added secure boot and flash encryption the bootloader got bigger。
Beta Was this translation helpful? Give feedback.
All reactions
-
I encountered the same problem. Have you solved it? I now also need to enable flash encryption under the esp arduino framework. I need to enable encryption function and modify the starting position of the partition table I found that it has not been successful.
Beta Was this translation helpful? Give feedback.
All reactions
-
I have changed here
arduino-esp32/tools/pioarduino-build.py
Lines 224 to 229 in f6b1910
so you can change with a setting in platformio.ini in fork pioarduino. It is possible with Arduino release 3.3.0
To get it going you have to use HybridCompile mode from pioarduino and set with custom_sdkconfig the different boot partition address (
CONFIG_PARTITION_TABLE_OFFSET). This values are fix in precompiled Arduino libs.
Beta Was this translation helpful? Give feedback.
All reactions
-
Thank you very much, you are amazing. Also do you know how to enable flash encryption in the platform + arduino environment? I have experienced it in the idf environment, but the flash encryption configuration is not found in the sdkconfig under arduino, and the new ones have not taken effect. Do you need to recompile sdk?
Beta Was this translation helpful? Give feedback.
All reactions
-
There is zero support for flash encryption in/with Arduino and Platformio. I am not going to invest time to add support in pioarduino for this. It will generate many issues from users bricking there devices. You need to add scripts to add the functions (and implement support in Arduino).
Beta Was this translation helpful? Give feedback.
All reactions
-
I reduced the size of the bootloader to less than 32KB as much as possible, and the flash has been successfully read and written, but the new problem is that the new firmware cannot be activated using the webupdate sample program OTA
Beta Was this translation helpful? Give feedback.
All reactions
-
Have you tried to move the partition table behind the App sections (OTA 1 and 2)?
Afaik the first started firmware has to be at 0x10000 (OTA 1).
Maybe what you want to do is not possible with Arduino. There are some fixed values choosen you cant easily change. If you want to use encryption switch to IDF.
Beta Was this translation helpful? Give feedback.
All reactions
-
@stick88 I modified our (Tasmota) Platformio espressif32 framework to support a different address than 0x10000 for app0 (it is hardcoded in official version). All other bootloader, partition table and boot_app0.bin are still hardcoded https://github.com/espressif/arduino-esp32/blob/master/tools/platformio-build-esp32.py#L330-L333
Not tested if it is possible to change this too.
Beta Was this translation helpful? Give feedback.