How to get the full capacity of an 8MB or 16MB flash chip?
Re: How to get the full capacity of an 8MB or 16MB flash chip?
Good. I had prepared that hint for you a few hours ago, but somehow that got lost? You can also set FLASH_SIZE in the call to make, so you do not have to change the Makefile.
make FLASH_SIZE=8MB deploy
esptool.py tries to determine the flash size. If that fails it falls back to automatic.
make FLASH_SIZE=8MB deploy
esptool.py tries to determine the flash size. If that fails it falls back to automatic.
Re: How to get the full capacity of an 8MB or 16MB flash chip?
Thank you!
While I have your ear, I have another, most likely simpler question for you, but for that, I'll open another thread.
While I have your ear, I have another, most likely simpler question for you, but for that, I'll open another thread.
-
- Posts: 61
- Joined: Fri Feb 15, 2019 9:22 am
Re: How to get the full capacity of an 8MB or 16MB flash chip?
I use the method of modifying partitions files to recompile the firmware and get the firmware that is suitable for 16 megabytes. I actually store and test more than 8 mega bytes of files and confirm that they are normal
-
- Posts: 61
- Joined: Fri Feb 15, 2019 9:22 am
Re: How to get the full capacity of an 8MB or 16MB flash chip?
After upgrading to 1.14 + cmake, if you modify the partition table separately, compilation will report an error, and at the same time modify the config.base The flash size in the file can be compiled, but burning to the device will still report an errorwangshujun@tom.com wrote: ↑Sun Feb 14, 2021 3:30 amI use the method of modifying partitions files to recompile the firmware and get the firmware that is suitable for 16 megabytes. I actually store and test more than 8 mega bytes of files and confirm that they are normal
entry 0x4008063c
[0;31mE (57) flash_parts: partition 3 invalid - offset 0x200000 size 0xe00000 exceeds flash chip size 0x400000[0m
[0;31mE (57) boot: Failed to verify partition table[0m
Trying to add parameters to make has no effect
make FLASH_SIZE?=16MB
make FLASH_SIZE=16MB
Re: How to get the full capacity of an 8MB or 16MB flash chip?
By chance I tried yesterday to build firmware which uses 8 MB flash. What I had to to:
a) create a partition table for that 8 MB flash and place it in the esp32 directory. The name is arbitrary. I named it partitions_8mb.csv. My copy:
b) create a board definition subdirectory for that board. That could be a copy of the most similar board. I called it GENERIC_SPIRAM_8MB. But you can give it any suitable name. That name is used in the make command and in the changed mpconfigboard.cmake (see below).
c) create a file sdkconfig.board in the board directory which sets the flash size and partition table name. My version:
c) change the mpconfigboard.cmake file in adding the name of the sdkconfig.board file. Mine looks as follows after the change:
Then you can build & flash the image with
make BOARD=<new_board_name> deploy
I do not know if that works for 16MB flash too. You have to try.
a) create a partition table for that 8 MB flash and place it in the esp32 directory. The name is arbitrary. I named it partitions_8mb.csv. My copy:
Code: Select all
# Name, Type, SubType, Offset, Size, Flags
# Note: if you change the phy_init or app partition offset, make sure to change the offset in Kconfig.projbuild
nvs, data, nvs, 0x9000, 0x6000,
phy_init, data, phy, 0xf000, 0x1000,
factory, app, factory, 0x10000, 0x1F0000,
vfs, data, fat, 0x200000, 0x600000,
c) create a file sdkconfig.board in the board directory which sets the flash size and partition table name. My version:
Code: Select all
CONFIG_ESPTOOLPY_FLASHSIZE_8MB=y
CONFIG_PARTITION_TABLE_CUSTOM=y
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions_8mb.csv"
Code: Select all
set(SDKCONFIG_DEFAULTS
boards/sdkconfig.base
boards/sdkconfig.ble
boards/sdkconfig.spiram
boards/GENERIC_SPIRAM_8MB/sdkconfig.board
)
set(MICROPY_FROZEN_MANIFEST ${MICROPY_BOARD_DIR}/manifest.py)
make BOARD=<new_board_name> deploy
I do not know if that works for 16MB flash too. You have to try.
-
- Posts: 61
- Joined: Fri Feb 15, 2019 9:22 am
Re: How to get the full capacity of an 8MB or 16MB flash chip?
Confirm that all three steps are required:
1. Modify partition table
2. Modification sdkconfig.base Flash size in
3. make FLASH_ SIZE?=8MB
The attachment is the script I use now. It's a stupid method, but it seems to be effective
1. Modify partition table
2. Modification sdkconfig.base Flash size in
3. make FLASH_ SIZE?=8MB
The attachment is the script I use now. It's a stupid method, but it seems to be effective
- Attachments
-
- build-all.rar
- (455 Bytes) Downloaded 227 times
Re: How to get the full capacity of an 8MB or 16MB flash chip?
Hi, dear Roberthh.
I tryed but I guess that recipy dos not work anymore.
I see this error:
-- Configuring incomplete, errors occurred!
See also "/home/alexandre/mp/micropython/ports/esp32/build-GENERIC_SPIRAM_8MB/CMakeFiles/CMakeOutput.log".
cmake failed with exit code 1
make: *** [Makefile:34: all] Erro 2
What am I doing wrong?
Re: How to get the full capacity of an 8MB or 16MB flash chip?
That mechanism should still work. Compare it to the setup for the board UM_FEATHERS2
Re: How to get the full capacity of an 8MB or 16MB flash chip?
I tried again and it worked. Maybe I forgot something in the process.
Thank you!
Thank you!