ESP32-C6 linking failed
Posted: Sun Mar 10, 2024 7:30 pm
I'm trying to compile simple test code that I have working on ESP32 and ESP32-S3, but when I try to compile it for ESP32-C6 I get a linking error that I do not fully understand. I am able to compile the "blink" example just fine for the C6, so this is not a consistent issue with the build system.
The error looks like this (I added a couple line breaks):
I tried looking for a good explanation of "The gap between X and Y must not exist to produce the final bin image" but I could not find anything useful. Does anyone know what could be causing this error?
The CMake files are the same for the working blink example and the failing project.
The blink example uses `SRCS "blink_example_main.c"` instead
The error looks like this (I added a couple line breaks):
Code: Select all
/home/ryan/.espressif/tools/riscv32-esp-elf/esp-13.2.0_20230928/riscv32-esp-elf/bin/../lib/gcc/riscv32-esp-elf/13.2.0/../../../../riscv32-esp-elf/bin/ld:
The gap between .flash.rodata and .flash.tls must not exist to produce the final bin image.
/home/ryan/.espressif/tools/riscv32-esp-elf/esp-13.2.0_20230928/riscv32-esp-elf/bin/../lib/gcc/riscv32-esp-elf/13.2.0/../../../../riscv32-esp-elf/bin/ld:
The gap between .flash.tls and .eh_frame must not exist to produce the final bin image.
The CMake files are the same for the working blink example and the failing project.
- cmake_minimum_required(VERSION 3.16)
- include($ENV{IDF_PATH}/tools/cmake/project.cmake)
- project(blink)
- idf_component_register(SRC_DIRS "nimcache"
- INCLUDE_DIRS ".")
- idf_build_set_property(C_COMPILE_OPTIONS -Wno-unused-label APPEND)
- idf_build_set_property(C_COMPILE_OPTIONS -Wno-discarded-qualifiers APPEND)
- idf_build_set_property(C_COMPILE_OPTIONS -Wno-ignored-qualifiers APPEND)
- idf_build_set_property(C_COMPILE_OPTIONS -Wno-error=unused-label APPEND)
- idf_build_set_property(C_COMPILE_OPTIONS -Wno-error=parentheses APPEND)
- idf_build_set_property(C_COMPILE_OPTIONS -Wno-error=implicit-function-declaration APPEND)
- idf_build_set_property(C_COMPILE_OPTIONS -Wno-error=maybe-uninitialized APPEND)
- idf_build_set_property(C_COMPILE_OPTIONS -Wno-error=nonnull APPEND)
- idf_build_set_property(C_COMPILE_OPTIONS -Wno-error=address APPEND)
- idf_build_set_property(C_COMPILE_OPTIONS -Wno-unused-but-set-variable APPEND)