STM32IDE cannot sometimes find an included linker file
I have a complex project that has multiple sub-projects inside. One of these projects has an additional .ld file called "STM32L431KCUX_SHARED.ld". This file is a linked resource in other sub-projects and normally it works without an issue, every "STM32L431KCUX_FLASH.ld" of these sub-projects have " INCLUDE STM32L431KCUx_SHARED.ld" manually inserted. The SHARED file is in the same folder as the FLASH file of one of the sub-projects.
The problem is, sometimes, when I generate code from IOC project, the ld.exe file refuses to see SHARED file. When I try to compile the project, all I see is:
11:33:54 **** Incremental Build of configuration Debug for project RF_QED169MHz ****
make -j8 all
arm-none-eabi-g++ -o "RF_QED169MHz.elf" @"objects.list" -mcpu=cortex-m4 -T"C:\[REDACTED]\rfqed_169\RF_QED169MHz\STM32L431KCUX_FLASH.ld" --specs=nosys.specs -Wl,-Map="RF_QED169MHz.map" -Wl,--gc-sections -static --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -Wl,--start-group -lc -lm -lstdc++ -lsupc++ -Wl,--end-group
C:/ST/STM32CubeIDE_1.15.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: cannot open linker script file STM32L431KCUx_SHARED.ld: No such file or directory
collect2.exe: error: ld returned 1 exit status
make: *** [makefile:98: RF_QED169MHz.elf] Error 1
"make -j8 all" terminated with exit code 2. Build might be incomplete.
This is extremely confusing as it is simply cannot be true. Code regeneration did not touch any of the linker files and the SHARED file is still linked, the file is still there where it was.
My only guess is that ld.exe starts to look for this file somewhere else, but it is not reported in the log. I can fix this issue by resetting all changes using git, but I would prefer to understand what is happening here rather than nuking my work and starting from scratch every time it happens...
I tried to copy the SHARED file in the same folder as the linker file of the sub-project I am trying to compile, with no effect.
