Skip to content
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

Inconsistent usage of offset_address #538

Closed
maxgerhardt opened this issue May 7, 2021 · 0 comments
Closed

Inconsistent usage of offset_address #538

maxgerhardt opened this issue May 7, 2021 · 0 comments
Labels

Comments

@maxgerhardt
Copy link
Contributor

maxgerhardt commented May 7, 2021

Consider the platformio.ini

[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino
board_upload.offset_address = 0x210000

when doing an upload, esptool.py is using the default 0x10000 address for the firmware.bin..

CURRENT: upload_protocol = esptool
MethodWrapper(["upload"], [".pio\build\esp32dev\firmware.bin"])
Auto-detected: COM33
"c:\users\max\appdata\local\programs\python\python38\python.exe" "C:\Users\Max.platformio\packages\tool-esptoolpy\esptool.py" --chip esp32 --port "COM33" --baud 460800 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size detect 0x1000 C:\Users\Max.platformio\packages\framework-arduinoespressif32\tools\sdk\bin\bootloader_dio_40m.bin 0x8000 C:\Users\Max\temp\esp32_offset.pio\build\esp32dev\partitions.bin 0xe000 C:\Users\Max.platformio\packages\framework-arduinoespressif32\tools\partitions\boot_app0.bin 0x10000 .pio\build\esp32dev\firmware.bin

now I add

upload_protocol = esp-prog

to the platformio.ini and re-upload..

CURRENT: upload_protocol = esp-prog
openocd -d2 -s C:/Users/Max/.platformio/packages/tool-openocd-esp32/share/openocd/scripts -f interface/ftdi/esp32_devkitj_v1.cfg -f board/esp-wroom-32.cfg -c "adapter_khz 5000" -c "program_esp {{.pio\build\esp32dev\firmware.bin}} 0x210000 verify" -c "program_esp {{C:/Users/Max/.platformio/packages/framework-arduinoespressif32/tools/sdk/bin/bootloader_dio_40m.bin}} 0x1000 verify" -c "program_esp {{C:/Users/Max/temp/esp32_offset/.pio/build/esp32dev/partitions.bin}} 0x8000 verify" -c "program_esp {{C:/Users/Max/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin}} 0xe000 verify" -c "reset run; shutdown"

There it respected the address -- but not for normal serial uploads.

Discovered in https://community.platformio.org/t/esp32-app-offset-is-not-being-set-by-board-variable-upload-offset-address/21241.

@valeros valeros added the bug label Apr 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants