New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PlatformIO not recognising CONFIG_PARTITION_TABLE_OFFSET for debugger and upload #403
Comments
There is new functionality in the dev branch that hasn't been released yet, including support for a custom partition table offset. See my comment #11 (comment). But keep in mind you still need to configure the file with partitions in the |
Great, works fine now. I found and set the option: |
Actually with the Debug target
which results in
when using upload target
|
Configuration
Operating system:
Win 10
PlatformIO Version (
platformio --version
):PlatformIO, version 5.0.1
framework-espidf 3.40100.200827 (4.1.0)
Description of problem
I'm checking out some extra features and logging of the bootloader and so the bootloader doesn't fit within the normal space allocated (0x1000 to 0x8000) and overflows to the partition table, and as app partitions need to be aligned by 0x10000 (64K) anyway, my main app is now at 0x20000 and so I put my partition table at 0x16000
When using this custom partitioning platformio doesn't seem to account for CONFIG_PARTITION_TABLE_OFFSET when uploading or using the debugger, resulting in an error related to the new offset.
Or I haven't been able to find the variable that platformio uses when generating the upload/debug commands.
I have managed to make some custom scripts that fix uploading for now, though I'm not sure how to do this for debugging
Steps to Reproduce
First tried only changing
board_build.partitions = ...csv
inplatformio.ini
Then tried changing CONFIG_PARTITION_TABLE_OFFSET=0x16000:
Also tried replacing FLASH_EXTRA_IMAGES with a python script
env.Replace(FLASH_EXTRA_IMAGES=[ ('0x1000', '$BUILD_DIR\\bootloader.bin'), ('0x16000', '$BUILD_DIR\\partitions.bin')])
Actual Results
Uploading with esp-tool gives "Detected overlap at address: 0x8000 for file ...\partitions.bin"
Uploading with esp-prog works but results in a boot loop
Using debugger also results in a boot loop I think
print(env.subst('$UPLOADCMD') indeed shows wrong partition address of 0x8000 being used
Expected Results
partitions.bin is flashed to address as specified by CONFIG_PARTITION_TABLE_OFFSET
firmware.bin is flashed to the first app partition specified by CSV file (not sure if it's trying to do this or not)
The content of
platformio.ini
:The content of
partition_table_littleFs_factory_2ota.csv
:Script to replace esp-tool upload:
Script to replace esp-prog upload:
The text was updated successfully, but these errors were encountered: