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
sdkconfig.txt
1.Create a new ESP32-C3 project
2.Set the compiler to esp-clang
3.Execute the compilation command
Build or installation Logs.
No response
More Information.
1.Fix assembly syntax:
ret .size rtos_current_tcb, .-rtos_current_tcb
2.Fix link script
MEMORY
{
// ...existing code...
}
// Can the declaration order be swapped?REGION_ALIAS("rtc_data_seg", rtc_iram_seg);
REGION_ALIAS("rtc_slow_seg", rtc_iram_seg);
REGION_ALIAS("rtc_data_location", rtc_iram_seg);
_data_seg_org=ORIGIN(rtc_data_seg);
The text was updated successfully, but these errors were encountered:
github-actionsbot
changed the title
[BUG] ESP32-C3: Clang compiler compatibility issue when handling assembly and link scripts
[BUG] ESP32-C3: Clang compiler compatibility issue when handling assembly and link scripts (IDFGH-14341)
Jan 3, 2025
MEMORY
{
// ...existing code...
}
//Can the declaration order be swapped?REGION_ALIAS("rtc_data_seg", rtc_iram_seg);
REGION_ALIAS("rtc_slow_seg", rtc_iram_seg);
REGION_ALIAS("rtc_data_location", rtc_iram_seg);
_data_seg_org=ORIGIN(rtc_data_seg);
This doesn't work, there are errors
[937/942] Linking CXX executable project-HelloWorld.elf
FAILED: project-HelloWorld.elf
C:\WINDOWS\system32\cmd.exe/C "cd . && D:\Tool\Espressif\tools\esp-clang\esp-18.1.2_20240912\esp-clang\bin\clang++.exe --target=riscv32-esp-elf -march=rv32imc -mabi=ilp32 -Wl,--cref -Wl,--defsym=IDF_TARGET_ESP32C3=0 -Wl,--Map=D:/MyProgram/ESP32-workspace/ESP32-C3/project-HelloWorld/build/project-HelloWorld.map -fno-rtti -fno-lto -Wl,--gc-sections -Wl,--warn-common -T rom.api.ld -T esp32c3.peripherals.ld -T esp32c3.rom.ld -T esp32c3.rom.api.ld -T esp32c3.rom.bt_funcs.ld -T esp32c3.rom.libgcc.ld -T esp32c3.rom.version.ld -T esp32c3.rom.eco3.ld -T esp32c3.rom.eco3_bt_funcs.ld -T esp32c3.rom.newlib.ld -T memory.ld -T sections.ld @CMakeFiles\project-HelloWorld.elf.rsp -o project-HelloWorld.elf && cd ."
ld.lld: error: section: .eh_frame is not contiguous with other relro sections
ld.lld: error: .flash_rodata_dummy section must be placed at the beginning of the rodata segment.
ld.lld: error: DRAM segment data does not fit.
ld.lld: error: The gap between .flash.appdesc and .flash.rodata must not exist to produce the final bin image.
ld.lld: error: The gap between .flash.rodata and .eh_frame_hdr must not exist to produce the final bin image.
ld.lld: error: The gap between .eh_frame_hdr and .eh_frame must not exist to produce the final bin image.
ld.lld: error: The gap between .eh_frame and .flash.tdata must not exist to produce the final bin image.
ld.lld: error: The gap between .flash.tdata and .flash.tbss must not exist to produce the final bin image.
ld.lld: error: DRAM segment data does not fit.
clang++: error: ld command failed with exit code 1 (use -v to see invocation)
@ErEbusE , the issue regarding wrong asm syntax was fixed in this commit 9ca231e
I can not reproduce your issue using clean IDF v5.3.2 and using clang + your sdkconfig file. For some reason in your logs appeared clang version esp-18.1.2_20240912 which is wrong for IDF v5.3.2 (should be 16.0.1-fe4f10a809). Also, you should not get assembler errors because in v5.3.2 for clang passed -no-integrated-as option (GNU as should be used instead).
After these mismatches it's difficult to say what else could be wrong with your environment... Could you please retry your test with fresh IDF and IDF's export.bat/export.ps1 environment?
Answers checklist.
IDF version.
ESP-IDF v5.3.2-dirty
Operating System used.
Windows
How did you build your project?
VS Code IDE
If you are using Windows, please specify command line type.
PowerShell
What is the expected behavior?
What is the actual behavior?
There are two compilation errors:
portasm.S.txt@444g
2. Link script error:There are two compilation errors in memory.ld:
memory.ld.txt@125g
Steps to reproduce.
sdkconfig.txt
1.Create a new ESP32-C3 project
2.Set the compiler to esp-clang
3.Execute the compilation command
Build or installation Logs.
No response
More Information.
1.Fix assembly syntax:
2.Fix link script
The text was updated successfully, but these errors were encountered: