Skip to content

Error: Invalid offset! when flashing at offset 0 (OCD-437) #193

@balix-microej

Description

@balix-microej

Environment

  • Development Kit: ESP32-S2-Saola-1
  • Module or chip used: ESP32-S2-WROVER
  • Debug Adapter: Segger J-Link
  • OpenOCD version: v0.10.0-esp32-20210401
  • Operating System: Windows
  • Using an IDE?: No
  • OpenOCD command line: openocd.exe -f .\interface\jlink.cfg -f .\target\esp32s2.cfg -c "program C:/../application-combined.bin 0x0 verify exit"
  • JTAG Clock: default
  • ESP-IDF version: v4.2.2

Problem Description

Steps to reproduce the behavior:

  1. Combine binary files produced by ESP IDF to be able to flash to offset 0 (script to combine files is attached).
    combine_binaries.py.txt
  2. Connect a Segger J-Link probe to the dev kit
  3. Run the following command (with the binary with files combined): openocd.exe -f .\interface\jlink.cfg -f .\target\esp32s2.cfg -c "program C:/../application-combined.bin 0x0 verify exit"
  4. Programmation of the device failed with error Invalid offset.

Debug Logs

openocd_log.txt

Expected behavior

The device is programmed with the binary provided.

Comments

Maybe my combined binary file is wrong? Is there any other way provided "officially" to flash the entire binary files at once? One workaround I found is to program the bootloader, partition table, ota data and application sequentially using the different binary files and offsets. But this doesn't always work because sometimes the device will reset indefinitely.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions