Skip to content

Contents of segment at SHA256 digest offset 0xb0 are not all zero when building with protobuf for c++ (IDFGH-5417) #7160

@MarcGeh

Description

@MarcGeh

Environment

  • Development Kit: [ESP32-Wrover-Kit]
  • Kit version: [v3]
  • Module or chip used: [ESP32-WROVER]
  • IDF version: v4.2.1
  • Build System: [idf.py]
  • Compiler version: xtensa-esp32-elf-gcc (crosstool-NG esp-2020r3) 8.4.0
  • Operating System: [Linux]
  • Using an IDE?: [No]
  • Power Supply: [USB]

Problem Description

Hey guys, I've been trying to get protobuf c++ to run on the esp32. I created a protobuf component with all the source files from the protobuf git (version 3.15.2).

When running 'idf.py build' I get this error:

A fatal error occurred: Contents of segment at SHA256 digest offset 0xb0 are not all zero. Refusing to overwrite.

I have no idea what is causing this and why it only happens when I compile with the protobuf source files. When I comment out the lines 2056 - 2058 of esp-idf/components/esptool_py/esptool/esptool.py the binary is generated and I can run it on my dev-kit. However, there are some warnings during startup.

Since I really need the c++ implementation of protobuf to run on the esp32 and I have no idea how to fix this issue I thought I might get help here.

I created an example project to reproduce the issue.

Expected Behavior

Generate a binary image which can be flashed onto the target.

Actual Behavior

Generating binary image is aborted because of this error:

A fatal error occurred: Contents of segment at SHA256 digest offset 0xb0 are not all zero. Refusing to overwrite.

Steps to reproduce

Go and checkout the git repository I created for this: https://github.com/MarcGeh/esp32-cpp-protobuf
and build the project. The log output if the binary is generated with the empty check for the SHA256 digest commented out can be seen in the readme.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions