You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to get rid of file paths from my local PC in "bin" file. I thought this was caused by logging assertions, so I tried to silent assertions, but paths were still in bin file. Then I disabled assertions by setting:
CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE=y
However this breaks linking with following error:
App "hello-world" version: v3.4-87-g3b15c065-dirty
esptool.py v2.4.0
.flash.rodata len 0x02c08 load 0x4021cfc0
A fatal error occurred: Segment loaded at 0x4021cfc0 lands in same 64KB flash mapping as segment loaded at 0x40210010. Can't generate binary. Suggest changing linker script or ELF to merge sections.
Expected Behavior
hello_world example should compile and link with disabled assertions.
Actual Behavior
Linking fails when assertions are disabled.
Steps to repropduce
go to hello_world example
run: make menuconfig and in "Compiler options" set assertion level to "disabled"
The text was updated successfully, but these errors were encountered:
github-actionsbot
changed the title
Linking fails on hello_world example with disabled assertions
Linking fails on hello_world example with disabled assertions (GIT8266O-836)
Nov 15, 2023
It looks like there are two sections: .flash.text and .flash.rodata which "start" should be in different 64 KB flash region.
Disabling asserts is reducing text section to very small one ( < 64 KB) and it causes above linking error.
For some reason, it is not a problem for linker if text and rodata share the same sector when text length is > 64 KB.
Anyway linking problem can be resolved by adding ALIGN(64K) to text section, as follows:
It fixes linking but it make binary file a little bit bigger. I'm not very familiar with ldgen, so if there is away to add this align conditionally, then it would be better solution.
Environment
Problem Description
I would like to get rid of file paths from my local PC in "bin" file. I thought this was caused by logging assertions, so I tried to silent assertions, but paths were still in bin file. Then I disabled assertions by setting:
However this breaks linking with following error:
Expected Behavior
hello_world example should compile and link with disabled assertions.
Actual Behavior
Linking fails when assertions are disabled.
Steps to repropduce
Here is output from objdump:
The text was updated successfully, but these errors were encountered: